OpenClaw
OpenClaw is a local-first personal AI agent / gateway. To route it through PrimeRouter, the recommended path is the one-line installer — run it, pick the Anthropic (Claude) or OpenAI (Codex) channel, and every request uses your PrimeRouter token, balance, and call logs.
Two channels, pick one
| Channel | Base URL | Example model |
|---|---|---|
| Anthropic (Claude) | https://primerouter.ai | claude-opus-4-8 |
| OpenAI (Codex) | https://primerouter.ai/v1 | gpt-5.5 |
The Claude / Anthropic endpoint must not include /v1; the OpenAI / Codex endpoint must include /v1.
Recommended: interactive one-line installer
Run it, pick a channel, paste your API key, and choose a model from the gateway's live list — the script installs OpenClaw and writes the config.
curl -fsSL https://primerouter.ai/install/openclaw.sh | bashirm https://primerouter.ai/install/openclaw.ps1 | iex💡 The script prompts for your API key. Grab one for the right group at Console → Tokens first, then paste it when asked.
Send a first message to verify (one-shot messages must target an agent with --agent main, or you'll get No target session selected):
openclaw agent --agent main --message "Hello, introduce yourself"Interactive mode:
openclawFallback: manual install and configuration
Expand if you want to review the commands, or the installer isn't available
Step 1: Install OpenClaw
OpenClaw requires Node.js v22.19+:
npm install -g openclaw@latestStep 2: Pick a channel
Replace YOUR_API_KEY with your PrimeRouter token, then run the command for your channel:
openclaw onboard --auth-choice custom-api-key \
--custom-base-url https://primerouter.ai \
--custom-api-key YOUR_API_KEY \
--custom-compatibility anthropic \
--custom-model-id claude-opus-4-8openclaw onboard --auth-choice custom-api-key \
--custom-base-url https://primerouter.ai/v1 \
--custom-api-key YOUR_API_KEY \
--custom-compatibility openai \
--custom-model-id gpt-5.5The Anthropic (Claude) channel uses the root URL — no
/v1; the OpenAI (Codex) channel uses the/v1URL. Other models are listed under Available models.
Step 3: Start using it
One-shot sanity check (one-shot messages must target an agent with --agent main):
openclaw agent --agent main --message "Hello, introduce yourself"Interactive mode:
openclawThe full walkthrough — per-platform gateway daemon, Control UI, chat-channel onboarding, and security notes — lives in Coding Tools → OpenClaw.
