Connect OpenClaw
Configure a CanalAPI provider, default model, environment credentials and a first conversation in OpenClaw.
OpenClaw is a personal agent with messaging integrations. Connect the model first, then add tools, memory and channels as needed.
Checked 2026-11-03 against v2026.10.10, released November 3 despite the date in its tag. Official configuration was checked; a real CanalAPI request has not been tested.
1. Install and set up
Follow the official quickstart. This reference requires Node.js 24.16.0+ on 24.x, or 26.1.0+; upstream recommends Node 26. Windows supports the native Hub, PowerShell installation and WSL2.
Choose Custom setup / Custom provider with your CanalAPI key. Quick start may reuse another provider's existing login and make a real request. Explicitly select the custom endpoint to verify CanalAPI.
Prepare a dedicated key and full model ID. This guide uses Chat Completions; agent tasks also require tool calling.
2. Merge the provider configuration
Back up ~/.openclaw/openclaw.json and merge these fields, preserving other providers, workspaces, gateway and channels. ~ means your user home. Honor a custom OPENCLAW_CONFIG_PATH or named profile.
{
"models": {
"mode": "merge",
"providers": {
"canalapi": {
"baseUrl": "https://api.canalapi.com/v1",
"apiKey": "${CANALAPI_API_KEY}",
"api": "openai-completions",
"models": [
{
"id": "YOUR_MODEL_ID",
"name": "CanalAPI model",
"input": [
"text"
],
"contextWindow": 128000,
"maxTokens": 8192
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "canalapi/YOUR_MODEL_ID"
}
}
}
}Replace both YOUR_MODEL_ID values with the same full ID. canalapi/ is OpenClaw's provider prefix; do not prepend it to models[].id. 128000 context / 8192 output are illustrative: change them to the selected model's real limits before running.
openai-completions selects /v1/chat/completions, not legacy /v1/completions. Responses requires separate model verification and the openai-responses adapter.
Put the dedicated key in the user-level ~/.openclaw/.env:
CANALAPI_API_KEY=YOUR_CANALAPI_KEYReplace the placeholder and keep this file out of source control. Current versions ignore provider credentials from a workspace .env. For a service, check its OS user and state directory too.
3. Start and verify
Restart your installed Gateway service after saving; stop and restart a foreground instance instead. For the service:
openclaw gateway restart
openclaw gateway status
openclaw dashboardIf no service is installed, complete startup using the official quickstart. An absent service is not an API error. In Dashboard, select canalapi/YOUR_MODEL_ID, ask “Reply only OK; do not call tools”, and check CanalAPI usage logs. A healthy gateway or visible model list does not verify inference.
Next, summarize a fictional README in a test directory and inspect tool records. Add messaging, browsing and schedules afterward. Channel tokens, search services, embeddings, auxiliary tasks and fallback models have separate configuration and may incur additional calls.
Troubleshooting and recovery
- Old endpoint: inspect the same provider in
~/.openclaw/agents/<agentId>/agent/models.json; a nonempty agent-levelbaseUrlcan override the main config. Back up before editing; do not delete the state directory. - Missing model: verify registration, full ID, session and default model.
agents.defaults.modelsalone does not register a model. - Missing key: check the user-level
.env, service account and existing process variables, which may take precedence. - Undo: restore the backed-up settings, select the previous model and restart your instance. Revoke the dedicated key when no longer needed.
Sources: versioned provider reference, environment variables. See connection troubleshooting.