← Home

Guide

OpenClaw + Anthropic: Use Anthropic Models with OpenClaw

Connect your AI agent to Anthropic — the company behind Claude, one of the most capable model families for reasoning, writing, and instruction-following.

What Is Anthropic?

Anthropic is an AI safety company that builds the Claude family of large language models. Founded in 2021, Anthropic focuses on creating safe, steerable, and helpful AI systems. Their models are widely used for conversation, analysis, coding, and creative tasks.

OpenClaw supports Anthropic models through two paths: the Anthropic API directly or via OpenRouter (which routes to Anthropic behind the scenes).

Available Anthropic Models

ModelBest ForContextCost (Input)
Claude Opus 4.6Complex reasoning, research, coding1M tokens~$15/M tokens
Claude Sonnet 4.6Best balance of speed & quality200K tokens~$3/M tokens
Claude Haiku 4.5Fast responses, daily chat, budget200K tokens~$0.80/M tokens

Option 1: Use Anthropic via OpenClaw Launch (Easiest)

The fastest way to get an Anthropic-powered agent. No API key needed.

  1. Go to openclawlaunch.com and open the configurator.
  2. Select a Claude model from the model dropdown.
  3. Pick your chat platform (Telegram, Discord, or Web).
  4. Click Deploy. Your Anthropic-powered agent is live in 10 seconds.
Tip: OpenClaw Launch routes Claude requests through OpenRouter automatically. AI credits are included in your plan — no separate Anthropic billing needed.

Option 2: Anthropic API Direct (Self-Hosted)

If you're running OpenClaw on your own server and have an Anthropic API key, you can connect directly without any intermediary:

{
  "models": {
    "providers": {
      "anthropic": {
        "apiKey": "sk-ant-..."
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "anthropic/claude-sonnet-4.6"
      }
    }
  }
}

Get your API key from the Anthropic Console. Billing is usage-based with no minimum commitment.

Option 3: Anthropic via OpenRouter (Self-Hosted)

OpenRouter acts as a unified gateway to multiple AI providers, including Anthropic. This is useful if you want to switch between providers without changing API keys:

{
  "models": {
    "providers": {
      "openrouter": {
        "apiKey": "sk-or-..."
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "openrouter/anthropic/claude-sonnet-4.6"
      }
    }
  }
}

Get your OpenRouter key from openrouter.ai/keys.

Anthropic API vs OpenRouter

FeatureAnthropic DirectOpenRouter
LatencyLowest (direct connection)Slightly higher (proxy hop)
Models availableAnthropic only300+ models from all providers
BillingAnthropic ConsoleOpenRouter unified billing
Model switchingNeed separate keys for other providersOne key for everything
Rate limitsAnthropic tier-basedOpenRouter managed

Recommendation: Use OpenRouter if you want flexibility to try other models. Use Anthropic direct if you're committed to Claude and want the lowest latency.

BYOK (Bring Your Own Key)

On OpenClaw Launch, you can use your own Anthropic API key or OpenRouter key instead of the included AI credits. In the configurator, select the BYOK option and paste your key. All requests will route through your own billing.

Switching Models at Runtime

OpenClaw lets you switch between Anthropic models without redeploying. Use the /model command in chat:

/model anthropic/claude-haiku-4.5
/model anthropic/claude-opus-4.6

This works for both self-hosted and managed instances.

What's Next?

Deploy with Anthropic

Get an Anthropic-powered AI agent running in 10 seconds.

Deploy Now