Cursor on one key
Paste the RelaySwitch key as Cursor's OpenAI API key, override the base URL, and every chat model on the key is in the picker. Agent mode and Ask mode both work.
Cursor sends OpenAI-format requests, and every chat model on the Models page answers that format. So one key covers Claude, GPT, Gemini, DeepSeek and Kimi in the same picker, each at its live per-token price, billed to a prepaid balance.
01Where the settings are
Cursor Settings (Cmd/Ctrl + ,) → Models. The key and base URL fields sit under the model list.
02Steps
- Turn on OpenAI API Key and paste your RelaySwitch key from the console.
- Turn on Override OpenAI Base URL and enter
https://api.relayswitch.io/v1, with the/v1at the end. - Click Save. (Older Cursor versions label the button Verify.)
- Under Models, add the ids you want. Any id on the Models page works, Claude included:
claude-sonnet-5-5claude-opus-5-5gpt-5.5deepseek-v4-prokimi-k3Pick one in the chat panel. Ask and Agent mode both work.
03What each setting does
- OpenAI API Key is the credential Cursor sends with each request. Paste the whole key from the console.
- Override OpenAI Base URL sends those requests to
https://api.relayswitch.io/v1instead of OpenAI. - Models is the list the picker offers. Add each id you want to use there, exactly as the Models page shows it (
claude-sonnet-5-5, not the display name).
04Picking a model
Agent requests carry the conversation, the files Cursor read and the tool results, so input tokens are most of the bill. A model with a low input price costs the least per request; of the ids above, DeepSeek V4 Pro 0423 is the lowest at $0.792 per million input tokens today. Each model page lists input, cached input and output per million tokens.
claude-sonnet-5-5: $1.20 in, $3.00 outclaude-opus-5-5: $2.80 in, $10.00 outgpt-5.5: $1.80 in, $9.00 outdeepseek-v4-pro: $0.792 in, $2.376 outkimi-k3: $0.90 in, $4.50 out
05Agent mode and GPT models
With the base URL override on, Cursor's Agent mode sends GPT models (ids starting with gpt-) a Responses API body at the Chat Completions path. Cursor lists this as a known issue in its forum.
The gateway reads that body as the Chat Completions request it stands for and answers in Chat Completions format, streaming or not. GPT ids work in Agent mode and Ask mode alike, at the same price.
06Check it
List the models your key can call:
curl https://api.relayswitch.io/v1/models -H "Authorization: Bearer YOUR_RELAYSWITCH_KEY"Then send one request the way Cursor does. -i prints the headers: the request id, and on a non-streamed answer the charge in USD.
curl -i https://api.relayswitch.io/v1/chat/completions \ -H "Authorization: Bearer YOUR_RELAYSWITCH_KEY" \ -H "content-type: application/json" \ -d '{"model": "gpt-5.5", "messages": [{"role": "user", "content": "Say ok."}]}'In Cursor, send a message with one of your ids selected. The request shows on the console's Usage page with its tokens and its charge.
07Billing and caching
- Requests bill per token at the model's price, from your prepaid balance.
- When a response reports cached input tokens, they bill at the model's cached rate instead of the input rate. A long chat that repeats the same prefix costs less per turn than a fresh one.
- On Cursor Teams and Enterprise plans, Cursor counts own-key requests against its usage and adds its own per-token fee. That fee is billed by Cursor, not here. Individual plans are not counted (Cursor's API key docs).
08Errors and fixes
401 invalid_api_key: the key is wrong or revoked. Copy it again from the console.404 model_not_found: the id in the picker is not on the Models page. Check for a typo or a display name where the id should be.402 insufficient_balance: top up in the console; the key works again at once.- The Verify step fails: the base URL is missing the
/v1, or a VPN or proxy blocks the request. Run the curl above from the same machine.