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%.
- Switch from API keys to device-code auth so agents use subscription credits
- Retire the API key to close open-ended billing
- Set agent model defaults (Sonnet for daily work, Haiku for background jobs) to stay within your ceiling
Verified against OpenClaw and Anthropic Claude on 2026-05-04.
Prerequisites
How ScaleIT handles this: See AI Quick-Start
- Active OpenClaw installation
- Claude Pro or Max subscription (not API-only)
- Terminal access to OpenClaw host machine
- Ability to restart the OpenClaw service
Steps
1. Confirm Active Claude Subscription
Before switching, verify your Claude account has a paid plan.
- Log in to https://claude.ai
- Click profile icon → Settings → Plan
- Confirm Claude Pro or Claude Max (not "Free Trial")
- Note the account email—this becomes your OpenClaw identity
- 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.
- Open terminal on OpenClaw host
- Run:
openclaw wizard auth - Select Anthropic provider
- Select device-code (labeled "subscription" in newer versions)
- Wizard prints device code and opens browser to https://claude.ai/auth/device
- Sign in with your Claude account, paste code, click Approve
- 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.
- Run:
openclaw auth verify - Output should show:
Anthropic (default): ✓ OKwithMode: device-codeand your account email - 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:
- Edit:
nano ~/.config/systemd/user/openclaw-gateway.service.d/env.conf - Delete line:
ANTHROPIC_API_KEY=sk-... - Run:
systemctl --user daemon-reload && systemctl --user restart openclaw-gateway
For CLI:
- Remove
export ANTHROPIC_API_KEY=sk-...from~/.bashrcor~/.zshrc - Run:
source ~/.bashrcor restart terminal
Revoke key:
- Go to https://console.anthropic.com
- Click API Keys → [Your Key] → Revoke
- Confirm revocation
5. Test Subscription Auth
Verify agents use device-code, not API key.
- Run agent:
openclaw run - Trigger an action that calls Claude
- Check logs:
journalctl --user -u openclaw-gateway -f - Look for "device-code" or "subscription" auth mention, not API key
- Confirm agent responds normally
6. Set Conservative Model Defaults
Keep usage within subscription ceiling.
- Open:
~/.openclaw/config.json(or gateway config) - Set agent models:
main: Sonnet (daily work, balanced quality and cost)tester: Sonnetsummarizer: Haiku (background jobs, cheapest)synthesis: Opus (only for complex analysis, rarely)
- Save file
- Restart:
systemctl --user restart openclaw-gateway
7. Monitor Usage Weekly
Catch runaway agents and stay within ceiling.
- Run:
openclaw doctor(checks token freshness and expiring tokens) - Log in to https://claude.ai → Settings → Usage
- Check usage bar (not dollar amount—you're on subscription)
- Under 30%: well-sized
- Approaching 100%: agents are heavy or misconfigured
- If high, drop a low-value agent, upgrade to Max, or move one agent to dedicated API key
Verify
- Run
openclaw auth verifyand confirm "device-code" in output. - Run
echo $ANTHROPIC_API_KEY; should print nothing. - Run
openclaw runand confirm no "api_key" string in logs.--verbose - Log in to https://claude.ai → Usage and confirm the bar moved this week.
Troubleshooting
Agent hangs after switching to device-code
- Cause: Refresh token expired or auth incomplete.
- Fix: Re-run
openclaw wizard authand complete approval. If "pairing required" error, re-check browser approval.
"Anthropic: ✗ Auth failed" on verify
- Cause: Token stale or Claude account password changed.
- Fix: Re-run
openclaw wizard auth. If you changed password/2FA, re-authorize.
Agent still hits API rate limits
- Cause: Old API key still in environment or stray process using it.
- Fix: Confirm
ANTHROPIC_API_KEYnot set:env | grep ANTHROPIC. Check systemd:grep -r ANTHROPIC_API_KEY ~/.config/systemd/. Revoke old key in Console.
Usage bar shows 0% but agents running
- Cause: Agents using old API key instead of subscription.
- Fix: Run
openclaw auth verify, check for "device-code". If showing "api_key", re-run auth wizard.
"Device code expired" during auth
- Cause: Took too long to approve in browser (5–10 minute window).
- Fix: Re-run
openclaw wizard authand approve within the time limit.
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.