AI提供商
约 481 字大约 2 分钟
Anthropic Claude
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(推荐用于订阅)
## 在任何机器上生成 token
claude setup-token
## 在 OpenClaw 中使用或粘贴已有 token:
openclaw models auth paste-token --provider anthropicAPI 密钥
- 获取 API 密钥:https://console.anthropic.com/
- 配置:
## 入门时配置
openclaw onboard --anthropic-api-key sk-xxx
## 或单独添加
openclaw models auth add配置
{
"agents": {
"defaults": {
"model": {
"primary": "anthropic/claude-sonnet-4-20250514"
}
}
}别名
内置别名:
opus→ Claude Opussonnet→ Claude Sonnet
/model sonnet速率限制
Claude 订阅有使用配额。429 错误表示配额耗尽。
解决方法:
- 等待配额重置
- 升级订阅计划
- 配置故障转移模型
OpenAI
OpenAI GPT 和 Codex 模型集成。
支持的模型
openai/gpt-4o- GPT-4oopenai/gpt-4o-mini- GPT-4o Miniopenai-codex/gpt-5.2- Codex GPT-5.2
认证方式
Codex OAuth(推荐用于订阅)
openclaw models auth add向导会引导完成 OAuth 流程。
API 密钥
- 获取 API 密钥:https://platform.openai.com/api-keys
- 配置:
openclaw onboard --openai-api-key sk-xxx
## 或单独添加
openclaw models auth add配置
{
"agents": {
"defaults": {
"model": {
"primary": "openai/gpt-4o"
}
}
}别名
内置别名:
gpt→ GPT-4o
/model gpt思考级别
Codex 模型支持思考级别:
openclaw agent --message "解决问题" --thinking high级别:off, minimal, low, medium, high, xhigh
OpenRouter
OpenRouter 多模型聚合服务。
概述
OpenRouter 提供统一 API 访问多个模型提供商。
认证
- 获取 API 密钥:https://openrouter.ai/keys
- 配置:
openclaw onboard --openrouter-api-key sk-xxx
## 或
openclaw models auth add可用模型
通过 OpenRouter 可以访问:
- Anthropic Claude
- OpenAI GPT
- Google Gemini
- Meta Llama
- Mistral
- 更多...
查看完整列表:https://openrouter.ai/models
配置
{
"agents": {
"defaults": {
"model": {
"primary": "openrouter/anthropic/claude-3-opus"
}
}
}区域选择
OpenRouter 提供区域选择的模型:
{
"agents": {
"defaults": {
"model": {
"primary": "openrouter/anthropic/claude-3-opus:us"
}
}
}优势
- 单一 API 访问多个提供商
- 自动故障转移
- 统一计费
- 区域选择
