Editor extensions and IDEs

Use Cursor with free models

Cursor is an AI code editor built on VS Code.

•Settings taken from the router's own recipes

Quick answer

Install Free-LLM Router, then give Cursor its address. Where: Settings → Models → OpenAI API Key. Model: auto:coding.

Why Cursor and free plans need a go-between

Cursor accepts a custom OpenAI base URL, with a catch that is easy to miss: it calls that address from its own servers, not from your computer. An address on localhost therefore cannot be reached. The router has to be reachable from the internet, through a tunnel or on a server.

Option 1: through Free-LLM Router

The router is a small open-source program that runs on your computer. Tools talk to one local address; behind it, 397 free models from 69 providers are available, depending on the free keys you add.

1. Install Free-LLM Router

One line, no admin rights, and no Node.js to set up first: the installer brings a private copy if you have none. The first run sends a real question to a free model and shows the answer before asking you for anything.

Windows (PowerShell)

irm https://free-llm.com/install.ps1 | iex

macOS / Linux

curl -fsSL https://free-llm.com/install.sh | sh

2. Add two or three free keys

Optional to start: guest mode answers with no key, slowly. For real work, add free keys in the dashboard at http://localhost:4000 (Google AI Studio, Groq and OpenRouter need no card). Each key is tested when you paste it. The API keys page shows where to click for each provider.

3. Make the router reachable

Either expose it with a tunnel, for example cloudflared tunnel --url http://127.0.0.1:4000, or run it on a server with free-llm start --host 0.0.0.0. Every request then needs the router key, and the dashboard asks for it too.

4. Enter it in Cursor

In Settings → Models → OpenAI API Key, paste the router key, switch on Override base URL with your public address followed by /v1, and add the model auto:coding.

The exact settings

Replace YOUR_ROUTER_KEY with the router key shown on the first screen of the dashboard (or by free-llm config). It is created on your computer at install; there is nothing to sign up for.

Settings → Models → OpenAI API Key
  • API key:            YOUR_ROUTER_KEY
  • Override base URL:  http://127.0.0.1:4000/v1
  • Add model:          auto:coding

Note: Cursor calls custom endpoints from its own servers, so a router on localhost
is not reachable — run the router on a server, or expose it with a tunnel
(e.g. cloudflared tunnel --url http://127.0.0.1:4000).

The same text is printed on your machine, with your real address and key filled in, by free-llm connect and on the dashboard's Connect your tools page.

Good to know

  • The block below shows the localhost address for reference. In Cursor, replace it with the tunnel or server address.

What happens when a free plan runs out

Free plans are small: a few requests per minute, a daily cap, sometimes a size limit per request. When a provider answers with a rate limit, an exhausted quota, an error or a timeout, the router sends the same request to the next free model that is up. Cursor receives a normal answer and never sees the error. The Activity page of the dashboard shows which model answered each request and what was skipped on the way.

Option 2: one free provider, directly

A hosted provider is reachable from Cursor's servers, so the direct path is simpler here: paste one provider's base URL from the table as the override, your key for it, and add one of its model ids.

Free OpenAI-compatible providers today
Provider Sign-up Free limits Free models Base URL
Google AI Studio No card 5-30 RPM (varies by model) 8 https://generativelanguage.googleapis.com/v1beta/openai
Groq No card 30 RPM, 1,000 requests/day 6 https://api.groq.com/openai/v1
OpenRouter No card 20 requests/minute 14 https://openrouter.ai/api/v1
NVIDIA NIM Phone check 40 requests/minute 16 https://integrate.api.nvidia.com/v1
Cloudflare Workers AI No card Varies by model 16 https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/v1
Cohere No card 20 requests/minute 10 https://api.cohere.ai/compatibility/v1
Kilo AI Gateway No card 200 requests/hour per IP on free models (works without an account) 11 https://ai-gateway.kilo.ai/api/v1

Live from the Free-LLM directory, December 5, 2026. Limits change often: the provider page has the details and the sources. All free APIs

The trade-off is simple. One provider means one set of limits: when it says "too many requests", you wait. The router keeps several of these plans behind the same address, so the wait becomes a switch.

Cursor: common questions

Why does Cursor not reach http://127.0.0.1:4000?
Because the request is sent by Cursor's servers, not by the editor on your machine. From there, 127.0.0.1 is not your computer. Use a tunnel or a server address.
Is it safe to expose the router?
When it listens beyond localhost, every request must carry the router key and the dashboard asks for it. Keep that key private, as you would any API key.
Which Cursor features use the custom model?
The ones that let you choose a model from your list. Add auto:coding under Models and select it where Cursor offers the choice.

Other tools on free models