Cursor

A dedicated service for the Cursor editor: its own endpoint, its own key, ready-made model names and plans paid from your credit balance.

View as Markdown

Cursor lets you point its OpenAI integration at any compatible endpoint, but what it sends through that override is not plain Chat Completions: depending on the version and the model name it mixes in Responses-API fields, flat tool definitions and grammar tools, expects strictly shaped streaming chunks back, and treats names containing a vendor differently. The Cursor service absorbs all of that so Agent, Ask, Edit, tool calls, images and reasoning models simply work.

Set up in five steps

1. In the dashboard open Services → Cursor and buy a plan. You get a Cursor key (shown once) and the model names to add. One plan is one key for one developer; teams buy one per person.

2. In Cursor press Ctrl/Cmd + Shift + J, open Models → API Keys. You need an active Cursor Pro (or higher) subscription — Cursor only allows custom models on paid plans.

3. Turn on Override OpenAI Base URL and paste the Cursor base URL. Turn on OpenAI API Key and paste your Cursor key. Leave the Anthropic and Google key toggles off.

Override OpenAI Base URL:  https://cursor.elevenrouter.com/v1
OpenAI API Key:            sk-er-cursor-v1-…   (from Services → Cursor)

4. Under Model Names add the names listed on your Services page (for example er-sonnet-5, er-sol-5.6, er-deepseek-v4-flash) and enable them. Disable Cursor's built-in GPT names if you do not want them routed here too.

5. Click Verify. ElevenRouter answers the test request instantly and free, and your Services page shows the plan as connected. Pick a model in the chat or agent panel and start.

Why the model names look the way they do

Cursor decides how to build a request from the model name. Names containing anthropic, claude, openai, gpt, gemini or vertex switch it to vendor-specific payloads or make it reject the model outright, and tool calls stop working. ElevenRouter therefore exposes every model under a neutral alias such as er-opus-5. The dashboard lists the official model each alias stands for, and responses echo the alias you asked for.

Plans, allowances and limits

Plans are defined by the platform and paid from your credit balance, so every top-up method, promo code and invoice works for them. A plan is a combination of:

termrecurring · fixed · open-ended
Recurring plans renew automatically from your balance; fixed plans (e.g. 24 hours) simply end; open-ended packs last until the allowance is used up.
allowanceUSD or unlimited
Usage is valued at official model rates (times the plan’s rate multiplier) and consumed from the allowance. Nothing is charged to your balance per request.
limitsfair use
Requests per minute, concurrent requests, tokens per day and a maximum output length, per plan.
modelsall or selected
Which aliases the plan may use. Asking for anything else returns a clear error listing the names to add.

When the allowance is used up requests are refused with 402 service_allowance_exhausted until the plan renews (or you renew early from the dashboard). If a renewal cannot be paid the plan keeps working for a grace period while you top up; after that it ends and its key stops working.

What works inside Cursor

Ask, Agent, Edityes
Streaming, tool calls (nested, flat and grammar-style custom tools such as ApplyPatch), multi-turn tool results.
Imagesvision models
Pasted or attached images reach vision models. For text-only models the image is replaced by a short note instead of failing the request.
Reasoning modelsyes
Thinking is streamed as reasoning_content. Cursor decides whether to show a thinking panel based on the model name; for custom names it often does not, which is a Cursor limitation.
Long sessionscompacted
Cursor assumes custom models have a 1M-token window. When a chat outgrows the real model context, the oldest middle turns are compacted (middle-out) so the session continues.
Tab, Composer, cloud agents, Bugbot, CLICursor’s own servers
These never use custom keys; Cursor routes them itself.

The endpoint

The Cursor base URL serves exactly what Cursor needs and nothing else. It accepts only Cursor keys (sk-er-cursor-v1-…); regular API keys are refused with cursor_key_required, and Cursor keys are refused by the regular API with service_key_not_accepted. Common base-URL mistakes get a 404 that says how to fix them.

# Model names your plan grants (what to add in Cursor)
curl https://cursor.elevenrouter.com/v1/models -H "Authorization: Bearer $CURSOR_KEY"

# What Cursor calls (any of Cursor's request shapes is accepted)
curl https://cursor.elevenrouter.com/v1/chat/completions \
  -H "Authorization: Bearer $CURSOR_KEY" -H "Content-Type: application/json" \
  -d '{"model":"er-sonnet-5","messages":[{"role":"user","content":"hi"}],"stream":true}'

Troubleshooting

Verify keeps spinning
Make sure the OpenAI API Key toggle is on (not just filled in) and the base URL ends in /v1 with nothing after it. In Cursor Settings → Network try HTTP Compatibility Mode = HTTP/1.1.
"Model name is not valid"
Use the alias exactly as listed on your Services page; do not add vendor names of your own.
404 cursor_base_url_misconfigured
The URL you pasted has /chat/completions or a second /v1 at the end. Paste the base URL exactly as shown.
Requests for gpt-… go to ElevenRouter
While the override is on, Cursor sends every OpenAI-style model there, including built-in names you left enabled. Disable them, or ask us to map them to your plan.
402 service_allowance_exhausted
The plan’s allowance for this period is used up. Renew early or pick a bigger plan on the Services page.
Key lost
Keys are shown once. Regenerate from the Services page; the old key stops working immediately.