OpenClaw

Integration status
  • Recommended protocol: OpenAI Responses
  • Configuration checked: July 15, 2026 (official OpenClaw provider documentation)
  • Runtime verification: Pending

OpenClaw supports custom providers under models.providers. Use a dedicated API key and an exact GetRouter model ID.

Environment variable

export GETROUTER_API_KEY="YOUR_API_KEY"

Persist it using the environment mechanism recommended for your OpenClaw installation. Do not commit the key.

Provider configuration

Add or merge this configuration into your OpenClaw config:

{
  "models": {
    "mode": "merge",
    "providers": {
      "getrouter": {
        "baseUrl": "https://getrouter.ai/v1",
        "apiKey": "${GETROUTER_API_KEY}",
        "api": "openai-responses",
        "models": [
          {
            "id": "MODEL_ID",
            "name": "GetRouter Model"
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "getrouter/MODEL_ID"
      }
    }
  }
}

Replace MODEL_ID in both locations with the same model ID. Preserve unrelated settings already in your file.

Note

If your OpenClaw version or selected model does not work with Responses, consult that version's provider documentation before switching the api adapter. Do not change it blindly.

Verify

  1. Restart OpenClaw so it reloads configuration and environment variables.
  2. Confirm the active model is getrouter/MODEL_ID.
  3. Send a short text prompt.
  4. Confirm a successful request in GetRouter usage logs.
  5. Test tool calling separately before running unattended agents.

Common errors

  • Provider or model not found: check both occurrences of MODEL_ID and the getrouter/ prefix.
  • 401: confirm GETROUTER_API_KEY is available to the OpenClaw process.
  • 404 on /responses: the provider is using Responses; confirm the Base URL is exactly https://getrouter.ai/v1.
  • Text works but tools fail: choose a model that supports tool calling and verify OpenClaw compatibility for that model.