OpenClaw
Run OpenClaw on models you pay for in DADAThe Algerian dinar, the one currency the docs show.More on Balance and charges →.
OpenClaw takes custom providers in ~/.openclaw/openclaw.json. OpenDunes goes in as one, and OpenClaw sends each request to POST /v1/chat/completions.
1. Install OpenClaw
OpenClaw needs Node 24.16 or later.
| On | Install line |
|---|---|
| macOS, Linux, WSL | curl -fsSL https://openclaw.ai/install.sh | bash |
| Windows, PowerShell | iwr -useb https://openclaw.ai/install.ps1 | iex |
Create an API keyAPI keyThe key you create and send with every request that calls a model.More on API keys → for OpenClaw alone, and cap it on API Keys (API keys shows how). Put it in your shell profile, ~/.zshrc or ~/.bashrc, as export OPENDUNES_API_KEY="…".
2. Add OpenDunes as a provider
openclaw.json is JSON5: keys need no quotes, and a comment is allowed. Add OpenDunes under models.providers, with each model you want OpenClaw to offer:
{
models: {
mode: "merge",
providers: {
opendunes: {
baseUrl: "https://opendunes.com/v1",
apiKey: "${OPENDUNES_API_KEY}",
api: "openai-completions",
models: [
{
id: "anthropic/claude-sonnet-4.5",
name: "Claude Sonnet 4.5",
input: ["text", "image"],
contextWindow: 1000000,
maxTokens: 64000,
},
{
id: "anthropic/claude-opus-5.5",
name: "Claude Opus 5.5",
input: ["text", "image"],
contextWindow: 1000000,
maxTokens: 128000,
},
],
},
},
},
}| Key | Holds |
|---|---|
baseUrl | the address, with /v1 |
apiKey | ${OPENDUNES_API_KEY}: OpenClaw reads the key from the environment, and the file never holds it |
api | openai-completions: the chat completions shape |
models[].id | the model IDModel IDThe name a request calls a model by, lab/model, copied from Models.More on Models →, as it stands in Models |
contextWindow, maxTokens | how much the model reads and writes, from its page in Models |
mode | merge: OpenDunes joins the providers OpenClaw already knows |
3. Set the default model
A model is named by the provider, a slash, then its ID. In the same file, add:
{
agents: {
defaults: {
model: {
primary: "opendunes/anthropic/claude-sonnet-4.5",
},
},
},
}openclaw models set opendunes/anthropic/claude-opus-5.5 switches the default later without editing the file. Each model is charged at its own rate, shown on its page in Models.
4. Check the setup
openclaw models list --provider opendunes
openclaw models statusThe list shows the models you added; models status shows the default model and whether its key is set. Start OpenClaw with openclaw, send one short task, then open Activity, in the app on opendunes.com: the request is there, with its charge in DA.
If OPENDUNES_API_KEY is not set where OpenClaw runs, ${OPENDUNES_API_KEY} stays as it is and OpenClaw warns: requests then get a 401. A service started at login does not read your shell profile.
Errors
| Status | Means | Do |
|---|---|---|
| 401 | the key is missing, wrong, paused, revoked or expired | check OPENDUNES_API_KEY where OpenClaw runs |
| 402 | the balanceBalanceWhat you can spend, in DA.More on Balance and charges → is at zero or below, cannot pay the request's hold, or the key's cap is spent | make a depositDepositMoney entering your balance, by CIB or Edahabia card.More on Balance and charges →, or raise the cap |
| 404 | the model ID is not on sale | copy the ID from Models into models[].id |
Every other status: Errors and retries. Other terminal agents: Coding agents.
Next: OpenCode · Hermes Agent
Last modified on