What works and what does not work
Read this section before you start. Cursor's support for own keys is narrower than in most other editors.
| Cursor feature | With your own key | Source |
|---|---|---|
| Chat with a standard OpenAI-style model | Yes. Cursor documents own OpenAI keys for standard, non-reasoning chat models. | Cursor API keys help page |
| Tab completion | No. Cursor says that Tab continues to use Cursor's built-in models. | Cursor API keys help page |
| Agent mode and Composer | Not confirmed. Cursor's docs only name chat models. Test it on your plan before you depend on it. | Not documented |
| Requests from localhost | No. Cursor sends all requests through its servers for prompt building, so localhost on your computer is not in the path. | Cursor API keys help page |
Plans are also important. Cursor's pricing page lists third-party models and own API keys on the Premium, Super and Ultra plans. It says that the Plus plan has no own API keys. For the Free plan, the page lists third-party models as not available. Check the pricing page for your plan before you continue.
localhost directly. Read Cline, Roo Code and Kilo Code with a free API.Step 1: Install FreeLLMAPI and make it reachable
FreeLLMAPI is open source and runs on your computer in Docker. Install it, then add at least two free provider keys on the Keys page.
Install on macOS or Linux
curl -fsSL https://freellmapi.co/install.sh | bashCopy your unified key from the Keys page. Then give the gateway a public HTTPS address, because Cursor's servers cannot reach your localhost. Use a trusted HTTPS tunnel or a server that you control. The FreeLLMAPI guide for Cursor prints these steps:
Print the Cursor guide
npx freellmapi setup-cursorThis command writes no file. Cursor has no config file for this setting, so you enter the values in the Cursor settings.
Authorization header, make a separately revocable URL token on Keys, Agents. Revoke it when you stop.Step 2: Set the key and base URL in Cursor
- Open Cursor Settings.
- Open Models.
- Find the OpenAI API key field. Paste your FreeLLMAPI unified key. Click Save.
- Turn on the OpenAI base URL override. The FreeLLMAPI guide names this setting Override OpenAI Base URL.
- Enter your public address with
/v1at the end, for examplehttps://<your-tunnel-host>/v1. - Select a model in the model picker and send a short chat message.
Cursor's privacy docs mention the OpenAI-compatible base URL override. Cursor does not document the exact steps. The labels in your version can be different.
To make sure that the requests come to the gateway, open the dashboard request log. Each response also has an X-Routed-Via header that shows the provider and model that answered.
Step 3: Choose models
Use the model id auto to let the router select a free model for each request. You can also use a catalog id from GET /v1/models. Cursor's chat sends file context with each message, so use models with a large context window. The table shows free models with tool calling and at least 128K context today.
| Model | Free on | Context | Free limits (best offer) | Tools | Vision |
|---|---|---|---|---|---|
| GLM 5.3 | UnoRouter | 1M | 1 req/min 1 req/min per model | Yes | No |
| GLM 5.3 Flash | NVIDIA NIM, UnoRouter | 1M | 40 req/min 40 RPM | Yes | Yes |
| Gemini 3.8 Flash | Google AI Studio | 1M | Recurring provider quota | Yes | Yes |
| Qwen3.8 Flash Next | AMD Radeon Cloud | 262K | Recurring daily account allowance | Yes | No |
| Qwen3.8 Flash | ElectronHub | 1M | $0.25/week shared recurring credit | Yes | Yes |
| Gemini 3.7 Flash | Google AI Studio | 1M | 10 req/min 20 req/day 250,000 tokens/min ~3M | Yes | Yes |
| GPT-5.6 Luna | ElectronHub | 1M | $0.25/week shared recurring credit | Yes | Yes |
| Dots3 Note Preview | Kilo Gateway, OpenRouter | 512K | 20 req/min 50 req/day 50 req/day account-wide (1,000 after a $10 purchase) | Yes | Yes |
| DeepSeek V4 Flash | AMD Radeon Cloud, BazaarLink, ElectronHub | 1M | 10 req/min 50 req/day Shared rate limit | Yes | No |
| Qwen3.8 27B | ElectronHub, Groq, OVH AI Endpoints | 262K | 30 req/min 250 req/day 70,000 tokens/min ~6M | Yes | Yes |
Showing 10 of 109 matching free models. See all models.
Live data from the FreeLLMAPI catalog (version 2026.11.19, checked 19 November 2026). Free limits change often. The catalog is checked every day.
Cursor documents own OpenAI keys for non-reasoning chat models. Reasoning models can fail through the override. If a model fails, use auto or a different model from the table.
Rate limits and failover
Each free tier has limits per minute and per day. FreeLLMAPI counts each key's use. When one provider sends a 429 error, the router sends the request to the next model in your fallback chain. The chat continues and you do not change settings in Cursor.
- Add keys from four or more providers. More providers give more requests per day.
- Use
auto:fastfor short questions andauto:smartfor difficult code questions. - Start a new chat for each task. A shorter history sends fewer tokens.
Troubleshooting
| Problem | Cause | Fix |
|---|---|---|
Cursor cannot connect to http://localhost:3001/v1 | Cursor sends requests from its servers, not from your computer | Use a public HTTPS address for the gateway |
| No option for an own key | Your Cursor plan does not include own API keys | Check the plan table on Cursor's pricing page |
401 "Invalid API key" | The key in Cursor is not your FreeLLMAPI unified key | Copy the unified key again from the Keys page |
| Tab completion does not use the gateway | Cursor always uses its own models for Tab | No fix. Use Continue in VS Code for free autocomplete |
| "All models rate-limited after N attempts" | All keys in the chain are at their limit | Add keys from more providers, or wait for the cooldowns |
| Built-in models stop working | The base URL override is still on | Turn off the override |
Frequently asked questions
Can I use Cursor for free with my own API key?
Cursor's pricing page lists own API keys on the Premium, Super and Ultra plans, and says the Plus plan has no own keys. On a plan with own keys, FreeLLMAPI gives the chat free models, so inference costs $0.
Why does Cursor not connect to localhost?
Cursor sends all requests through its own servers for prompt building. Those servers cannot reach localhost on your computer, so the gateway needs a public HTTPS address.
Does Cursor Tab autocomplete work with a custom API?
No. Cursor's docs say that custom API keys only work with chat models, and Tab completion continues to use Cursor's built-in models.
Which free model is best for Cursor?
Use auto, or a model with tool calling and at least 128K context from the table on this page. Cursor sends file context with each message, so a large context window is important.
Is my code sent to Cursor when I use my own key?
Yes. Cursor says that requests go through its servers for final prompt building. Zero Data Retention does not apply when you use your own keys.
Related guides
- Free AI models in VS Code
- Cline, Roo Code and Kilo Code with a free API
- Continue with a free LLM API
- Best free coding model APIs
- Free OpenAI-compatible API base URLs
Sources
- Cursor help: API keys (checked 20 November 2026)
- Cursor docs: models and pricing (checked 20 November 2026)
- Cursor docs: privacy and data governance (checked 20 November 2026)
- FreeLLMAPI docs: clients and coding agents (checked 20 November 2026)
- FreeLLMAPI CLI generators (checked 20 November 2026)