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:
- Create account at openrouter.ai
- Generate API key
- 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:
Connect AI to WhatsApp via Baileys protocol
View Guide →Telegram
Full-featured Telegram bot with commands and reactions
View Guide →Discord
Discord bot with slash commands and threads
View Guide →Slack
Slack app with Block Kit and threads
View Guide →Signal
Encrypted messaging via signal-cli daemon
View Guide →iMessage
Apple iMessage integration (macOS only)
View Guide →Matrix
Decentralized Matrix protocol support
View Guide →Microsoft Teams
Enterprise Teams integration via Microsoft SDK
View Guide →Nostr
Decentralized Nostr protocol support
View Guide →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.