Guide
Using a Claude Pro/Max Subscription with OpenClaw
Short answer: not on a hosted instance. Anthropic prohibits third-party services from routing requests through Claude Pro or Max plan credentials, and has blocked subscription tokens outside Claude Code since January 2026. Here's the policy — and the supported way to run Claude models on OpenClaw.
Running Hermes Agent instead of OpenClaw? See the Hermes Claude subscription guide.
What People Are Trying to Do
OpenClaw's Anthropic provider can authenticate with a Claude Code subscription token instead of a pay-per-token API key. The idea is to generate a long-lived token with claude setup-token, store it on a bot instance, and have Claude turns draw on subscription quota you're already paying for. It's a reasonable thing to want. Anthropic has closed it off.
What About Self-Hosting?
Running Anthropic's own claude CLI on a machine you control — your laptop, your own VPS — is ordinary use, and the policy doesn't restrict where you run it. The line Anthropic draws is about who holds the credential and who makes the request: a third-party service acting on your behalf is prohibited, whether that service is us or anyone else.
So if you self-host OpenClaw and it drives the official CLI on your own hardware, that's between you and Anthropic's consumer terms. What we won't do is take custody of your subscription credential and route your bot's traffic through it — that's the part the policy names, and the risk lands on your account, not ours.
The Supported Path: An Anthropic API Key
An API key from the Claude Console is the authentication method Anthropic explicitly directs developers to. Same Claude models, no account risk.
- Create a key at platform.claude.com and copy the
sk-ant-api03-value. - Save it on the API Keys page, or store it on the instance directly:
openclaw models auth paste-api-key --provider anthropic - Point your agent at a Claude model:
openclaw models set anthropic/claude-sonnet-4.6
Full walkthrough: OpenClaw + Anthropic API key. If you'd rather not add a key at all, every plan includes AI credits and free models out of the box.
Available Models
| Model ID | Model | Best For |
|---|---|---|
anthropic/claude-sonnet-4.6 | Claude Sonnet 4.6 | Fast, all-purpose |
anthropic/claude-opus-4.8 | Claude Opus 4.8 | Most capable, complex reasoning |
Important Notes
- Stay on the official CLI: the supported path is the real
claudebinary making the request. A third-party harness calling the API with your subscription token is not permitted, is enforced server-side without notice, and can cost you the Claude account itself. - Revoke old tokens: a token from
claude setup-tokenis valid for about a year. If you pasted one into a third-party tool at any point, revoke the authorization in your Claude account rather than leaving it to expire. - Subscription caps suit interactive use, not bots: Claude plans enforce a 5-hour rolling window plus a weekly total. An agent answering messages around the clock burns through those far faster than a person at a keyboard, so per-token billing is the better fit even setting policy aside.
Other Ways to Bring Your Own Key
- Anthropic API key — Pay-per-token, no subscription limits
- ChatGPT subscription — Use GPT-5.6 via your ChatGPT Plus/Pro plan
- OpenRouter — Access 200+ models with one key
Or skip API keys entirely — OpenClaw Launch includes AI credits and free models out of the box.
Common Questions
“This credential is only authorized for use with Claude Code”
That is Anthropic's server-side block on subscription tokens used outside Claude Code, live since January 2026. There is no configuration that gets around it, and attempting to work around it is what puts accounts at risk. Switch to an Anthropic API key.
Does this affect the ChatGPT subscription connection?
No. That one remains available — OpenAI publishes no equivalent restriction on using a Plus or Pro plan through a third-party client. See the ChatGPT subscription guide.
Will an Anthropic API key cost much more?
For a typical always-on bot, usually less than you'd expect: you pay for the tokens a conversation actually uses rather than a flat monthly fee. Claude Haiku handles routine replies cheaply, and you can reserve Sonnet or Opus for harder turns.