Best OpenClaw Models
Comprehensive guide to AI models for OpenClaw. Find the right balance of speed, intelligence, and cost.
Quick Start
Model refs use format: provider/model (e.g., openai/gpt-5o)
Use CLI to set up: openclaw onboard
List models: openclaw models list
MiniMax (Recommended)
Best ValueM2.5 is the latest flagship — near state-of-the-art at 1/20th the cost of Claude Opus. Excellent coding, multilingual support, and agentic task automation.
# Via OpenRouter (recommended) OPENROUTER_API_KEY=your-key Model: openrouter/minimax/MiniMax-M2.5 # Direct API MINIMAX_API_KEY=your-key Model: minimax/MiniMax-M2.5 # OAuth (no API key needed) openclaw plugins enable minimax-portal-auth openclaw onboard --auth-choice minimax-portal
Anthropic
PremiumClaude models offer the best balance of intelligence, tool use, and reliability for OpenClaw.
ANTHROPIC_API_KEY=sk-ant-your-keyCLI: openclaw onboard --auth-choice token
OpenAI
GPT models work well with OpenClaw, especially for code completion.
OPENAI_API_KEY=sk-your-keyCLI: openclaw onboard --auth-choice openai-api-key
OpenAI Code (Codex)
OAuth-based access to ChatGPT's coding models. No API key needed.
openclaw onboard --auth-choice openai-codexOpenCode Zen
Alternative provider with competitive pricing on Claude models.
OPENCODE_API_KEY=your-keyCLI: openclaw onboard --auth-choice opencode-zen
Google Gemini
GEMINI_API_KEY=your-google-keyCLI: openclaw onboard --auth-choice gemini-api-key
Z.AI (GLM)
ZAI_API_KEY=your-keyCLI: openclaw onboard --auth-choice zai-api-key
Vercel AI Gateway
Route to multiple providers through Vercel's gateway.
AI_GATEWAY_API_KEY=your-keyCLI: openclaw onboard --auth-choice ai-gateway-api-key
Ollama (Local)
FreeRun AI models locally on your own hardware. No API costs after setup.
# Install: https://ollama.ai ollama pull llama3.3 # Config (auto-detected) MODEL_BACKEND_URL=http://localhost:11434
vLLM (Self-Hosted)
High-performance local inference server.
VLLM_API_KEY=vllm-local
# Config
{
"agents": {
"defaults": {
"model": { "primary": "vllm/your-model" }
}
}
}Other Supported Providers
OPENROUTER_API_KEYXAI_API_KEYGROQ_API_KEYCEREBRAS_API_KEYMISTRAL_API_KEYHUGGINGFACE_HUB_TOKENCOPILOT_GITHUB_TOKENMINIMAX_API_KEYMOONSHOT_API_KEYQuick Recommendations
By Use Case
- • Best overall: MiniMax M2.5 (value) or Claude Sonnet 4.5 (premium)
- • Best for coding: Claude Opus 4.6 or Qwen 2.5 Coder
- • Best budget: MiniMax M2.5 or Claude Haiku
- • Best local: Ollama with Llama 3.3
- • Fastest: Groq or Cerebras
- • Longest context: MiniMax M2.5 (1M) or Gemini 2 Pro (2M)
By Price
- • Free: Ollama, Qwen OAuth, Gemini free tier
- • Budget: Haiku, GPT-4o Mini (<$1/M)
- • Mid-range: Sonnet, GPT-5o ($3-15/M)
- • Premium: Opus ($15-75/M)
Fallback Models
If your primary fails, OpenClaw automatically tries the next model:
{
"agents": {
"defaults": {
"model": {
"primary": "anthropic/claude-sonnet-4-5",
"fallbacks": [
"openai/gpt-5o",
"google/gemini-2-pro"
]
}
}
}
}API Key Rotation
Configure multiple keys for automatic failover on rate limits:
# Multiple keys (comma-separated)OPENAI_API_KEYS="sk-key1,sk-key2,sk-key3"# Or numbered keysOPENAI_API_KEY_1="sk-key1"OPENAI_API_KEY_2="sk-key2"# Single live override (highest priority)OPENCLAW_LIVE_OPENAI_KEY="sk-override"Keys rotate only on rate-limit errors (429, rate_limit, quota). Other errors fail immediately.
Learn More
- • Model Configuration Guide - Full setup details
- • OpenClaw Skills - Extend capabilities with skills
- • Official Docs - Complete provider reference