Available Models

Model Context Images Tools Price (1M tokens)
Claude Sonnet 4
High-performance model balancing capability and speed
200K ✓ ✓ $3 / $15
Claude Haiku
Fast, cost-effective model for simple tasks
200K ✓ ✓ $0.25 / $1.25

Authentication

API KEY

Standard API key authentication

Environment Variable: ANTHROPIC_API_KEY

Setup Steps:

  1. Create an account at console.anthropic.com
  2. Navigate to API Keys section
  3. Generate a new API key
  4. Set ANTHROPIC_API_KEY environment variable

OAUTH

OAuth for Claude subscriptions

Setup Steps:

  1. Run openclaw onboard
  2. Select OAuth authentication
  3. Complete browser-based login
  4. Tokens are automatically managed

Configuration Example

{
  "models": {
    "providers": {
      "anthropic": {
        "apiKey": "${ANTHROPIC_API_KEY}"
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "anthropic/claude-sonnet-4-20250514"
      }
    }
  }
}

Use Anthropic with Messaging Channels

Connect Anthropic to your favorite messaging platforms:

Frequently Asked Questions

How much does Anthropic cost with OpenClaw?
Anthropic pricing depends on your usage. Anthropic charges based on tokens processed. OpenClaw itself is free and open source. You only pay for the AI provider API costs.
How do I authenticate Anthropic with OpenClaw?
Anthropic supports api_key, oauth. The most common method is using an API key which you can get from the Anthropic console.
Which Anthropic models work with OpenClaw?
OpenClaw supports all Anthropic models including Claude Sonnet 4, Claude Haiku. You can configure your preferred model in openclaw.json or use model aliases for convenience.
Can I use Anthropic as a fallback provider?
Yes, OpenClaw supports automatic failover. You can configure Anthropic as a fallback in the model configuration. If your primary provider fails, OpenClaw will automatically switch to Anthropic.