Codex + minirouter

Custom Responses API provider configuration for Codex local clients.

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

Settings

~/.codex/config.toml, with MINIROUTER_KEY in the shell environment

In order

  1. web_searchdisabled

    Hosted web search is not enabled. Local shell and file tools remain available.

  2. model_reasoning_summarynone

    The MiniRouter example below does not emit a Codex reasoning summary.

  3. model_providerminirouter
  4. modelzai/glm-5.3-flash
  5. model_providers.minirouter.base_urlhttps://api.minirouter.sh/v1
  6. model_providers.minirouter.env_keyMINIROUTER_KEY

    Codex reads the MiniRouter key from this environment variable.

  7. model_providers.minirouter.wire_apiresponses

    Codex uses MiniRouter's /v1/responses endpoint.

~/.codex/config.toml
model = "zai/glm-5.3-flash"
model_provider = "minirouter"
web_search = "disabled"
model_reasoning_summary = "none"

[model_providers.minirouter]
name = "MiniRouter"
base_url = "https://api.minirouter.sh/v1"
env_key = "MINIROUTER_KEY"
wire_api = "responses"

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

  • SymptomCodex ignores the MiniRouter provider block
    Codeclient-side

    Provider and credential redirects are ignored in project-scoped .codex/config.toml files. Put this provider in your user-level ~/.codex/config.toml.

  • SymptomCodex calls Chat Completions or reports an unsupported wire API
    Codeinvalid_request

    Set wire_api to responses. MiniRouter exposes the Responses route at /v1/responses; Codex appends /responses to the configured base URL. docs/errors#invalid_request

  • 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