Anthropic
Anthropic Claude 模型集成。
支持的模型
anthropic/claude-opus-4-20250514- Claude Opus 4anthropic/claude-sonnet-4-20250514- Claude Sonnet 4anthropic/claude-haiku-3-20240307- Claude Haiku 3
认证方式
Setup-token(推荐用于订阅)
bash
# 在任何机器上生成 token
claude setup-token
# 在 OpenClaw 中使用
openclaw models auth setup-token --provider anthropic或粘贴已有 token:
bash
openclaw models auth paste-token --provider anthropicAPI 密钥
- 获取 API 密钥:https://console.anthropic.com/
- 配置:
bash
# 入门时配置
openclaw onboard --anthropic-api-key sk-xxx
# 或单独添加
openclaw models auth add
# 选择 Anthropic API Key配置
json
{
"agents": {
"defaults": {
"model": {
"primary": "anthropic/claude-sonnet-4-20250514"
}
}
}
}别名
内置别名:
opus→ Claude Opussonnet→ Claude Sonnet
/model sonnet速率限制
Claude 订阅有使用配额。429 错误表示配额耗尽。
解决方法:
- 等待配额重置
- 升级订阅计划
- 配置故障转移模型