Guide

Use Cursor with a free LLM API

Cursor can send chat requests to your own OpenAI API key. This guide shows how to connect that key to free models through FreeLLMAPI. It also tells you the limits. Cursor routes each request through its own servers, and Tab completion always uses Cursor's models.

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 featureWith your own keySource
Chat with a standard OpenAI-style modelYes. Cursor documents own OpenAI keys for standard, non-reasoning chat models.Cursor API keys help page
Tab completionNo. Cursor says that Tab continues to use Cursor's built-in models.Cursor API keys help page
Agent mode and ComposerNot confirmed. Cursor's docs only name chat models. Test it on your plan before you depend on it.Not documented
Requests from localhostNo. 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.

Note: if you want a free editor agent with no plan rules, use Cline, Roo Code or Kilo Code in VS Code. These connect to 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 | bash

Copy 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-cursor

This command writes no file. Cursor has no config file for this setting, so you enter the values in the Cursor settings.

Security: a public URL lets anyone who has your unified key use your free quotas. Never share the key. If your tunnel cannot send an 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

  1. Open Cursor Settings.
  2. Open Models.
  3. Find the OpenAI API key field. Paste your FreeLLMAPI unified key. Click Save.
  4. Turn on the OpenAI base URL override. The FreeLLMAPI guide names this setting Override OpenAI Base URL.
  5. Enter your public address with /v1 at the end, for example https://<your-tunnel-host>/v1.
  6. 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.

Important: the override is global while it is on. Turn it off before you change back to Cursor's built-in providers.

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.

Free models for Cursor chat: tool calling and 128K+ context
ModelFree onContextFree limits (best offer)ToolsVision
GLM 5.3UnoRouter1M1 req/min
1 req/min per model
YesNo
GLM 5.3 FlashNVIDIA NIM, UnoRouter1M40 req/min
40 RPM
YesYes
Gemini 3.8 FlashGoogle AI Studio1MRecurring provider quotaYesYes
Qwen3.8 Flash NextAMD Radeon Cloud262KRecurring daily account allowanceYesNo
Qwen3.8 FlashElectronHub1M$0.25/week shared recurring creditYesYes
Gemini 3.7 FlashGoogle AI Studio1M10 req/min
20 req/day
250,000 tokens/min
~3M
YesYes
GPT-5.6 LunaElectronHub1M$0.25/week shared recurring creditYesYes
Dots3 Note PreviewKilo Gateway, OpenRouter512K20 req/min
50 req/day
50 req/day account-wide (1,000 after a $10 purchase)
YesYes
DeepSeek V4 FlashAMD Radeon Cloud, BazaarLink, ElectronHub1M10 req/min
50 req/day
Shared rate limit
YesNo
Qwen3.8 27BElectronHub, Groq, OVH AI Endpoints262K30 req/min
250 req/day
70,000 tokens/min
~6M
YesYes

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:fast for short questions and auto:smart for difficult code questions.
  • Start a new chat for each task. A shorter history sends fewer tokens.

Troubleshooting

ProblemCauseFix
Cursor cannot connect to http://localhost:3001/v1Cursor sends requests from its servers, not from your computerUse a public HTTPS address for the gateway
No option for an own keyYour Cursor plan does not include own API keysCheck the plan table on Cursor's pricing page
401 "Invalid API key"The key in Cursor is not your FreeLLMAPI unified keyCopy the unified key again from the Keys page
Tab completion does not use the gatewayCursor always uses its own models for TabNo fix. Use Continue in VS Code for free autocomplete
"All models rate-limited after N attempts"All keys in the chain are at their limitAdd keys from more providers, or wait for the cooldowns
Built-in models stop workingThe base URL override is still onTurn off the override
Use every one of these through one key. FreeLLMAPI is an open-source, self-hosted router that puts all these free tiers behind a single OpenAI-compatible endpoint and fails over when one is rate-limited. Browse the catalog or go live.

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.

Sources

All guides · Browse all free models

Keep reading

All posts →
Guide

Best free LLM APIs 2026

Ten genuinely free LLM APIs worth using — ranked, with real limits.

Guide

Unlimited free AI tokens?

No free AI API is unlimited. The closest real thing: 10.1 billion free tokens a month behind one key.

Guide

How to get a free LLM API key

Get a working key in minutes — no credit card required.