Guide
Use Your Claude Pro/Max Subscription with OpenClaw
Already paying for Claude Pro ($20/mo) or Max? Connect it to your OpenClaw instance and run Claude models on your subscription quota — no separate Anthropic API key, no per-token billing.
Running Hermes Agent instead of OpenClaw? See the Hermes Claude subscription guide.
How It Works
OpenClaw can authenticate to Anthropic with a Claude Code subscription token instead of a pay-per-token API key. You generate a long-lived token with claude setup-token (or sign in directly from the terminal), store it on your instance, and OpenClaw routes Claude turns through your subscription's included quota.
What You Need
- An active Claude Pro ($20/mo) or Claude Max subscription
- A deployed OpenClaw instance on OpenClaw Launch
- Claude Code installed locally (to run
claude setup-token), or you can sign in directly from the instance terminal
Step 1: Get a Subscription Token
On your own computer, with Claude Code installed and signed in to your Claude subscription, run:
claude setup-tokenThis prints a long-lived token that starts with sk-ant-oat01-. Copy it. (Prefer to sign in interactively instead? Skip to the alternative in Step 2.)
Step 2: Store the Token on Your Instance
- Go to your Dashboard and click the Terminal button on your instance.
- Paste the token into OpenClaw's auth store:
It will prompt for the token value — paste theopenclaw models auth paste-token --provider anthropicsk-ant-oat01-token and press Enter.
Alternative (no local Claude Code): run the interactive token flow directly in the instance terminal instead:
openclaw models auth setup-token --provider anthropicStep 3: Set a Claude Model as Default
Point your agent at a Claude model:
openclaw models set anthropic/claude-sonnet-4.6Prefer the most capable model? Use anthropic/claude-opus-4.8 instead.
Step 4: Verify It Works
Send a message to your bot on Telegram, Discord, or whichever platform you connected — the reply should come from Claude. You can also check the active model and auth state:
openclaw models statusAvailable 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
- Provisional policy: Anthropic only recently un-banned programmatic subscription use, and it has signaled the rules may change again. Don't rely on this for mission-critical uptime.
- Usage limits: Claude subscriptions enforce a 5-hour rolling window plus a weekly cap. Heavy agent use can hit those limits before they reset.
- Account risk: this uses your personal Claude account from a hosted server. If you want guaranteed, isolated billing, use an Anthropic API key instead.
- Token refresh: subscription tokens can expire or be rotated. If Claude turns start failing with auth errors, re-run the paste-token / setup-token step.
Other Ways to Bring Your Own Key
- Anthropic API key — Pay-per-token, no subscription limits
- ChatGPT subscription — Use GPT-5.5 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.
Troubleshooting
setup-token says it needs a terminal
openclaw models auth setup-token requires an interactive TTY. Use the web terminal on your instance (not an automated script), or generate the token locally with claude setup-token and store it with paste-token instead.
Auth errors after a while
Subscription tokens are long-lived but not permanent. If Claude responses start failing, re-run openclaw models auth paste-token --provider anthropic with a fresh token.
Hitting quota limits
Claude subscriptions cap usage on a 5-hour window and a weekly total. If you hit the cap, switch temporarily to an API key or another model until it resets.