Cursor
Connect CodaAPI through Cursor's built-in model settings with OpenAI API Key and Override OpenAI Base URL, and which features don't use your own key.
Cursor is an AI editor based on VS Code. Its model settings let you enter your own OpenAI key and replace the OpenAI address with another OpenAI-compatible one, which is how you connect it to CodaAPI. This route has quite a few limits (see Which features don't use your own key below); to use Claude models in Cursor, we recommend installing the Claude Code extension instead.
Not tested: this page follows Cursor's official help article "Bring your own API key" and answers from Cursor staff on the official forum (forum.cursor.com), checked on November 30, 2026 (the forum threads concern Cursor 3.x). It hasn't been tested on CodaAPI yet. Cursor's official documentation doesn't describe the custom-address steps, so that part is based on the forum answers and may change when Cursor updates.
What to fill in
| Item | Value |
|---|---|
| Provider type | OpenAI API Key, with Override OpenAI Base URL turned on |
| Address | https://codaapi.com/v1, including /v1 |
| Key | The sk-… you copied from API Keys in the console |
| Model | Added manually, for example gpt-5.4-mini |
Setup
- Open Cursor Settings → Models.
- Find OpenAI API Key, paste your CodaAPI key, and turn its switch on.
- Turn on Override OpenAI Base URL and change the address to
https://codaapi.com/v1. When you turn it on, it fills in OpenAI's official address, so remember to replace it. - Add a model: type the model name, for example
gpt-5.4-mini, into the search field of the model list and click Add Custom Model. Refresh Model List only refreshes Cursor's own model catalog and doesn't fetch models from CodaAPI, so add every model you want to use this way. - Select the model you just added in a chat and send a message. The matching request shows up in the console's Usage Logs.
Which features don't use your own key
According to Cursor's official help article:
- Your own key is used for chat models only. Tab completion still uses Cursor's own models and isn't sent to CodaAPI.
- Requests go through Cursor's servers, which build the final prompt, so your key is sent to Cursor's backend with every request (Cursor says it isn't stored). This means CodaAPI sees requests coming from Cursor's servers, not from your computer.
According to answers from Cursor staff on the official forum:
- Override OpenAI Base URL is global. Once it's on, requests for every model other than Claude and Gemini go to the address you entered, including GPT models picked from Cursor's built-in list. Models hosted by Cursor itself, such as Composer and Grok, fail with "This model does not support custom API keys".
- Claude and Gemini models only use their own Anthropic and Google key settings and aren't affected by this address, so CodaAPI's Claude models can't be used this way. To use Claude in Cursor, install the Claude Code extension.
- To switch back to Cursor's own models, turn off the OpenAI API Key switch. You can also run Toggle OpenAI key from the Command Palette (
Ctrl+Shift+0, orCmd+Shift+0on macOS); the key and address are kept. Start a new chat after switching.
Which models to use
- Use OpenAI models. The ones confirmed to work on the forum are
gpt-5.4andgpt-5.4-mini, which are in theOpenAI-官转group. - Cursor may handle a model whose name matches one of its built-in models in its own way. For example, it turns requests for some GPT-5 models into a Responses-format body and then sends that to the Chat Completions address, which CodaAPI rejects. If that happens, use another model.
- The model must be in your key's group. For the models in each group, see Groups; for prices, see Model Square.
FAQ
Should the address include /v1?
Yes: https://codaapi.com/v1. The relay addresses Cursor staff give all include /v1. Without /v1 the request doesn't reach the endpoint.
My key has an IP whitelist and Cursor keeps failing
Cursor's requests come from its own servers, not from your computer. Don't set IP Whitelist (supports CIDR) on a key you use with Cursor.
Cursor's own models stopped working after I turned on the address override
That's how Cursor currently behaves; see Which features don't use your own key above. Turn off OpenAI API Key when you use Cursor's own models, and turn it back on for CodaAPI's models.
It says the model doesn't exist or isn't configured in your groups
The model name must match Model Square exactly and be in your key's group. GPT models picked from Cursor's built-in list are sent to CodaAPI too, and fail the same way if CodaAPI doesn't have them. For each status code, see Error codes.