Note
This sets up OpenClaw using your claude.ai account (the same one behind Claude CLI) β no Console API key needed. As of April 2026, Anthropic changed their policy so that third-party tools like OpenClaw no longer pull from your included Pro/Max subscription usage. Instead, it bills against your Extra Usage (pay-as-you-go) balance. It still uses your claude.ai login, just not the included subscription credits. See how to verify your usage at the bottom.
Don't panic! π¦ OpenClaw can authenticate using your existing claude.ai account β the same one you use with Claude CLI. No API keys, no console account, no extra signup needed.
There's one gotcha: the setup command writes the wrong model prefix, which breaks things. But it's an easy fix β takes about 2 minutes and you'll be clawing along in no time.
Make sure you're signed into Claude CLI first (claude auth status to check), then run:
openclaw models auth login --provider anthropic --method cli --set-defaultYou'll see Default model set to claude-cli/claude-sonnet-4-6 β that's expected but wrong. Next step fixes it.
Caution
Don't skip this. The login command sets the model to claude-cli/... which doesn't work. You'll get an "Unknown model" error until you fix it.
Option A β run this command:
sed -i.bak 's|claude-cli/|anthropic/|g' ~/.openclaw/openclaw.jsonOption B β open ~/.openclaw/openclaw.json in any text editor and find-and-replace claude-cli/ with anthropic/.
openclaw gateway restart && openclaw statusYou should see anthropic/claude-sonnet-4-6 with no errors. That's it β you're done.
"Unknown model" error
You missed Step 2. Run the fix:
sed -i.bak 's|claude-cli/|anthropic/|g' ~/.openclaw/openclaw.json
openclaw restartAuth not working
Make sure Claude CLI is signed in first:
claude auth statusShould show authMethod: "claude.ai" and a Pro or Max subscription. If not, run claude auth login first, then redo Step 1.
Want to verify the config manually?
Open ~/.openclaw/openclaw.json. The key parts should look like:
"auth": {
"profiles": {
"anthropic:default": {
"provider": "anthropic",
"mode": "token"
}
}
}"model": {
"primary": "anthropic/claude-sonnet-4-6"
}Prefer a static API key?
Set ANTHROPIC_API_KEY in ~/.openclaw/.env (not a workspace .env) and change "mode" to "api_key" in the auth profile.
After running OpenClaw for a bit, you can confirm it's billing against Extra Usage:
- Open claude.ai or the Claude desktop app
- Go to Settings β Usage
- You should see OpenClaw activity showing up under Extra Usage, not your included subscription credits
If you don't see any Extra Usage charges, double-check that your auth is working (openclaw status) and that you've actually sent some messages through OpenClaw.
Note: Your
openclaw.jsoncontains sensitive tokens. Don't share or commit it.
MIT