Kilo Code is a coding agent for VS Code, JetBrains and the terminal. Add Yunshu Router as a custom provider and Kilo runs on the model you choose, billed per token to your prepaid balance.
What you need
- Kilo Code installed.
- A Yunshu Router account with credit on the balance.
- An API key from the console. Use a separate key for Kilo Code.
Set it up
-
Create a key in the console (API keys → Create key) and copy it.
-
In Kilo Code, open Settings → Providers and click Custom provider at the bottom of the list.
-
Fill in the dialog:
Provider ID: yunshu Display name: Yunshu Router Provider API: OpenAI Compatible Base URL: https://api.yunshurouter.com/v1 API key: YOUR_YUNSHU_KEY -
Under Models, pick models from the list Kilo fetches from us, or add IDs by hand, for example
deepseek-v4-proandkimi-k3. -
Click Submit.
Choose OpenAI Compatible (Chat Completions).
Check it works
- Pick a Yunshu Router model in Kilo’s model selector.
- Ask: “Read the README and summarise it in three lines.” Approve the read.
- Open Usage in the console: the requests show under the Kilo Code key.
Recommended models
| Model ID | Use it for |
|---|---|
deepseek-v4-pro |
Everyday coding at a low price |
kimi-k3 |
Planning and long tasks |
glm-5.3 |
Quick edits |
Set a budget on the key
In the console, open API keys, pick the Kilo Code key and set a monthly budget, a model
allow-list and a budget alert. A request that would pass the budget is refused with
402 budget_exceeded.
Known limitations
- The model list Kilo fetches comes from
GET /v1/models, which lists only models we can serve right now. A model missing from it is temporarily unavailable. - If you limit the key with a model allow-list, Kilo’s fetched list shows only the allowed models.
Troubleshooting
| What you see | Likely cause | Fix |
|---|---|---|
401 |
Key mistyped or revoked | Edit the provider and paste the key again. |
| Model list is empty | Wrong base URL or key | Use https:/; test the key with curl (below). |
404 on every request |
Base URL without / |
Add /. |
404 naming the model |
Model ID typo | Copy it from the models page. |
403 naming the model |
Not on the key’s allow-list | Add it to the key. |
402 |
Budget or balance used up | Raise the budget or top up. |
Test the key outside Kilo:
curl https://api.yunshurouter.com/v1/models -H "Authorization: Bearer YOUR_YUNSHU_KEY"