Integrations

Cline

Run the Cline coding agent on any model in the MiniRouter catalog.

Cline is an open-source coding agent for VS Code and the terminal. Its OpenAI Compatible provider sends requests to MiniRouter's Chat Completions endpoint, so Cline runs on any tool-capable model in the catalog, a preset or a router, with one balance and per-key spend limits.

1. Install Cline

Open Extensions with Cmd+Shift+X or Ctrl+Shift+X, search for Cline and click Install.

2. Check the key

Create a key, export it as MINIROUTER_KEY, then send one request outside Cline.

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. Enter the settings

Open Cline sidebar → ⚙ Settings → API Configuration.

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 ID
zai/glm-5.3-flashUse an ID from /models. For no-deposit testing, choose minirouter/auto:free when listed; quotas and supported request features apply.

4. Run a task

Ask Cline for a small change. Then open Activity. The request lists its model, tokens and exact cost.

Match the context window

  1. OpenModel Configuration under the OpenAI Compatible provider.
  2. CopyContext window and output limit from the model's page in Models.
  3. SaveCline now manages context against the real window.

Plan and Act models

In API Configuration, tick Use different models for Plan and Act modes. Then set a Model ID on each tab.

Plan
openai/gpt-5.6-solStronger reasoning for the plan.
Act
zai/glm-5.3-flashCheaper model for the edits.

Check Activity after switching modes. Each request shows the model that answered.

Routers and presets

Type any of these into Model ID.

minirouter/auto:code
Picks a model with reliable tool calling. See Auto router.
minirouter/fusion
Picks the model and effort from the request. See Fusion.
@preset/your-slug
Your saved models and instructions. Edit them in Presets.

Cline CLI

cline auth runs the same provider setup as the extension. Choose OpenAI Compatible and enter the values above.

Terminal
cline auth
cline -m zai/glm-5.3-flash "Run tests and fix failures"
-m
Model ID for this run.
-p
Starts in Plan mode.
--json
Streams NDJSON.
-y
Skips approvals and exits when done.

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.

Model picker shows no minirouter models

The OpenAI Compatible provider takes a typed Model ID rather than fetching a list. Type the id exactly, author/name — e.g. zai/glm-5.3-flash.

Every error code, with its fix: Errors.

Next steps

Esc