RouteMux Docs
IntegrationsDev tool

OpenClaw

Register RouteMux as a provider in openclaw.json, on any of its four protocol modes.

OpenClaw keeps providers under models.providers in ~/.openclaw/openclaw.json. Each provider declares its protocol with an api field, using the same four values as Pi.

Configure

{
  "models": {
    "providers": {
      "routemux": {
        "baseUrl": "https://api.routemux.com/v1",
        "apiKey": "sk-...",
        "auth": "api-key",
        "api": "openai-completions",
        "models": [
          {
            "id": "openai/gpt-5.5",
            "name": "GPT-5.5",
            "reasoning": true,
            "contextWindow": 1000000,
            "maxTokens": 128000
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": { "primary": "routemux/openai/gpt-5.5" }
    }
  }
}

A model is referenced as <providerId>/<modelId>. Our model ids already contain a slash, so the full reference has three segments.

Protocol and base URL

apiRouteMux baseUrlLands on
openai-completionshttps://api.routemux.com/v1/v1/chat/completions
openai-responseshttps://api.routemux.com/v1/v1/responses
anthropic-messageshttps://api.routemux.combare origin/v1/messages
google-generative-aihttps://api.routemux.com/vertex-aiVertex operations

Claude models are served only on anthropic-messages, so a Claude provider block needs both api: "anthropic-messages" and the bare-origin base URL. Getting one of the two right and the other wrong is the usual failure.

Model lists are explicit

OpenClaw does not discover models from the endpoint — whatever you list in models is what you get. Ids must match GET /v1/models exactly, and contextWindow / maxTokens feed the agent's own budgeting.

Troubleshooting

SymptomCause
Provider absent from model selectionThe block is at the wrong nesting level. It belongs under models.providers, not at the top level.
404 on every requestBase URL shape does not match the api value. See the table.
400 MODEL_PROTOCOL_UNSUPPORTEDModel not served on the declared protocol — most often a Claude id under an OpenAI mode.
Model reference not resolvingagents.defaults.model.primary needs <providerId>/<modelId>; ours already contains a slash.
400 AUTH_AMBIGUOUS_API_KEYTwo different key values reaching us at once. Keep one.
422 BILLING_INSUFFICIENT_CREDITSWallet lacks credit. Failed requests are not billed.

On this page