Cursor can send chat requests with your own OpenAI-format key. Point that key at Yunshu Router and Cursor’s chat runs on the model you choose, billed per token to your prepaid balance.
What you need
- A Yunshu Router account with credit on the balance.
- An API key from the console. Use a separate key for Cursor.
Set it up
-
Create a key in the console (API keys → Create key) and copy it.
-
In Cursor, open Cursor Settings → Models.
-
Under the OpenAI API key, paste your Yunshu Router key.
-
https://api.yunshurouter.com/v1Keep the
/v1. Cursor adds/chat/completionsafter it. -
Add a custom model with the model ID, for example
deepseek-v4-pro, exactly as it appears on our models page. -
Cursor sends a test request with the key.
-
In the chat panel’s model picker, choose the model you added.
Settings at a glance:
OpenAI API Key: YOUR_YUNSHU_KEY
Override OpenAI Base URL: https://api.yunshurouter.com/v1
Add model: deepseek-v4-pro (then Verify)
Check it works
- Open a new chat, pick your model and ask a short question.
- In the console, open Usage: the request appears under the Cursor key with its model and cost.
If Verify fails, test the key outside Cursor:
curl https://api.yunshurouter.com/v1/models -H "Authorization: Bearer YOUR_YUNSHU_KEY"
A JSON list of models means the key works and the problem is in Cursor’s settings.
Recommended models
| Model ID | Use it for |
|---|---|
deepseek-v4-pro |
Everyday chat about code at a low price |
glm-5.3 |
Quick questions and edits |
kimi-k3 |
Long questions over many files |
Set a budget on the key
In the console, open API keys, pick the Cursor key and set a monthly budget, a model
allow-list with the models you added, and a budget alert. A request that would pass the
budget is refused with 402 budget_exceeded, so Cursor shows an error instead of spending more.
Known limitations
- Tab completion never uses your key. Cursor states that Tab always runs on Cursor’s own models.
- Chat only. Cursor’s help page says own keys work with chat models.
- Requests go through Cursor’s servers. Cursor builds the final prompt on its backend and sends it to us from there, with your key. Your prompts pass through Cursor, and Cursor’s Zero Data Retention setting does not apply to own-key requests.
- The override applies to all OpenAI models in Cursor. While it is on, OpenAI model names in Cursor are sent to us too. Turn it off to go back to Cursor’s own OpenAI access.
- Teams and Enterprise plans add Cursor’s token rate ($0.25 per million tokens) to own-key requests. That charge is Cursor’s, not ours.
Troubleshooting
| What you see | Likely cause | Fix |
|---|---|---|
Verify fails / 401 |
Key mistyped or revoked | Paste the key again; create a new one if you lost it. |
404 on every request |
Base URL without /, or with / |
Use exactly https:/. |
| Model not found | The model ID differs from our catalogue | Copy the ID from the models page. |
403 naming the model |
Model not on the key’s allow-list | Add it in the console. |
402 |
Budget or balance used up | Raise the key’s budget or top up. |
| Tab completions still work but chat fails | Expected: Tab doesn’t use your key | Fix the chat settings above; Tab is unaffected. |
| Tool calls or edits fail in Agent mode | — | Use chat, or switch to a tool listed in integrations that supports custom keys fully (Cline, Roo Code, Kilo Code). |