---
title: "Draft OpenClaw integration"
description: "Unverified draft settings for using OpenClaw with minirouter."
canonical_url: "https://minirouter.sh/integrations/openclaw"
markdown_url: "https://minirouter.sh/integrations/openclaw.md"
last_updated: "2026-08-04"
---

# OpenClaw + minirouter

Verification status: UNVERIFIED DRAFT
Confirm the current client fields and run the verification request before relying on this configuration.

Draft provider block for registering minirouter in OpenClaw's config, plus the spend controls an unattended agent needs.

Base URL: https://api.minirouter.sh/v1
Get a key: https://minirouter.sh/key

## Settings

config.json5 in the OpenClaw config directory

1. models.providers.minirouter.baseUrl: https://api.minirouter.sh/v1
   Complete, including /v1. OpenClaw treats this as the OpenAI-compatible root and appends /chat/completions itself.
2. models.providers.minirouter.api: openai-completions
3. models.providers.minirouter.apiKey: ${MINIROUTER_KEY}
   Read from the environment rather than written into the config file.
4. agents.defaults.model.primary: minirouter/meta/llama-3.3-70b
   Defining the provider is not enough — the model also has to be reachable from the agent defaults, or OpenClaw declines to use it.

## Draft configuration

config.json5 — unverified draft

```
{
  agents: {
    defaults: {
      model: { primary: "minirouter/meta/llama-3.3-70b" }
    }
  },
  models: {
    providers: {
      minirouter: {
        baseUrl: "https://api.minirouter.sh/v1",
        apiKey: "${MINIROUTER_KEY}",
        api: "openai-completions",
        timeoutSeconds: 300,
        // cost is OpenClaw's own accounting field, in USD per million
        // tokens. Copy the current rates for each model you add from
        // https://minirouter.sh/models rather than leaving these stale.
        models: [
          {
            id: "meta/llama-3.3-70b",
            name: "Llama 3.3 70B (minirouter)",
            reasoning: false,
            input: ["text"],
            cost: { input: 0.756, output: 0.756 },
            contextWindow: 128000,
            maxTokens: 8192
          }
        ]
      }
    }
  }
}
```

## Recommended models

Only use a model after confirming it appears in the live model catalog at https://minirouter.sh/api/v1/models.

- meta/llama-3.3-70b: General-purpose candidate for the always-on turn loop.
- mistral/ministral-14b: Small, cheap candidate for the routine turns that make up most of the day.
- zai/glm-5: Tool-calling candidate for multi-step chores.
- deepseek/deepseek-v3: Reasoning-oriented candidate for the turns that need it.

## Troubleshooting

### Provider loads but every model call 404s

Paste https://api.minirouter.sh/v1 complete, including the /v1. These clients treat the base URL as the OpenAI-compatible root and append /chat/completions themselves, so trimming the /v1 leaves them calling a path that does not exist.

Error reference: https://minirouter.sh/docs/errors#invalid_request

### Provider is defined but the model is refused

Declaring a provider does not make its models usable. The model has to be reachable from agents.defaults as well — check the primary model id matches the provider name and the model id exactly, provider/author/name.

### Credits gone overnight with nothing to show

An agent in a retry loop spends at machine speed. Set dailyLimitNano on the key the agent uses — one key per agent, so a runaway is contained to that key rather than the whole balance.

Error reference: https://minirouter.sh/docs/errors#insufficient_credits

### 401 on every request

Wrong or rotated key. Keys start with mr-live-; after a rotation the old key keeps working for 24 hours, then dies.

Error reference: https://minirouter.sh/docs/errors#invalid_api_key

### The agent goes quiet mid-conversation in a chat channel

The balance reached $0 mid-stream. The stream ends with a terminal error naming the exact charge for tokens already delivered — but you are reading it inside WhatsApp or Telegram, where there is no UI but the message itself, which is why that error carries a URL.

Error reference: https://minirouter.sh/docs/errors#insufficient_credits
