Cursor
Point Cursor's OpenAI settings at FreeModel and add the model ids you want to use.
Overview
Cursor lets you replace the OpenAI endpoint it uses for your own API key. FreeModel speaks the OpenAI format at https://freemodel.in/v1, so you override the base URL, paste a FreeModel key and add the FreeModel model ids as custom models. The short version is in Using Coding Agents; this page adds checks and fixes.
Prerequisites
- Cursor installed and signed in.
- A FreeModel key from Dashboard → API Keys (starts with
fm_, shown once). - A free account works with the free models, such as
gpt-6-luna. Claude Haiku 5.5 and GPT-6.2 Astra are on the free plan; the other Claude models, GPT-6 Astra, Gemini and the other premium models need a paid plan (Pricing).
Configuration
- Open Cursor Settings → Models.
- In the API keys area, find OpenAI API Key and paste your
fm_…key. - Turn on Override OpenAI Base URL and enter
https://freemodel.in/v1. Do not add/chat/completions. - Click Verify.
- Add a custom model whose name is exactly a FreeModel model id, for example
gpt-6-luna. Repeat for each model you want. - Enable the new model and pick it in the chat model selector.
| Field | Value |
|---|---|
| OpenAI API Key | your fm_… key |
| Override OpenAI Base URL | https://freemodel.in/v1 |
| Custom model name | an id from Models, e.g. gpt-6-luna |
Labels move between Cursor releases. If you do not see these exact names, look for the OpenAI key and base-URL override in the Models or API Keys section of Cursor's settings.
What goes through your key
The override applies to the chat models you add and select. Features that run on Cursor's own models, such as Tab completion, are not sent to your custom key, and Cursor's own plan rules decide which features accept a custom key. Check Cursor's documentation for the current list.
Cursor sends custom-key requests from its own servers, so the base URL must be reachable from the internet. https://freemodel.in/v1 is; a local proxy on localhost is not.
Test the connection
If Verify fails, test the same key and URL from a terminal. That tells you whether the problem is the key or Cursor's settings:
curl https://freemodel.in/v1/chat/completions \
-H "Authorization: Bearer fm_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-6-luna",
"messages": [{"role": "user", "content": "Reply with the word ok."}]
}'
A JSON answer with choices[0].message.content means the key, URL and model id are right. Then send a short message in Cursor's chat with the custom model selected.
Which model ids to use
| Account | Model ids |
|---|---|
| Free | gpt-6-luna or another free model: GPT-6.2 Astra, GPT-6 Luna, Grok 4.6, Grok 4.7, Claude Haiku 5.5, GLM-5.3 Flash, Qwen 3.8 Omni Flash and DeepSeek V4.1 Flash 1017. Free models use plan tokens at 1× on the free plan (GPT-6.2 Astra at 1.5×). |
| Paid | Any listed model, e.g. claude-opus-5-5 (3×) or gpt-6-astra (1.75×). |
For agent mode, choose a model with the Tools capability; for screenshots, one with Vision. Both are shown on each model card. Type the id exactly. Ids FreeModel does not list, such as gpt-4o, are not mapped to another model and return 404.
Common errors and fixes
| Status | What it means | Fix |
|---|---|---|
401 | Key missing, mistyped or revoked. | Paste the full fm_… key again. If you lost it, create a new key in the dashboard. |
403 upgrade_required | A free account picked a paid model. | Select a free model, or buy a plan. |
404 model_not_found | The custom model name is not a FreeModel id. | Copy the id from Models. Dots or dashes both work (claude-opus-4.8 = claude-opus-4-8). |
402 | Tokens used up (tokens_exhausted). | Renew or upgrade. Refused requests are not charged. |
429 | Your plan's requests-per-minute limit. | Wait a moment; a larger plan raises the limit. |
If Verify passes but chat errors, the most common cause is that a built-in OpenAI model is still selected instead of your custom model. Select the custom one explicitly.
Related pages
- Custom AI API with Cursor — blog walkthrough
- Using Coding Agents
- Tool Calling and Vision
- Cline — a VS Code alternative that also runs fully on your key