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
| Model | Best For | Context | Cost (Input) |
|---|---|---|---|
| Claude Opus 4.6 | Complex reasoning, research, coding | 1M tokens | ~$15/M tokens |
| Claude Sonnet 4.6 | Best balance of speed & quality | 200K tokens | ~$3/M tokens |
| Claude Haiku 4.5 | Fast responses, daily chat, budget | 200K 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.
- Go to openclawlaunch.com and open the configurator.
- Select a Claude model from the model dropdown.
- Pick your chat platform (Telegram, Discord, or Web).
- Click Deploy. Your Anthropic-powered agent is live in 10 seconds.
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
| Feature | Anthropic Direct | OpenRouter |
|---|---|---|
| Latency | Lowest (direct connection) | Slightly higher (proxy hop) |
| Models available | Anthropic only | 300+ models from all providers |
| Billing | Anthropic Console | OpenRouter unified billing |
| Model switching | Need separate keys for other providers | One key for everything |
| Rate limits | Anthropic tier-based | OpenRouter 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.6This works for both self-hosted and managed instances.
What's Next?
- OpenClaw + Claude Guide — Deep dive into specific Claude models and use cases
- OpenRouter Guide — Set up OpenRouter for multi-provider access
- Compare All Models — See how Anthropic compares to GPT, Gemini, DeepSeek, and others
- Pricing — Deploy with AI credits included, starting at $3/month