Integrations

Roo Code

Keep an existing Roo Code install running on the MiniRouter catalog.

Roo Code is a VS Code agent with modes such as Code, Architect and Ask. Add MiniRouter as an OpenAI Compatible provider to run each mode on any tool-capable model in the catalog, with one balance and per-key spend limits.

1. Create a key

Create a key for Roo Code.

2. Check the key

Export the key 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 Roo Code sidebar → ⚙ Settings → Providers and fill in:

API Provider
OpenAI Compatible
Base URL
https://api.minirouter.sh/v1The bare host also works. Never append /chat/completions.
API Key
mr-live-… (your key)
Model
zai/glm-5.3-flashAny catalog id. Save one config profile per model.

4. Send a prompt

Ask Roo anything, then open Activity. The request lists its model, tokens and exact cost.

A profile per mode

Roo saves a model per config profile and remembers the last profile used in each mode.

  1. In Settings → Providers, press + for each model.
  2. Name it after the model, for example MiniRouter Sol.
  3. Use the same base URL and key; change only Model.
  4. Switch to a mode and pick its profile from the dropdown in chat.
Architect
openai/gpt-5.6-solStronger reasoning for plans.
Code
zai/glm-5.3-flashCheaper model for edits.

Pick a model that calls tools

zai/glm-5.3-flash
Strong agentic model at low cost. See GLM 5.3 Flash.
minirouter/auto:code
Picks a model with reliable tool calling. See Auto router.
@preset/your-slug
Your saved models and instructions. See Presets.

A preset lets you change a profile's model from the dashboard without opening Roo.

Keep spend in check

Restrict models or filter content with Guardrails.

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.

Different modes hit different models than expected

Roo remembers a config profile per mode (Code, Architect, Ask…), and each profile holds its own model. Check which profile the current mode uses.

Every error code, with its fix: Errors.

Next steps

Esc