← Home

Guide

Use Your Claude Pro/Max Subscription with Hermes Agent

Already paying for Claude Pro ($20/mo) or Max? Connect it to your Hermes Agent instance and run Claude models on your subscription quota — no separate Anthropic API key, no per-token billing.

Running OpenClaw instead of Hermes? See the OpenClaw Claude subscription guide.

How It Works

Hermes Agent's Anthropic provider reads a Claude Code subscription token from the CLAUDE_CODE_OAUTH_TOKEN environment variable. When that token is present, Hermes routes Claude turns through your subscription's included quota instead of the pay-per-token Anthropic API — no API key required.

Is this allowed? Anthropic walked back its earlier ban on programmatic use of Claude subscription quota. Because the 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 Hermes Agent instance on OpenClaw Launch
  • Claude Code installed locally, to run claude setup-token

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.

Step 2: Connect It on the API Keys Page

  1. Open API Keys in your dashboard.
  2. Find the Claude Subscription card, paste your sk-ant-oat01- token, and click Save.
  3. Your token is encrypted at rest and injected into your Hermes instance as CLAUDE_CODE_OAUTH_TOKEN. Hermes restarts briefly to pick it up.

Step 3: Use a Claude Model

Set your Hermes agent's model to a Claude model (e.g. anthropic/claude-sonnet-4.6 or anthropic/claude-opus-4.8). Hermes detects the provider per call and uses your subscription token for Claude turns.

Step 4: Verify It Works

Send a message to your bot on whichever platform you connected. The reply should come from Claude, drawing on your subscription quota rather than API billing.

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

  • API key takes precedence: Hermes resolves Anthropic auth in the order ANTHROPIC_API_KEYANTHROPIC_TOKEN CLAUDE_CODE_OAUTH_TOKEN. If you also have an Anthropic API key saved, remove it so the subscription token is actually used.
  • Provisional policy: Anthropic only recently un-banned programmatic subscription use and may change the rules again. Don't rely on it 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. For guaranteed, isolated billing, use an Anthropic API key instead.

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

Claude turns still bill my API account

Hermes prefers ANTHROPIC_API_KEY over the subscription token. Remove any saved Anthropic API key on the API Keys page so the subscription token is used.

Auth errors after a while

Subscription tokens are long-lived but not permanent. If Claude responses start failing, run claude setup-token again and paste the fresh token on the API Keys page.

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 Hermes agent — running on your existing subscription.

Deploy Now