Skip to content

coder999999999/openclaw-auth-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 

Repository files navigation

🦞 How to Use OpenClaw with Your Claude Pro/Max Account

OpenClaw Claude License


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.


Step 1 β€” Log in

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-default

You'll see Default model set to claude-cli/claude-sonnet-4-6 β€” that's expected but wrong. Next step fixes it.

Step 2 β€” Fix the model prefix

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.json

Option B β€” open ~/.openclaw/openclaw.json in any text editor and find-and-replace claude-cli/ with anthropic/.

Step 3 β€” Restart

openclaw gateway restart && openclaw status

You should see anthropic/claude-sonnet-4-6 with no errors. That's it β€” you're done.


Troubleshooting

"Unknown model" error

You missed Step 2. Run the fix:

sed -i.bak 's|claude-cli/|anthropic/|g' ~/.openclaw/openclaw.json
openclaw restart
Auth not working

Make sure Claude CLI is signed in first:

claude auth status

Should 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.


Verifying Extra Usage

After running OpenClaw for a bit, you can confirm it's billing against Extra Usage:

  1. Open claude.ai or the Claude desktop app
  2. Go to Settings β†’ Usage
  3. 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.json contains sensitive tokens. Don't share or commit it.

License

MIT

About

🦞 How to use OpenClaw with your Claude Pro/Max subscription instead of the Console API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors