Use Crazyrouter as the LLM backend for OpenClaw — an open-source AI agent that lives in your Telegram, Discord, WhatsApp, and more.
1# macOS / Linux
2curl -fsSL https://openclaw.ai/install.sh | bash
3
4# Windows (PowerShell)
5iwr -useb https://openclaw.ai/install.ps1 | iexsk-...)openclaw onboard --install-daemon1openclaw onboard \
2 --auth-choice apiKey \
3 --token-provider crazyrouter \
4 --token "sk-your-crazyrouter-key"1openclaw gateway status
2openclaw dashboard # Opens the web UI~/.openclaw/openclaw.json (JSON5 format):1{
2 models: {
3 providers: {
4 crazyrouter: {
5 baseUrl: "https://crazyrouter.com/v1",
6 apiKey: "sk-your-crazyrouter-key",
7 api: "openai-completions",
8 models: [
9 {
10 id: "claude-opus-4-6",
11 name: "Claude Opus 4.6",
12 reasoning: false,
13 input: ["text", "image"],
14 contextWindow: 200000,
15 maxTokens: 8192,
16 },
17 ],
18 },
19 },
20 },
21 agents: {
22 defaults: {
23 model: { primary: "crazyrouter/claude-opus-4-6" },
24 workspace: "~/.openclaw/workspace",
25 },
26 },
27}1{
2 models: {
3 providers: {
4 crazyrouter: {
5 baseUrl: "https://crazyrouter.com/v1",
6 apiKey: "sk-your-crazyrouter-key",
7 api: "openai-completions",
8 models: [
9 // Flagship - best for complex tasks
10 {
11 id: "claude-opus-4-6",
12 name: "Claude Opus 4.6",
13 reasoning: false,
14 input: ["text", "image"],
15 contextWindow: 200000,
16 maxTokens: 8192,
17 },
18 // Great all-rounder
19 {
20 id: "gpt-4o",
21 name: "GPT-4o",
22 reasoning: false,
23 input: ["text", "image"],
24 contextWindow: 128000,
25 maxTokens: 8192,
26 },
27 // Fast and cheap
28 {
29 id: "gpt-4o-mini",
30 name: "GPT-4o Mini",
31 reasoning: false,
32 input: ["text", "image"],
33 contextWindow: 128000,
34 maxTokens: 8192,
35 },
36 // Strong reasoning
37 {
38 id: "deepseek-reasoner",
39 name: "DeepSeek R1",
40 reasoning: true,
41 input: ["text"],
42 contextWindow: 64000,
43 maxTokens: 8192,
44 },
45 // Budget coding
46 {
47 id: "deepseek-chat",
48 name: "DeepSeek V3",
49 reasoning: false,
50 input: ["text"],
51 contextWindow: 64000,
52 maxTokens: 8192,
53 },
54 // Speed king
55 {
56 id: "gemini-2.0-flash",
57 name: "Gemini 2.0 Flash",
58 reasoning: false,
59 input: ["text", "image"],
60 contextWindow: 1000000,
61 maxTokens: 8192,
62 },
63 ],
64 },
65 },
66 },
67 agents: {
68 defaults: {
69 model: {
70 primary: "crazyrouter/claude-opus-4-6",
71 fallbacks: ["crazyrouter/gpt-4o"],
72 },
73 models: {
74 "crazyrouter/gpt-4o-mini": { alias: "Mini" },
75 "crazyrouter/deepseek-chat": { alias: "DeepSeek" },
76 },
77 workspace: "~/.openclaw/workspace",
78 },
79 },
80}1{
2 // ... models config above ...
3 channels: {
4 telegram: {
5 enabled: true,
6 botToken: "123456:ABC-your-telegram-bot-token",
7 dmPolicy: "allowlist",
8 allowFrom: ["tg:YOUR_TELEGRAM_USER_ID"],
9 },
10 },
11}1{
2 channels: {
3 discord: {
4 enabled: true,
5 botToken: "your-discord-bot-token",
6 dmPolicy: "pairing",
7 },
8 },
9}/model crazyrouter/gpt-4o
/model crazyrouter/deepseek-chat
/model crazyrouter/gemini-2.0-flash/model Mini
/model DeepSeek| Feature | Benefit |
|---|---|
| 624+ models | Switch between any model without changing config |
| One API key | No need to manage separate keys for each provider |
| OpenAI-compatible | Native support in OpenClaw — zero custom code |
| Competitive pricing | Run your agent 24/7 without breaking the bank |
| Fallback support | If one model is down, auto-switch to another |
| All channels | Same backend powers Telegram, Discord, WhatsApp, Slack... |
gpt-4o-mini or deepseek-chat for background tasksclaude-opus-4-6 or gpt-4o for direct conversations1{
2 agents: {
3 defaults: {
4 compaction: { mode: "safeguard" },
5 },
6 },
7}1{
2 agents: {
3 defaults: {
4 maxConcurrent: 4,
5 subagents: { maxConcurrent: 8 },
6 },
7 },
8}export CRAZYROUTER_API_KEY="sk-your-crazyrouter-key"1{
2 models: {
3 providers: {
4 crazyrouter: {
5 baseUrl: "https://crazyrouter.com/v1",
6 apiKey: "${CRAZYROUTER_API_KEY}",
7 api: "openai-completions",
8 // ...
9 },
10 },
11 },
12}1openclaw gateway status
2openclaw doctor1openclaw logs
2openclaw logs --tail1curl https://crazyrouter.com/v1/models \
2 -H "Authorization: Bearer sk-your-crazyrouter-key" \
3 | head -20| Issue | Fix |
|---|---|
| "Model not found" | Check model ID matches exactly (e.g. claude-opus-4-6) |
| Auth error | Verify API key at crazyrouter.com |
| Slow responses | Try a faster model like gemini-2.0-flash |
| Gateway won't start | Run openclaw doctor --fix |