How to Use Claude Pro/Max Credits With OpenClaw Instead of API Fees (2026)

How to Use Claude Pro/Max Credits With OpenClaw Instead of API Fees (2026)

Lead

Run OpenClaw on a Claude Pro or Max subscription and get a fixed monthly bill instead of metered API costs. For small teams running daily automations and scheduled reports, this single change cuts Claude spend by 70–80%.

Verified against OpenClaw and Anthropic Claude on 2026-05-04.

Prerequisites

How ScaleIT handles this: See AI Quick-Start

Steps

1. Confirm Active Claude Subscription

Before switching, verify your Claude account has a paid plan.

  1. Log in to https://claude.ai
  2. Click profile icon → Settings → Plan
  3. Confirm Claude Pro or Claude Max (not "Free Trial")
  4. Note the account email—this becomes your OpenClaw identity
  5. One subscription seat per OpenClaw install is the pattern; don't share across gateways

2. Run Device-Code Auth Wizard

Replace your API key with device-code auth.

  1. Open terminal on OpenClaw host
  2. Run: openclaw wizard auth
  3. Select Anthropic provider
  4. Select device-code (labeled "subscription" in newer versions)
  5. Wizard prints device code and opens browser to https://claude.ai/auth/device
  6. Sign in with your Claude account, paste code, click Approve
  7. Return to terminal; wizard writes refresh token to ~/.openclaw/agents//auth-profiles.json

For headless servers: openclaw auth set anthropic:default --mode device --headless and complete the flow on a different machine.

3. Verify Device-Code Auth

Confirm authentication succeeded.

  1. Run: openclaw auth verify
  2. Output should show: Anthropic (default): ✓ OK with Mode: device-code and your account email
  3. If you see an error, re-run the wizard and double-check the device code approval

4. Remove the API Key

Stop any fallback to metered billing.

For systemd service:

  1. Edit: nano ~/.config/systemd/user/openclaw-gateway.service.d/env.conf
  2. Delete line: ANTHROPIC_API_KEY=sk-...
  3. Run: systemctl --user daemon-reload && systemctl --user restart openclaw-gateway

For CLI:

  1. Remove export ANTHROPIC_API_KEY=sk-... from ~/.bashrc or ~/.zshrc
  2. Run: source ~/.bashrc or restart terminal

Revoke key:

  1. Go to https://console.anthropic.com
  2. Click API Keys → [Your Key] → Revoke
  3. Confirm revocation

5. Test Subscription Auth

Verify agents use device-code, not API key.

  1. Run agent: openclaw run
  2. Trigger an action that calls Claude
  3. Check logs: journalctl --user -u openclaw-gateway -f
  4. Look for "device-code" or "subscription" auth mention, not API key
  5. Confirm agent responds normally

6. Set Conservative Model Defaults

Keep usage within subscription ceiling.

  1. Open: ~/.openclaw/config.json (or gateway config)
  2. Set agent models:
  1. Save file
  2. Restart: systemctl --user restart openclaw-gateway

7. Monitor Usage Weekly

Catch runaway agents and stay within ceiling.

  1. Run: openclaw doctor (checks token freshness and expiring tokens)
  2. Log in to https://claude.ai → Settings → Usage
  3. Check usage bar (not dollar amount—you're on subscription)
  1. If high, drop a low-value agent, upgrade to Max, or move one agent to dedicated API key

Verify

  1. Run openclaw auth verify and confirm "device-code" in output.
  2. Run echo $ANTHROPIC_API_KEY; should print nothing.
  3. Run openclaw run --verbose and confirm no "api_key" string in logs.
  4. Log in to https://claude.ai → Usage and confirm the bar moved this week.

Troubleshooting

Agent hangs after switching to device-code

"Anthropic: ✗ Auth failed" on verify

Agent still hits API rate limits

Usage bar shows 0% but agents running

"Device code expired" during auth

CTA

Predictable automation costs are one less thing to forecast when scaling. Contact us for a free consultation if you'd like help switching to subscription auth or sizing your agent fleet for your workload.