Skip to content

Integrations / Kilo Code

Use Kilo Code with any model

Add Yunshu Router as a custom provider in Kilo Code. Base URL, API key, model IDs, token limits in kilo.jsonc, checks and fixes.

Get an API key

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

  1. Create a key in the console (API keys → Create key) and copy it.

  2. In Kilo Code, open Settings → Providers and click Custom provider at the bottom of the list.

  3. 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
  4. Under Models, pick models from the list Kilo fetches from us, or add IDs by hand, for example deepseek-v4-pro and kimi-k3.

  5. Click Submit.

Choose OpenAI Compatible (Chat Completions).

Check it works

  1. Pick a Yunshu Router model in Kilo’s model selector.
  2. Ask: “Read the README and summarise it in three lines.” Approve the read.
  3. Open Usage in the console: the requests show under the Kilo Code key.
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://api.yunshurouter.com/v1; test the key with curl (below).
404 on every request Base URL without /v1 Add /v1.
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"

Questions

Is Kilo’s own model gateway required?

No. A custom provider sends requests straight to us with your key.

Which Provider API should I pick?

OpenAI Compatible. It is the Chat Completions format.

Can I use the same key in Cline and Roo Code?

Yes, but a key per tool lets you set a budget per tool.