Yunshu Router speaks the OpenAI and Anthropic APIs. Most coding tools already let you change the base URL and the key, so you can point them at Yunshu Router and pick any model in our catalogue. You pay from one prepaid balance, per token.
Each guide below gives the exact settings, a check that it works, the models we suggest, and fixes for the errors people hit most.
Before you start
- Create an account and add credit to your balance. Prices per token are on each model page.
- In the console, open API keys and create a key for this tool. The full key is shown once, so copy it then.
- Give agent keys a monthly budget (see Set a budget for agents).
Base URLs for each tool
The full reference is the Base URL cheat sheet. The one setting people get wrong is the base URL. Tools that speak the Anthropic API add /v1
themselves; tools that speak the OpenAI API expect you to include it.
| Tool | API format | Base URL | Where to set it |
|---|---|---|---|
| Claude Code | Anthropic Messages | https:/ (no /) |
ANTHROPIC_ in ~/ or your shell |
| Cursor | OpenAI Chat Completions | https:/ |
— |
| Codex CLI | OpenAI Responses | https:/ |
base_ under [model_ in ~/ |
| Cline | OpenAI Chat Completions | https:/ |
Cline settings → API Provider: OpenAI Compatible → Base URL |
| Roo Code | OpenAI Chat Completions | https:/ |
Roo Code settings → API Provider: OpenAI Compatible → Base URL |
| Kilo Code | OpenAI Chat Completions | https:/ |
Settings → Providers → Custom provider → Base URL |
| OpenCode | OpenAI Chat Completions | https:/ |
settings.baseURL in opencode.json |
| Aider | OpenAI Chat Completions | https:/ |
OPENAI_ environment variable |
| Continue | OpenAI Chat Completions | https:/ |
apiBase in ~/ |
| Zed | OpenAI Chat Completions | https:/ |
api_ under language_ in Zed settings.json |
| Python, Node, curl | OpenAI or Anthropic | / for OpenAI SDKs, none for Anthropic SDKs |
base_ / baseURL in the client |
Your key goes in the tool’s API key field, or in the Authorization: Bearer header. On the
Anthropic API we also accept the key in x-api-key.
Guides
Claude Code Run Anthropic’s terminal agent on DeepSeek, GLM and Kimi models. Anthropic Messages · Set up Claude Code
Cursor Use your Yunshu Router key for Cursor’s chat and agent. OpenAI Chat Completions · Set up Cursor
Codex CLI Add Yunshu Router as a model provider in OpenAI’s terminal agent. OpenAI Responses · Set up Codex CLI
Cline Pick any model for the Cline agent in VS Code. OpenAI Chat Completions · Set up Cline
Roo Code Point Roo Code’s modes at the model you choose. OpenAI Chat Completions · Set up Roo Code
Kilo Code Add Yunshu Router as a custom provider in Kilo Code. OpenAI Chat Completions · Set up Kilo Code
OpenCode
Add a provider block to opencode.json and choose models with /models.
OpenAI Chat Completions · Set up OpenCode
Aider
Two environment variables and an openai/ model prefix.
OpenAI Chat Completions · Set up Aider
Continue
One model entry in config.yaml for chat, edit and apply.
OpenAI Chat Completions · Set up Continue
Zed Add an OpenAI-compatible provider for the Zed agent. OpenAI Chat Completions · Set up Zed
Python, Node and curl Call Yunshu Router from your own code with the official OpenAI or Anthropic SDK. OpenAI and Anthropic · SDK quick setup
Set a budget for agents
A coding agent can send hundreds of requests in a session. Give each tool its own key and set limits on that key in the console under API keys:
- Monthly budget. A request is refused before it could take the key past its budget for the
calendar month (UTC). The tool sees an error with status
402and codebudget_exceeded. - Rate limit. Requests per minute for that key.
- Model allow-list. Only the models you list can be called with that key.
Your balance is prepaid, and each request reserves its maximum price before it is sent, so several agents running at once cannot spend more than your balance. You can get an email or a webhook when a key nears its budget or your balance runs low.
Which model should I use?
For most coding agents, start with deepseek-v4-pro for everyday agent work at a low price per
token. Use glm-5.3 when the task leans on agentic coding and tool use, and kimi-k3 for long
tasks with many tool calls. Every model runs on the same key, so you can switch any time.
| Model ID | Provider | Good for |
|---|---|---|
deepseek-v4-pro |
DeepSeek | Everyday agent work at a low price per token |
glm-5.3 |
Z.ai | Agentic coding and tool use |
kimi-k3 |
Moonshot | Long tasks with many tool calls |