Skip to main content

Connect Open Claw to DIAL

In this tutorial you 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. This tutorial is for developers who already have a DIAL host and Open Claw installed.

Prerequisites​

What you'll build​

DIAL registered as the default model provider in Open Claw. By the end, one agent turn runs against your DIAL deployment and names the model back to you.

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

Verify:

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?"

Verify:

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.

What you learned​

  • How to store your DIAL key and register a DIAL provider block in openclaw.json.
  • How to set a DIAL deployment as Open Claw's default model.
  • How to run one agent turn against DIAL to confirm the connection.

Good to know​

  • DIAL has no single /v1/chat/completions router: each deployment needs its own provider block whose baseUrl ends in that deployment id. To add a second model, copy the block (for example, as dial-claude) and reference it as dial-claude/<deployment-id>.
  • The openai-completions wire uses Chat Completions. To reach a Responses-only deployment, set "api": "openai-responses" and point baseUrl at https://<YOUR_DIAL_HOST>/openai/v1 instead.
  • Open Claw also sends Authorization: Bearer from apiKey; the explicit headers.Api-Key entry 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-version on the request URL and max_completion_tokens in place of max_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.

Next steps​