Available Models

Model Context Images Tools
Claude Sonnet 4 (via OpenRouter)
Access Claude through OpenRouter
200K ✓ ✓
GPT-4 Turbo (via OpenRouter)
Access GPT-4 through OpenRouter
128K ✓ ✓

Authentication

API KEY

OpenRouter API key

Environment Variable: OPENROUTER_API_KEY

Setup Steps:

  1. Create account at openrouter.ai
  2. Generate API key
  3. Set OPENROUTER_API_KEY environment variable

Configuration Example

{
  "models": {
    "providers": {
      "openrouter": {
        "apiKey": "${OPENROUTER_API_KEY}",
        "baseUrl": "https://openrouter.ai/api/v1"
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "openrouter/anthropic/claude-sonnet-4"
      }
    }
  }
}

Use OpenRouter with Messaging Channels

Connect OpenRouter to your favorite messaging platforms:

Frequently Asked Questions

How much does OpenRouter cost with OpenClaw?
OpenRouter pricing depends on your usage. OpenRouter charges based on tokens processed. OpenClaw itself is free and open source. You only pay for the AI provider API costs.
How do I authenticate OpenRouter with OpenClaw?
OpenRouter supports api_key. The most common method is using an API key which you can get from the OpenRouter console.
Which OpenRouter models work with OpenClaw?
OpenClaw supports all OpenRouter models including Claude Sonnet 4 (via OpenRouter), GPT-4 Turbo (via OpenRouter). You can configure your preferred model in openclaw.json or use model aliases for convenience.
Can I use OpenRouter as a fallback provider?
Yes, OpenClaw supports automatic failover. You can configure OpenRouter as a fallback in the model configuration. If your primary provider fails, OpenClaw will automatically switch to OpenRouter.