Connect Open Claw to DIAL
Introduction
From this tutorial, you will learn how to add DIAL as a model provider in Open Claw, the self-hosted agent gateway, set it as the default, and run one agent turn. Every agent turn is then routed to your DIAL deployment, with DIAL roles, quotas, audit, and cost tracking applied. By the end, one agent turn runs against your DIAL deployment and names the model back to you.
Prerequisites
- A DIAL host and API key. Refer to Prerequisites.
- Node.js 22 or newer.
- Open Claw installed.
Step 1: Store your DIAL key
Add it to ~/.openclaw/.env (on Windows, %USERPROFILE%\.openclaw\.env):
DIAL_API_KEY="<DIAL_API_KEY>"
Step 2: Add a DIAL provider
Edit ~/.openclaw/openclaw.json. The DIAL deployment id is part of baseUrl, so you use one provider block per deployment you want to expose.
{
"models": {
"mode": "merge",
"providers": {
"dial": {
"baseUrl": "https://<YOUR_DIAL_HOST>/openai/deployments/gpt-5.4-2026-03-05",
"apiKey": "${DIAL_API_KEY}",
"headers": { "Api-Key": "${DIAL_API_KEY}" },
"api": "openai-completions",
"models": [
{
"id": "gpt-5.4",
"name": "GPT-5.4 (DIAL)",
"reasoning": false,
"input": ["text"],
"contextWindow": 128000,
"maxTokens": 4096
}
]
}
}
},
"agents": {
"defaults": {
"model": { "primary": "dial/gpt-5.4" },
"models": { "dial/gpt-5.4": {} }
}
}
}
Step 3: Set the active model
openclaw models set dial/gpt-5.4
You see Default model: dial/gpt-5.4. To confirm the key was picked up, run openclaw models status and check that the dial provider is listed with auth present.
Step 4: Run one agent turn
openclaw agent --local --agent main -m "Reply in one short sentence: what model are you?"
You see a reply naming your DIAL model — for example, "I am the dial/gpt-5.4 model." — followed by stopReason=stop. The --local flag runs the agent in-process, which is the quickest way to confirm the connection. For everyday use, start the gateway once with openclaw gateway run and drop the --local flag.
Additional Information
- DIAL has no single
/v1/chat/completionsrouter: each deployment needs its own provider block whosebaseUrlends in that deployment id. To add a second model, copy the block (for example, asdial-claude) and reference it asdial-claude/<deployment-id>. - The
openai-completionswire uses Chat Completions. To reach a Responses-only deployment, set"api": "openai-responses"and pointbaseUrlathttps://<YOUR_DIAL_HOST>/openai/v1instead. - Open Claw also sends
Authorization: BearerfromapiKey; the explicitheaders.Api-Keyentry above is what DIAL authenticates on. - Tool calling, reasoning, and attachments work only when the DIAL deployment advertises those capabilities.
- On Azure-backed GPT-5.x deployments, expect the two settings from Azure-backed deployment settings: an
api-versionon the request URL andmax_completion_tokensin place ofmax_tokens. Non-GPT-5.x deployments typically need neither. - This wires only the model backend. Messaging channels still need their own Open Claw channel config and secrets.
- Refer to Connect OpenCode to DIAL for another terminal agent that uses Chat Completions.
- Refer to the Agentic Tools overview for shared prerequisites and the other tools.
- Refer to the Unified API reference for the API DIAL exposes.