Configure OpenClaw with OpenRouter
Access 200+ AI models from all major providers through a single API with OpenClaw (formerly Moltbot). Pay only for what you use.
- +One API, all models - Access Claude, GPT-4, Llama, Gemini, and 200+ models with a single key
- +Pay-per-use - No minimums, no commitments. Add $5 and start using immediately
- +Automatic fallback - If one provider is down, OpenRouter can route to alternatives
- +Price comparison - See and compare pricing across all providers
- +New models immediately - Access new models as soon as they launch
Popular Models on OpenRouter
Claude 3.5 Sonnet
RecommendedAnthropic's best model via OpenRouter.
anthropic/claude-3.5-sonnet$3.00 / $15.00
input / output per MTok
GPT-4o
OpenAI's flagship multimodal model.
openai/gpt-4o$2.50 / $10.00
input / output per MTok
Llama 3.1 405B
Meta's largest open model. Competitive with GPT-4.
meta-llama/llama-3.1-405b-instruct$3.00 / $3.00
input / output per MTok
Mistral Large
Mistral's enterprise model.
mistralai/mistral-large-latest$2.00 / $6.00
input / output per MTok
DeepSeek V3
Excellent quality at extremely low cost.
deepseek/deepseek-chat$0.14 / $0.28
input / output per MTok
Gemini 1.5 Pro
Google's model with 1M token context.
google/gemini-pro-1.5$1.25 / $5.00
input / output per MTok
Browse all 200+ models at openrouter.ai/models
Setup Instructions
Create OpenRouter Account
Sign up and add credits:
- - Go to openrouter.ai
- - Sign in with Google, GitHub, or email
- - Go to "Credits" and add funds (minimum $5)
- - Navigate to "Keys" to create an API key
Configure OpenClaw
Add OpenRouter configuration to your openclaw.json:
{
"agent": {
"provider": "openrouter",
"model": "anthropic/claude-3.5-sonnet",
"apiKey": "sk-or-v1-..."
}
}Restart OpenClaw
Apply the configuration:
openclaw restart{
"agent": {
"provider": "openrouter",
"model": "anthropic/claude-3.5-sonnet",
"apiKey": "sk-or-v1-...",
"maxTokens": 4096,
"temperature": 0.7,
"fallbackModels": [
"openai/gpt-4o",
"google/gemini-pro-1.5"
]
}
}model- Model in provider/model formatfallbackModels- Backup models if primary is unavailablemaxTokens- Maximum response lengthtemperature- Creativity level 0-2
Typical monthly costs with OpenRouter (varies by model choice):
Tip: Use DeepSeek for simple tasks and Claude/GPT-4 for complex reasoning to optimize costs.
Switch models instantly - just change the model ID:
// Try different models without changing API keys "model": "anthropic/claude-3.5-sonnet" "model": "openai/gpt-4o" "model": "meta-llama/llama-3.1-405b-instruct" "model": "deepseek/deepseek-chat"
For detailed OpenRouter configuration options, see the OpenClaw OpenRouter Documentation.
OpenRouter Configured!
Now connect your messaging channels and explore 200+ models.