OpenClaw
Last updated August 26, 2026
Point OpenClaw at RouterOne over the OpenAI-compatible protocol by adding one provider to openclaw.json.
OpenClaw is a personal AI assistant that runs on your own machine, reachable from a terminal UI, a web dashboard, or chat apps. It speaks the OpenAI-compatible protocol.
Recommended: let CC Switch do it
CC Switch supports OpenClaw — add a provider with https://gateway.routerone.ai/v1 as the Base URL, without editing JSON manually. Restart the gateway process after switching.
The manual route is below.
1. Install
npm i -g openclaw@latest2. Create an RouterOne key
Create one on the keys page in the console. The key remains viewable there after creation, so you do not need to rotate it just to retrieve it again.
3. Configure
Edit ~/.openclaw/openclaw.json and add an entry under models.providers:
~/.openclaw/config.json
{
"models": {
"providers": {
"amux": {
"baseUrl": "https://gateway.routerone.ai/v1",
"apiKey": "your RouterOne key",
"api": "openai-completions"
}
}
}
}| Field | Notes |
|---|---|
baseUrl | Keep the /v1 |
api | The request shape; use openai-completions |
The provider name (amux here) | You will use it as a prefix when switching models |
4. Start the gateway
Every OpenClaw entry point talks to its own gateway process:
openclaw gateway install
openclaw gateway startAfter changing configuration, restart it:
openclaw gateway restart5. Check it works
Open any entry point — the terminal UI or the web dashboard — and send a message.
Choosing models
Switch with /model in a conversation. Names are <provider>/<canonical ID>:
/model amux/anthropic/claude-opus-5
The prefix is the name you chose in the configuration. Models are not limited to OpenAI's. Claude, Gemini, and other compatible models can also be called over the OpenAI protocol. For parameter differences in cross-protocol calls, see protocol conversion compatibility.
To pin a provider or choose a routing strategy, append a colon to the canonical ID (/model amux/anthropic/claude-opus-5:@price) — see the API reference.
Troubleshooting
Configuration changes have no effect
The gateway was not restarted. Run openclaw gateway restart — every entry point talks to it, and editing the file does not make it re-read.
Authentication failure
Was the key copied in full (leading or trailing whitespace is the usual culprit)? Is it still enabled in the console? Does the workspace have balance? Also confirm baseUrl keeps the /v1 — an address one segment short also surfaces as an auth-style error, and people go looking at the key.
Model not found when switching
The name needs the provider prefix — amux/ plus the canonical ID, and neither half is optional. The canonical ID has a vendor prefix of its own, so the full form is three segments: amux/anthropic/claude-opus-5.
The JSON is broken
One stray comma in openclaw.json invalidates the whole file, and OpenClaw may quietly fall back to a default provider — which looks like "the configuration never took". Run it through any JSON validator.