Cursor

Override the OpenAI base URL and add the models you want.

Checked 2026-10-17

·All guides·Models

Where the settings are

Cursor Settings (Cmd/Ctrl + ,) → Models. The key and base URL fields sit under the model list.

Steps

  1. Turn on OpenAI API Key and paste your UplinkSwitch key.
  2. Turn on Override OpenAI Base URL and enter https://api.uplinkswitch.com/v1.
  3. Click Save. (Older Cursor versions label the button Verify.)
  4. Under Models, add the ids you want. Any OpenAI-format id on the Models page works, Claude included:
    model ids
    claude-sonnet-5-5
    claude-opus-5-5
    deepseek-v4-pro-0813
    gpt-6.1-sol
  5. Pick one in the chat panel. Ask and Agent mode both work.

What each setting does

  • OpenAI API Key is the credential Cursor sends with each request. Paste the whole sk-uplink-live-... key from the console.
  • Override OpenAI Base URL sends those requests to https://api.uplinkswitch.com/v1 instead of OpenAI. Enter it exactly as shown, with the /v1 at the end.
  • Models is the list the picker offers. Add each id you want to use there.

Picking a model

Cursor sends OpenAI-format requests, and every chat model on the Models page answers in that format. That covers the Claude, GPT, Gemini, DeepSeek and Kimi families from one key. Type the id exactly as the Models page shows it, for example claude-sonnet-5-5, not the display name.

Each model page lists its input, cached input and output price per million tokens. 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. The Cursor cost breakdown works a request through at live prices.

Agent 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 bug 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.

Check it

List the models your key can call:

shell
curl https://api.uplinkswitch.com/v1/models -H "Authorization: Bearer sk-uplink-live-..."

Then send one request the way Cursor does. -i prints the headers: x-uplink-request-id names the request, and on a non-streamed answer x-uplink-charge is what it cost in USD.

shell
curl -i https://api.uplinkswitch.com/v1/chat/completions \
  -H "Authorization: Bearer sk-uplink-live-..." \
  -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.

Billing 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).

Errors 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 the spelling against the page.
  • 402 insufficient_balance: the balance does not cover the request. Top up in the console. 402 monthly_limit_reached means the key hit the monthly spend limit you set on it.
  • 403 scope_denied: the key is limited to certain models and this is not one of them. Pick an allowed id or use a key without the limit.
  • 429 rate_limited: the key hit its rate limit. The response carries retry-after.
  • TLS errors: Settings → Network → HTTP Compatibility Mode → HTTP/1.1.

Good to know

  • The override covers every model in the picker. Switch it off to use Cursor's own.
  • Tab completions always use Cursor's built-in models.
  • Cursor routes own-key requests through its own servers to build the final prompt, and sends the key along with each one. Its docs say the key is not stored, and that Cursor's Zero Data Retention policy does not apply to own-key requests.

Questions

Can I use Claude in Cursor with this key? Yes. The Claude models answer in the OpenAI format too, so add claude-sonnet-5-5 or claude-opus-5-5 under Models and pick it in chat.

Does it change Cursor's own models? While the override is on, every model in the picker goes to UplinkSwitch. Switch it off to use Cursor's own models again.

Can I use the same key in other tools? Yes, and they share the balance. Create a key per tool in the console if you want to see Cursor's spend on its own. The other guides cover Claude Code, Cline, OpenCode and more.