As an Agentic AI assistant, OpenClaw's per-task token consumption can be significant (typically 10K-100K+ tokens). It is recommended to select a model based on task complexity to avoid unnecessary costs. This document provides several configuration options for reference.
& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1)))| Configuration Item | Value |
|---|---|
| Provider Type | anthropic-messages |
| Base URL | https://api.tokenhot.ai |
| API Key | Tokenhot API Key |
| Model | claude-sonnet-4.6 |
~/.openclaw/openclaw.json (supports JSON5 format, comments allowed).models.providers. Each provider needs to specify the API protocol type, address, and key:{
"models": {
"providers": {
"Tokenhot-anthropic": {
"baseUrl": "https://api.tokenhot.ai",
"apiKey": "${TOKENHOT_API_KEY}",
"api": "anthropic-messages",
"models": []
},
"Tokenhot-openai": {
"baseUrl": "https://api.tokenhot.ai/v1",
"apiKey": "${TOKENHOT_API_KEY}",
"api": "openai-responses",
"models": []
},
"Tokenhot-gemini": {
"baseUrl": "https://api.tokenhot.ai",
"apiKey": "${TOKENHOT_API_KEY}",
"api": "google-generative-ai",
"models": []
}
}
}
}models array under their corresponding provider. We offer three configurations — choose based on your needs:{
"models": {
"providers": {
"Tokenhot-anthropic": {
"baseUrl": "https://api.tokenhot.ai/anthropic",
"apiKey": "${TOKENHOT_API_KEY}",
"api": "anthropic-messages",
"models": [
{
"id": "claude-sonnet-4.6",
"name": "Claude Sonnet 4.6",
"input": ["text", "image", "file"],
"contextWindow": 200000,
"maxTokens": 64000
},
{
"id": "claude-opus-4.6",
"name": "Claude Opus 4.6",
"reasoning": true,
"input": ["text", "image", "file"],
"contextWindow": 200000,
"maxTokens": 128000
},
{
"id": "claude-haiku-4.5",
"name": "Claude Haiku 4.5",
"input": ["text", "image", "file"],
"contextWindow": 200000,
"maxTokens": 64000
}
]
}
}
}
}| Model | Role | Suitable Scenarios |
|---|---|---|
claude-opus-4.6 | ⭐ Flagship Reasoning | Complex research, multi-step reasoning, deep analysis |
claude-sonnet-4.6 | 🎯 Primary Workhorse | Coding, everyday tasks, balanced performance |
claude-haiku-4.5 | ⚡ Fast & Lightweight | Simple Q&A, fast responses, low-cost tasks |
{
"models": {
"providers": {
"Tokenhot-anthropic": {
"baseUrl": "https://api.tokenhot.ai",
"apiKey": "${TOKENHOT_API_KEY}",
"api": "anthropic-messages",
"models": [
{
"id": "claude-sonnet-4.6",
"name": "Claude Sonnet 4.5",
"input": ["text", "image", "file"],
"contextWindow": 200000,
"maxTokens": 64000
},
{
"id": "claude-opus-4.6",
"name": "Claude Opus 4.6",
"reasoning": true,
"input": ["text", "image", "file"],
"contextWindow": 200000,
"maxTokens": 128000
},
{
"id": "claude-haiku-4.5",
"name": "Claude Haiku 4.5",
"input": ["text", "image", "file"],
"contextWindow": 200000,
"maxTokens": 64000
}
]
},
"Tokenhot-openai": {
"baseUrl": "https://api.tokenhot.ai/v1",
"apiKey": "${TOKENHOT_API_KEY}",
"api": "openai-responses",
"models": [
{
"id": "gpt-5.2",
"name": "GPT-5.2",
"reasoning": true,
"input": ["text", "image"],
"contextWindow": 128000,
"maxTokens": 16384
}
]
}
}
}
}| Model | Role | Suitable Scenarios |
|---|---|---|
claude-opus-4.6 | ⭐ Flagship Reasoning | Complex research, multi-step reasoning, deep analysis |
claude-sonnet-4.6 | 🎯 Primary Workhorse | Coding, everyday tasks, balanced performance |
claude-haiku-4.5 | ⚡ Fast & Lightweight | Simple Q&A, fast responses, low-cost tasks |
gpt-5.2 | 🔄 Scenario Switching | Multi-model collaboration, A/B testing |
{
"models": {
"providers": {
"Tokenhot-anthropic": {
"baseUrl": "https://api.tokenhot.ai",
"apiKey": "${TOKENHOT_API_KEY}",
"api": "anthropic-messages",
"models": [
{
"id": "claude-sonnet-4.6",
"name": "Claude Sonnet 4.6",
"input": ["text", "image", "file"],
"contextWindow": 200000,
"maxTokens": 64000
},
{
"id": "claude-haiku-4.5",
"name": "Claude Haiku 4.5",
"input": ["text", "image", "file"],
"contextWindow": 200000,
"maxTokens": 64000
}
]
},
"Tokenhot-gemini": {
"baseUrl": "https://api.tokenhot.ai",
"apiKey": "${TOKENHOT_API_KEY}",
"api": "google-generative-ai",
"models": [
{
"id": "gemini-2.5-flash",
"name": "Gemini 2.5 Flash",
"reasoning": true,
"input": ["text", "image"],
"contextWindow": 1000000,
"maxTokens": 64000
},
{
"id": "gemini-2.5-pro",
"name": "Gemini 2.5 Pro",
"reasoning": true,
"input": ["text", "image"],
"contextWindow": 1000000,
"maxTokens": 64000
}
]
}
}
}
}| Model | Role | Suitable Scenarios |
|---|---|---|
claude-sonnet-4.6 | 🎯 Primary Workhorse | Coding, everyday tasks, balanced performance |
claude-haiku-4.5 | ⚡ Fast & Lightweight | Simple Q&A, fast responses, low-cost tasks |
gemini-2.5-flash | 🚀 High-Speed Engine | Million-token context, high-throughput tasks |
gemini-2.5-pro | 🧠 Deep Thinking | Million-token context, complex reasoning |
{
"agents": {
"defaults": {
"model": {
"primary": "claude-sonnet-4.6",
"fallbacks": ["claude-haiku-4.5"]
},
"models": {
"claude-opus-4.6": { "alias": "opus" },
"claude-sonnet-4.6": { "alias": "sonnet" },
"claude-haiku-4.5": { "alias": "haiku" }
},
"thinkingDefault": "low",
"timeoutSeconds": 600,
"maxConcurrent": 3
},
"list": [
{
"id": "main",
"default": true
},
{
"id": "research",
"model": {
"primary": "claude-opus-4.6"
}
},
{
"id": "quick",
"model": {
"primary": "claude-haiku-4.5"
}
}
]
}
}| Agent | Model | Purpose |
|---|---|---|
| main | claude-sonnet-4.6 (inherits defaults) | Default Agent, all daily tasks |
| research | claude-opus-4.6 | Deep research, complex reasoning, long-form analysis |
| quick | claude-haiku-4.5 | Simple Q&A, fast responses, low cost |
openclaw.json that integrates Provider, Models, and Agents configuration (maximum-performance setup):{
"models": {
"providers": {
"Tokenhot-anthropic": {
"baseUrl": "https://api.tokenhot.ai,
"apiKey": "${Tokenhot_API_KEY}",
"api": "anthropic-messages",
"models": [
{
"id": "claude-sonnet-4.6",
"name": "Claude Sonnet 4.5",
"input": ["text", "image", "file"],
"contextWindow": 200000,
"maxTokens": 64000
},
{
"id": "claude-opus-4.6",
"name": "Claude Opus 4.6",
"reasoning": true,
"input": ["text", "image", "file"],
"contextWindow": 200000,
"maxTokens": 128000
},
{
"id": "claude-haiku-4.5",
"name": "Claude Haiku 4.5",
"input": ["text", "image", "file"],
"contextWindow": 200000,
"maxTokens": 64000
}
]
},
"Tokenhot-gemini": {
"baseUrl": "https://api.tokenhot.ai",
"apiKey": "${Tokenhot_API_KEY}",
"api": "google-generative-ai",
"models": [
{
"id": "gemini-2.5-flash",
"name": "Gemini 2.5 Flash",
"reasoning": true,
"input": ["text", "image"],
"contextWindow": 1000000,
"maxTokens": 64000
},
{
"id": "gemini-2.5-pro",
"name": "Gemini 2.5 Pro",
"reasoning": true,
"input": ["text", "image"],
"contextWindow": 1000000,
"maxTokens": 64000
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "claude-sonnet-4.6",
"fallbacks": ["claude-haiku-4.5"]
},
"models": {
"claude-opus-4.6": { "alias": "opus" },
"claude-sonnet-4.6": { "alias": "sonnet" },
"claude-haiku-4.5": { "alias": "haiku" }
},
"thinkingDefault": "low",
"timeoutSeconds": 600,
"maxConcurrent": 3
},
"list": [
{
"id": "main",
"default": true
},
{
"id": "research",
"model": {
"primary": "claude-opus-4.6"
}
},
{
"id": "quick",
"model": {
"primary": "claude-haiku-4.5"
}
}
]
}
}baseUrl is configured correctly:https://api.tokenhot.aihttps://api.tokenhot.ai/v1https://api.tokenhot.aimodels.providers, use Tokenhot's full model name as the id (e.g., claude-sonnet-4.6).claude-haiku-4.5 or other models for daily tasksresearch Agent (using claude-opus-4.7) for complex tasks/model opus, /model sonnet, /model haiku (aliases must be configured in agents.defaults.models).