Tool integration · OpenAI Chat Completions
Use TokenRa in Cursor
Cursor can send its chat requests to an OpenAI-compatible endpoint instead of OpenAI. With TokenRa's base URL and your key, the models you add appear in Cursor's Chat and Agent. Tab completion keeps using Cursor's own model.
- Base URL
https://tokenra.io/v1- API format
- OpenAI Chat Completions
- Setting
- Cursor Settings → Models
- Works in
- Chat, Agent
Before you start
Before you start
- A TokenRa API key: create an account, then add a key on the API Keys page of the console. Keys start with
sk-. - Cursor, installed from cursor.com.
Configure
Add TokenRa in Cursor
- Open Cursor Settings with the gear icon in the top-right corner, or press
Ctrl+Shift+J(Cmd+Shift+Jon macOS). - Open Models and scroll down to API Keys.
- Under OpenAI API Key, paste your TokenRa key and switch the key on.
- Turn on Override OpenAI Base URL and enter
https://tokenra.io/v1. - Add a custom model whose name is a TokenRa model ID, for example
deepseek-v4.1-flash, and make sure it is enabled. Cursor sends the name exactly as you type it. - Open Chat (
Ctrl+L,Cmd+Lon macOS) or Agent, pick the model and send a message.
| Field | What to put in |
|---|---|
| OpenAI API Key | Your TokenRa key (sk-...) |
| Override OpenAI Base URL | https://tokenra.io/v1, with /v1 |
| Custom model name | A TokenRa model ID, for example deepseek-v4.1-flash |
Scope
What runs on TokenRa
- Chat and Agent use the TokenRa model you pick.
- Tab completion keeps using Cursor's own model: Cursor's documentation says custom API keys only work with chat models.
- Requests come from Cursor's servers. Cursor builds the final prompt on its backend and calls TokenRa with your key from there. Cursor says it does not store the key.
- The override applies to every OpenAI-format request. While it is on, Cursor also sends its own OpenAI-family models to TokenRa, where they fail. Turn the override off when you go back to Cursor's built-in models.
Sources: Cursor docs on API keys and a Cursor forum thread in which Cursor staff confirmed the routing (September 2026).
Models
Models to use
Cursor calls TokenRa through OpenAI Chat Completions. On 2026-10-29 every model below completed a streamed tool-call round trip on https://tokenra.io/v1/chat/completions: it called a tool, received the result and answered from it.
| Model | Model ID |
|---|---|
| DeepSeek V4.1 Flash | deepseek-v4.1-flash |
| DeepSeek V4.1 Flash 1017 | deepseek-v4.1-flash-1017 |
| MiniMax M3.1 Flash | minimax-m3.1-flash |
| MiniMax M3 | minimax-m3 |
| GLM-5.3 | glm-5.3 |
| GLM-5.3 Flash | glm-5.3-flash |
| GLM-5.3 FlashX | glm-5.3-flashx |
| Kimi K3 | kimi-k3 |
| Kimi K3.1 Pro | kimi-k3.1-pro |
| Qwen3.8 Max | qwen3.8-max |
| Qwen3.8 Flash | qwen3.8-flash |
| MiMo V2.5 | mimo-v2.5 |
| Omen Alpha | omen-alpha |
gemini-3.8-flash cannot be used here: its upstream rejects every request that carries tool definitions (HTTP 400), and coding agents send tools with every request.FAQ
FAQ
Cursor's own models stopped working
That is the override at work: it sends every OpenAI-format request to TokenRa. Turn Override OpenAI Base URL off while you use Cursor's models and back on for TokenRa models.
HTTP 401 or HTTP 503 model_not_found
401 means the key is wrong or the base URL lacks /v1. 503 model_not_found means the custom model name is not a TokenRa model ID; copy it from the model list.
Does Tab completion use TokenRa?
No. Tab completion always runs on Cursor's own model.
Does TokenRa's zero data retention cover Cursor?
It covers the TokenRa part of the trip (see Zero data retention). The request also passes through Cursor's servers, and Cursor's documentation says its own Zero Data Retention policy does not apply when you use your own API key.
Where can I see usage and cost?
Every request is listed under Usage Logs in the console, with its model, tokens and cost. Live rates are on the Model Square.