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 Value

M2.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.

MiniMax M2.5
Latest flagship. Near SOTA on SWE-Bench. Strong coding (10+ languages), multilingual programming, agent framework support. 200K context.
Price: ~$0.40/M input (via OpenRouter), $15/M direct API
MiniMax M2.5 Lightning
Ultra-fast variant. 100 tokens/second. "1 hour = $1" according to MiniMax.
MiniMax M2.1
Previous generation. Still excellent. 200K context.
# 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

Premium

Claude models offer the best balance of intelligence, tool use, and reliability for OpenClaw.

Claude Opus 4.6
Most capable. Best for complex reasoning, coding, and nuanced responses. 200K context.
Price: $15/M input, $75/M output
Claude Sonnet 4.5
Best value. Great intelligence at lower cost. 200K context.
Price: $3/M input, $15/M output
Claude Haiku
Fastest & cheapest. Great for simple tasks and high-volume usage.
Price: $0.25/M input, $1.25/M output
ANTHROPIC_API_KEY=sk-ant-your-key

CLI: openclaw onboard --auth-choice token

OpenAI

GPT models work well with OpenClaw, especially for code completion.

GPT-5o
Latest flagship. Excellent reasoning, vision, and speed. 128K context.
Price: $2.50/M input, $10/M output
GPT-5o Mini
Fast and cheap. Great for high-volume simple tasks.
Price: $0.15/M input, $0.60/M output
GPT-5.1 Codex
Specialized for code. Best for programming tasks.
OPENAI_API_KEY=sk-your-key

CLI: openclaw onboard --auth-choice openai-api-key

OpenAI Code (Codex)

OAuth-based access to ChatGPT's coding models. No API key needed.

GPT-5.3 Codex
Latest Codex model via ChatGPT OAuth.
openclaw onboard --auth-choice openai-codex

OpenCode Zen

Alternative provider with competitive pricing on Claude models.

Claude Opus 4.6
Same model as Anthropic, often cheaper.
OPENCODE_API_KEY=your-key

CLI: openclaw onboard --auth-choice opencode-zen

Google Gemini

Gemini 2 Pro
Excellent at math, coding, and long context. 2M context window.
Price: Free tier, then $1-3/M
Gemini 2 Flash
Fast and affordable. Great for high-volume usage.
GEMINI_API_KEY=your-google-key

CLI: openclaw onboard --auth-choice gemini-api-key

Z.AI (GLM)

GLM-4.7
Chinese AI model's latest version.
ZAI_API_KEY=your-key

CLI: openclaw onboard --auth-choice zai-api-key

Vercel AI Gateway

Route to multiple providers through Vercel's gateway.

AI_GATEWAY_API_KEY=your-key

CLI: openclaw onboard --auth-choice ai-gateway-api-key

Run AI models locally on your own hardware. No API costs after setup.

Llama 3.3
Powerful open-source model. Requires GPU (16GB+ VRAM).
Qwen 2.5 Coder
Optimized for code. Fast and accurate for programming.
Mistral Large
Great reasoning. Good alternative to Claude.
# 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
Aggregates many providers.
OPENROUTER_API_KEY
xAI (Grok)
Elon Musk's Grok models.
XAI_API_KEY
Groq
Ultra-fast inference.
GROQ_API_KEY
Cerebras
Extremely fast, low cost.
CEREBRAS_API_KEY
Mistral
French AI company's models.
MISTRAL_API_KEY
Hugging Face
Thousands of open models.
HUGGINGFACE_HUB_TOKEN
GitHub Copilot
Code completion via Copilot.
COPILOT_GITHUB_TOKEN
MiniMax
Excellent value. Great reasoning & coding. 1M context.
MINIMAX_API_KEY
Moonshot (Kimi)
Chinese AI with long context.
MOONSHOT_API_KEY

Quick 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 keys
OPENAI_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