Home

Switch language

Start Install GuideQuick StartDocs Overview
Docs ChannelsModels & APIGateway OpsTools & Skills
More ArticlesResourcesHelp Center
Get Started
Documentation navigation Providers
Providers 3 sections

Claude

Anthropic

Anthropic's main route is still the API key. Subscription users can also generate a long-lived token through claude setup-token and hand that to OpenClaw. API keys are usually more stable on servers; setup-token is better when you want to reuse a subscription.

Two Main Paths

API Key Recommended

Anthropic API key

Best for standard API usage, usage-based billing and environments where you need repeatable key rotation across many agents or servers.

Subscription

setup-token

Best for Claude subscription users. You can run claude setup-token anywhere, then paste the resulting token into the Gateway host.

Common Commands

Set up API key auth

openclaw onboard
# choose: Anthropic API key
openclaw onboard --anthropic-api-key "$ANTHROPIC_API_KEY"

Use setup-token

claude setup-token
openclaw models auth setup-token --provider anthropic
openclaw models auth paste-token --provider anthropic

Check auth status

openclaw models status

Frequent Questions

Why do I suddenly see OAuth token refresh failed

This usually means the subscription auth state expired or was revoked. For Anthropic, the most stable recovery path is often to regenerate and paste a new setup-token.

Why do I get No API key found for provider anthropic

Usually the current agent does not have Anthropic credentials configured. Auth is isolated per agent, so new agents do not automatically inherit the main agent's keys.