Integrations

Kilo Code

Run Kilo Code's agent on any model in the MiniRouter catalog.

Kilo Code is an open-source coding agent for VS Code, JetBrains and the terminal. Add MiniRouter as a custom provider to run it on any tool-capable model in the catalog, with one balance and per-key spend limits.

1. Install Kilo Code

Terminal
code --install-extension kilocode.Kilo-Code

2. Create and check a key

Create a key, export it as MINIROUTER_KEY, then send one request. A JSON reply means the key and balance work.

Terminal
curl https://api.minirouter.sh/v1/chat/completions \
  -H "Authorization: Bearer $MINIROUTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"zai/glm-5.3-flash","messages":[{"role":"user","content":"ping"}]}'

3. Add the provider

Open Kilo Code ⚙ Settings → Providers → Custom provider and fill in:

Provider ID
minirouter
Provider API
OpenAI Compatible
Base URL
https://api.minirouter.sh/v1Never append /chat/completions.
API key
mr-live-… (your key)
Models
zai/glm-5.3-flashPick from the list Kilo loads from /v1/models, or type the ID.

4. Send a prompt

Pick a MiniRouter model, send one prompt, then open Activity. The request lists its model, tokens and exact cost.

Pick models

Choose from the loaded list, or type any ID.

zai/glm-5.3-flash
Everyday coding. See GLM 5.3 Flash.
openai/gpt-5.6-sol
Hard plans and reviews. See GPT 5.6 Sol.
minirouter/auto:code
Picks a model with reliable tool calling. See Auto router.
@preset/your-slug
Your saved models and instructions. See Presets.

Config files

The CLI, VS Code and JetBrains read the same files. The project file wins.

Global
~/.config/kilo/kilo.jsonc
Project
.kilo/kilo.jsonc or kilo.jsonc in the repo root.

Set limit.context and limit.output on each model, or Kilo never compacts. Copy both from the model's page in Models.

Run headless

kilo run runs one task without the TUI. The model is the provider ID, a slash, then the model ID.

Terminal
kilo run --auto --model minirouter/zai/glm-5.3-flash "Run tests and fix failures"
--auto
Approves actions without asking. Without it, the run rejects them.
--model
Provider ID and model ID, for example minirouter/minirouter/auto:code.

Troubleshooting

404, HTML, or a parse error on every request

Almost always the base URL. Use https://api.minirouter.sh/v1 — the bare host without /v1 also works, but never append /chat/completions to the base URL field; the client adds that path itself.

Error: 400 invalid_request.

401 on every request

Wrong or rotated key. Keys start with mr-live-; after a rotation the old key keeps working for 24 hours, then dies.

Error: 401 invalid_api_key.

402 before any tokens arrive

Balance below the estimated cost of the request. Top up (from $0.50 with direct Solana payments) — and watch the x-minirouter-balance-usd header, the low-balance signal every response carries.

Error: 402 insufficient_credits.

Response stops mid-sentence with a credits message

Balance hit $0 mid-stream. The stream ends with a terminal error naming the exact charge for tokens delivered — never a silent close.

Error: 402 insufficient_credits.

Every error code, with its fix: Errors.

Next steps

Esc