OpenClaw Setup Guide
OpenClaw is an open-source Agent / Gateway tool that can unify Telegram, Feishu, local tools, and model providers behind one entry point. CodyRouter can be used as a custom OpenClaw provider.
Prerequisites
- An Ubuntu / Debian server, preferably Ubuntu 22.04+.
- Node.js 22+; OpenClaw recommends Node.js 24.
- A CodyRouter account with an API key.
- A Telegram account.
Install OpenClaw
bash
sudo apt update && sudo apt install -y git
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo bash -
sudo apt-get install -y nodejs
npm install -g openclaw
openclaw --versionRun Onboarding
Create a Telegram bot with @BotFather, copy the Bot Token, then run:
bash
openclaw onboardChoose Skip for now for the model/auth provider because CodyRouter is configured as a custom provider later.
Configure CodyRouter Provider
Open the configuration file:
bash
nano ~/.openclaw/openclaw.jsonMerge the following models and agents blocks into the top level. Replace YOUR_API_KEY with your real API key.
json
{
"models": {
"providers": {
"codyrouter-claude": {
"baseUrl": "https://api.codyrouter.com",
"apiKey": "YOUR_API_KEY",
"api": "anthropic-messages",
"models": [{ "id": "claude-opus-4-6", "name": "Claude Opus 4.6", "reasoning": true, "input": ["text", "image"], "contextWindow": 200000, "maxTokens": 16384 }]
},
"codyrouter-gpt": {
"baseUrl": "https://api.codyrouter.com",
"apiKey": "YOUR_API_KEY",
"api": "openai-responses",
"models": [{ "id": "gpt-5.3-codex", "name": "GPT-5.3 Codex", "reasoning": false, "input": ["text", "image"], "contextWindow": 400000, "maxTokens": 128000 }]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "codyrouter-claude/claude-opus-4-6",
"fallbacks": ["codyrouter-gpt/gpt-5.3-codex"]
}
}
}
}Do not paste a second top-level agents key if one already exists. Merge defaults.model into the existing block.
Allowlist
If models.allowlist exists, add the new model names:
json
{
"models": {
"allowlist": [
"codyrouter-claude/claude-opus-4-6",
"codyrouter-gpt/gpt-5.3-codex"
],
"providers": {}
}
}Restart And Pair
bash
openclaw gateway restart
openclaw gateway statusSend a message to the Telegram bot, copy the pairing code, then approve it:
bash
openclaw pairing approve telegram <pairing-code>Checklist
- Claude provider uses
https://api.codyrouter.com+anthropic-messages. - GPT / Codex provider uses
https://api.codyrouter.com+openai-responses. - Model IDs can be written as
codyrouter-claude/claude-opus-4-6orclaude-opus-4-6, but the model name must match Model IDs. - Avoid duplicate top-level
agentsormodelskeys. - For
401,403, or429, check API key, credits, and model access.