← Home

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.

Is this allowed? Anthropic walked back its earlier ban on programmatic use of Claude subscription quota — OpenClaw-style Claude CLI usage is sanctioned again unless Anthropic publishes a new policy. Because that policy is still settling, treat this as a power-user option and watch for usage limits.

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

This 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

  1. Go to your Dashboard and click the Terminal button on your instance.
  2. Paste the token into OpenClaw's auth store:
    openclaw models auth paste-token --provider anthropic
    It will prompt for the token value — paste the sk-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 anthropic

Step 3: Set a Claude Model as Default

Point your agent at a Claude model:

openclaw models set anthropic/claude-sonnet-4.6

Prefer 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 status

Available Models

Model IDModelBest For
anthropic/claude-sonnet-4.6Claude Sonnet 4.6Fast, all-purpose
anthropic/claude-opus-4.8Claude Opus 4.8Most 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

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.

Deploy with Your Claude Subscription

Get a Claude-powered agent on Telegram or Discord — running on your existing subscription.

Deploy Now