Skip to content
StatusGet API key

Cursor

Cursor can send chat requests to any OpenAI-compatible API through its OpenAI API key setting with a custom base URL.

In Cursor’s settings, open the Models section and:

  1. Turn on the OpenAI API Key option and paste your TOKEN key (tkn_...).
  2. Turn on Override OpenAI Base URL and enter https://api.thetoken.dev/v1.
  3. Add a custom model with a TOKEN model ID, for example zai-org/glm-5.3 or moonshotai/kimi-k3, and select it in the chat.

Cursor’s settings screens change between versions; if a name differs in your version, look for the OpenAI API key and base URL settings in the models or API keys section.

Check these against Cursor’s own documentation for your version:

  • Cursor’s servers send the requests. With your own key, Cursor still builds the prompt and calls the base URL from its own backend, so your key and your code pass through Cursor on the way to TOKEN.
  • Not every feature uses your key. Features that run on Cursor’s own models (such as Tab completion) keep using them, and some modes may not accept a custom key or base URL at all.
  • The override is global. While it is on, Cursor sends OpenAI-model requests to TOKEN too; TOKEN does not serve OpenAI’s hosted models such as GPT-5, so turn the override off to use them.

For chat about code, a reasoning model with tool calling works best: moonshotai/kimi-k3, zai-org/glm-5.3 or deepseek/deepseek-v4-pro. For quick questions, zai-org/glm-5.3-flash or deepseek/deepseek-v4.1-flash cost less. Prices are on the models page.