Docs · Cursor
How do I point Cursor at FreeModel? Three fields in a settings file
最后更新:
FreeModel is an AI model gateway: one key for 200+ models across dozens of providers, routed by task with free capacity tried first. Cursor can talk to any OpenAI-compatible endpoint, so the setup is a base URL, a key and a model name — nothing to install.
Setup
In Cursor, open settings and add an OpenAI-compatible provider:
{
"openai": {
"baseUrl": "https://freemodel.online/v1",
"apiKey": "sk-your-key"
}
}
The base ends at /v1. Cursor appends /chat/completions
itself — adding it here gives you /v1/chat/completions/chat/completions and
a 404.
Choosing a model inside Cursor
Cursor's model picker expects names it recognises. With a custom provider you supply one yourself, so put a tier alias in and let the router worry about it:
| Use case | Model id |
|---|---|
| Everyday editing, cost-conscious | fm-v1-lite |
| Harder refactors | fm-v1-pro |
| Something balanced | fm-v1-standard |
If Cursor insists on a recognised name, use a concrete id from /v1/models instead — the endpoint lists every id this gateway will accept.
If it does not work
| Symptom | Cause |
|---|---|
| 404 | Base URL has an extra path segment — it should end at /v1 |
| 401 | Key present but wrong, or Cursor is still using its own provider setting instead of yours |
| Model rejected before any request | Cursor validates some names locally; switch to a concrete id from /v1/models |
| Silent fallback to a Cursor model | The custom provider was not selected — check that it is active, not just saved |
Next
Set up in three steps
- Step 1: Open Cursor's settings and find the models panel. Use the panel if the override should apply to this machine only; edit the settings file if you want a configuration you can keep and move between machines.
- Step 2: Turn on the OpenAI override and paste the base URL
https://freemodel.online/v1with yoursk-key. Leave the base at/v1, since Cursor appends/chat/completionsand a base that already carries a path segment gives you a doubled one. - Step 3: Add the model name in the same panel, then select it before you start working. A saved provider is not an active one: if the answers look like they came from Cursor's own default model, the custom entry was never picked.
Getting a key takes one step and no payment: sign in to the console,
open My → API Keys, and create one. It starts with sk-.
What a custom provider actually changes
The override applies to the requests Cursor sends to the OpenAI-compatible provider you configured, which means the model you added to the picker is the model that answers those. What the picker cannot tell you is depth behind a name: the 199 listed models put chat, image, video, speech and embeddings in one list[1], so the same key reaches far past the editor's own work.
A tier alias in that field is worth considering for the same reason it is worth
considering anywhere else. fm-v1-standard is not a model name, it is a
standing instruction to the router, so a slow provider loses the next request instead of
costing you a timeout. The trade is repeatability: two identical prompts may not reach the
same model.
If Cursor refuses a name before sending anything, that is local validation rather than a gateway error. Paste a concrete id from /v1/models and the same request goes through.
Cursor FAQ
Does this replace Cursor's own models?
Why does Cursor reject my model name before any request is sent?
Should the key go in the panel or in the settings file?
Why do answers still look like they come from a Cursor model?
Which base URL is right here, /v1 or /api/gateway?
/v1. Cursor speaks the OpenAI Chat Completions shape and appends /chat/completions, so the base stops before it. /api/gateway is the Anthropic-shaped base and belongs to clients that read ANTHROPIC_BASE_URL.Sources
Every third-party figure quoted on this site was read from the vendor documentation linked below, on the date stated. None of these links are affiliate links and none of these vendors paid to be listed. If a number here disagrees with the page it came from, the page is right — tell us and it gets corrected.
- OpenRouter — credit-purchase fees and free-model rate limits
- OpenRouter — rate-limit reference
- OpenRouter — public model list
- LiteLLM — licence, deployment options and supported models
- Cloudflare AI Gateway — features and pricing
- Vercel AI Gateway — features
- Portkey — plans
- Helicone — plans
- Model Context Protocol — specification
- OpenAI Python SDK — base_url and OPENAI_BASE_URL
- Anthropic Messages API — request format
Where the percentages come from
Every share quoted on this site is counted from the live model list, not estimated. Divide the two counts in the last column, round to the nearest whole percent, and you get the number in the first.
| Share | Of what | Count |
|---|---|---|
| 77% | are chat models | 153 of 199 listed entries |
| 9% | generate images | 18 of 199 listed entries |
| 23% | are not chat models | 46 of 199 listed entries |
| 3% | are modality routes | 6 of 199 listed entries |
| 17% | carry a context length | 34 of 199 listed entries |
[1] Counted on 29 September 2026 from GET https://freemodel.online/v1/models, which needs no key and no account. Every row uses all 199 listed entries as the denominator, because the only thing the endpoint states for every entry is its modality. It no longer publishes per-model capability flags such as tool calling or reasoning, so this site quotes no shares for them. Fetch the list and recount whenever you want to check the arithmetic.
Troubleshooting Cursor + FreeModel
- Requests go to the official API: the base URL override lives in the provider settings, not the model name. Check that the override is enabled and the URL ends with
/v1. - Model not found: the model name must exist on the gateway. Test it with a minimal request before setting it in the IDE.
- Streaming stops mid-answer: usually a proxy or corporate network buffering the response; test from a terminal with the same key.
- Key works in curl but not in the IDE: the IDE may be reading an environment variable that overrides the settings file.
Rule of thumb: if a request fails, reproduce it with curl first. That separates gateway problems from IDE configuration problems in one step.