LiteLLM + minirouter

Configuration for the LiteLLM SDK and proxy: one `openai/`-prefixed model string or one proxy YAML entry reaches every minirouter model.

Base URLhttps://api.minirouter.sh/v1
Get a keyhttps://minirouter.sh/key
Get a key — no account

Settings

Python SDK call, or config.yaml for the proxy

In order

  1. modelopenai/zai/glm-5.3-flash

    The openai/ prefix selects LiteLLM's OpenAI-compatible transport; everything after it is our model id. Once the upstream provider PR lands this becomes minirouter/zai/glm-5.3-flash with no api_base.

  2. api_basehttps://api.minirouter.sh/v1
  3. api_keymr-live-… (your key)
config.yaml for the proxy
model_list:
  - model_name: glm-5.3-flash
    litellm_params:
      model: openai/zai/glm-5.3-flash
      api_base: https://api.minirouter.sh/v1
      api_key: os.environ/MINIROUTER_API_KEY

Recommended models · 4

All models →

Only rows confirmed in the current live catalog are linked. A plain row is included as a reference. Paste ids exactly as written, author/name.

When it fails

  • SymptomLiteLLM appends /v1 twice or reports a 404 from the gateway
    Codeinvalid_request

    Set api_base to https://api.minirouter.sh/v1 exactly. LiteLLM's OpenAI transport does not add /v1 for a custom api_base, so include it yourself and nothing after it. docs/errors#invalid_request

  • SymptomCost tracking shows $0 for every request
    Codeclient-side

    LiteLLM prices from its own model table, which does not know our ids until the upstream pricing PR lands. Billing on our side is unaffected; read the x-minirouter-balance-usd header for the truth.

  • Symptom401 on every request
    Codeinvalid_api_key

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

  • Symptom402 before any tokens arrive
    Codeinsufficient_credits

    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. docs/errors#insufficient_credits

Every API error string carries a URL resolving to /docs/errors.

Other coding agents and editors

Agent setup: /setup · API reference: /docs