Adding Models to OpenClaw
OpenClaw (also known as ClawdBot / MoltBot) supports multiple model providers. Here’s how to add new models or providers to your setup.
Add a New OpenRouter Model
First, find the model ID you want to add:
curl -s https://openrouter.ai/api/v1/models | python3 -c "import json,sys; [print(m['id']) for m in json.load(sys.stdin)['data']]" | grep -i <search-term>
Add the model to ~/.openclaw/openclaw.json under models.providers.openrouter.models:
{
"id": "<author>/<model>",
"name": "Display Name",
"reasoning": false,
"input": ["text"],
"output": ["text"]
}
Add to the allowlist in agents.defaults.models:
"openrouter/<author>/<model>": { "alias": "Display Name" }
Restart the gateway:
openclaw gateway restart
Add a New NVIDIA Model
Add the model to ~/.openclaw/openclaw.json under models.providers.nvidia.models:
{
"id": "<author>/<model>",
"name": "Display Name",
"reasoning": false,
"input": ["text"],
"output": ["text"]
}
Add to the allowlist in agents.defaults.models:
"nvidia/<author>/<model>": { "alias": "Display Name" }
Restart the gateway:
openclaw gateway restart
Add a New Provider
Adding a completely new provider requires a few more steps.
1. Add authentication credentials
Edit ~/.openclaw/agents/main/agent/auth-profiles.json with your API key:
{
"new-provider": {
"apiKey": "your-api-key-here"
}
}
2. Register auth profile
Add an entry to openclaw.json under auth.profiles:
"new-provider": {
"type": "api-key",
"profile": "new-provider"
}
3. Configure the provider
Add the provider to models.providers:
"new-provider": {
"baseUrl": "https://api.new-provider.com/v1",
"api": "openai-completions",
"models": [
{
"id": "model-id",
"name": "Model Name",
"reasoning": false,
"input": ["text"],
"output": ["text"]
}
]
}
4. Allowlist the models
Add models to agents.defaults.models:
"new-provider/model-id": { "alias": "Model Name" }
5. Restart
openclaw gateway restart
Quick Reference
| Provider | Config Location | Model Format |
|---|---|---|
| OpenRouter | models.providers.openrouter.models |
openrouter/<author>/<model> |
| NVIDIA | models.providers.nvidia.models |
nvidia/<author>/<model> |
| Custom | models.providers.<name>.models |
<name>/<model-id> |
All changes require openclaw gateway restart to take effect.
Changing API Keys
All API keys are stored in one place:
~/.openclaw/agents/main/agent/auth-profiles.json
Edit this file to add or update your keys:
{
"openrouter": {
"apiKey": "sk-or-v1-your-openrouter-key"
},
"nvidia": {
"apiKey": "nvapi-your-nvidia-key"
},
"anthropic": {
"apiKey": "sk-ant-your-anthropic-key"
}
}
After updating, restart the gateway:
openclaw gateway restart
Bonus: Model Switcher Script
Tired of remembering model IDs? Create a simple menu script to switch models quickly.
Save this as ~/switch-model.sh:
#!/bin/bash
echo "Switch OpenClaw Model"
echo "====================="
echo ""
echo " OpenRouter"
echo " ----------"
echo "1) Pony Alpha"
echo "2) Kimi K2.5"
echo "3) Qwen3 Coder Next"
echo ""
echo " NVIDIA"
echo " ------"
echo "4) Kimi K2.5 (NVIDIA)"
echo "5) GLM 4.7"
echo "6) DeepSeek V3.2"
echo "7) MiniMax M2.1"
echo ""
read -p "Pick [1-7]: " choice
case "$choice" in
1) model="openrouter/openrouter/pony-alpha" ;;
2) model="openrouter/moonshotai/kimi-k2.5" ;;
3) model="openrouter/qwen/qwen3-coder-next" ;;
4) model="nvidia/moonshotai/kimi-k2.5" ;;
5) model="nvidia/z-ai/glm4.7" ;;
6) model="nvidia/deepseek-ai/deepseek-v3.2" ;;
7) model="nvidia/minimaxai/minimax-m2.1" ;;
*) echo "Invalid choice"; exit 1 ;;
esac
openclaw models set "$model"
echo "Switched to: $model"
Make it executable and run:
chmod +x ~/switch-model.sh
~/switch-model.sh
Add your own models to the menu as needed. No more copy-pasting long model IDs.