使用 SurgeAI API 配合 OpenClaw - 您的个人 AI 助手
💡 提示:通过 SurgeAI 的统一 API,OpenClaw 可以访问 160+ AI 模型,包括 OpenAI、Google、Anthropic、DeepSeek 等顶级提供商——只需一个 API Key。
⚠️ 注意:请妥善保管您的 API Key,切勿公开分享。请像对待密码一样对待它。
📖 详细的安装指南,请参考官方文档。
iwr -useb https://openclaw.ai/install.ps1 | iexopenclaw config 并选择 model 重新配置。I understand this is powerful and inherently risky. Continue? | 选择 ● YesOnboarding mode | 选择 ● Quick StartModel/auth provider | 选择 ● Skip for nowFilter models by provider | 选择 ● anthropicDefault model | 选择 ● Keep current💡 提示:选择 Skip for now 作为模型/认证提供商很重要——这样您就可以在下一步手动配置 SurgeAI 的自定义模型参数,而不是被锁定在预配置的提供商中。
~/.openclaw/openclaw.json。您可以使用任何文本编辑器打开它:models.providers 下添加以下内容。如果您跳过了初始化,models 部分可能还不存在——请手动添加。将 YOUR_SURGEAI_KEY 替换为步骤 1 中的 API Key。{
"models": {
"mode": "merge",
"providers": {
"surgeai": {
"baseUrl": "https://surgeai.one",
"apiKey": "YOUR_SURGEAI_KEY",
"api": "anthropic-messages",
"models": [
{
"id": "claude-opus-4-6",
"name": "claude-opus-4-6",
"reasoning": false,
"input": ["text"],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 200000,
"maxTokens": 100000
},
{
"id": "claude-sonnet-4-6",
"name": "claude-sonnet-4-6",
"reasoning": false,
"input": ["text"],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 200000,
"maxTokens": 100000
},
{
"id": "glm-5",
"name": "glm-5",
"reasoning": false,
"input": ["text"],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 200000,
"maxTokens": 100000
},
{
"id": "MiniMax-M2.5",
"name": "MiniMax-M2.5",
"reasoning": false,
"input": ["text"],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 200000,
"maxTokens": 100000
},
{
"id": "kimi-k2.5",
"name": "kimi-k2.5",
"reasoning": false,
"input": ["text"],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 200000,
"maxTokens": 100000
}
]
}
}
}
}{
agents: {
defaults: {
model: {
primary: "surgeai/claude-opus-4-6", // 默认模型
},
models: {
// 可用模型
"surgeai/claude-opus-4-6": {},
"surgeai/claude-sonnet-4-6": {},
"surgeai/glm-5": {},
"surgeai/MiniMax-M2.5": {},
"surgeai/kimi-k2.5": {},
},
},
},
}~/.openclaw/openclaw.json 示例{
"meta": {...},
"wizard": {...},
"models": {
"mode": "merge",
"providers": {
"surgeai": {
"baseUrl": "https://surgeai.one",
"apiKey": "YOUR_SURGEAI_KEY",
"api": "anthropic-messages",
"models": [
{
"id": "claude-opus-4-6",
"name": "claude-opus-4-6",
...
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "surgeai/claude-opus-4-6"
},
"models": {
"surgeai/claude-opus-4-6": {},
"surgeai/claude-sonnet-4-6": {},
"surgeai/glm-5": {},
"surgeai/MiniMax-M2.5": {},
"surgeai/kimi-k2.5": {}
}
}
}
}Select channel | 选择并配置您首选的消息通道。Configure skills | 选择并安装您需要的技能。How do you want to hatch your bot?Hatch in TUI (recommended)Web UI (with token) 链接。📖 详细的配置指南,请参考官方文档。
⚠️ 警告:如果配置不当或部署时没有适当的访问控制,OpenClaw 可能存在安全风险。请参考官方安全文档。
技能是包含 SKILL.md文件的文件夹。如果您想为 OpenClaw 代理添加新功能,ClawHub 是查找和安装技能的最佳方式。
插件是扩展 OpenClaw 功能的小型代码模块(命令、工具和 Gateway RPC)。
| 功能 | 优势 |
|---|---|
| 160+ 模型 | 使用一个 API Key 访问 OpenAI、Google、Anthropic、DeepSeek 等 |
| 统一 API | OpenAI 兼容格式——切换模型时无需更改代码 |
| 自动故障转移 | 当一个提供商不可用时无缝切换 |
| 成本效益 | 按需付费,比较模型并选择最佳性价比 |
| 多通道 | 连接 Telegram、Discord、Slack、WhatsApp 等 |
| 可扩展 | 从 ClawHub 添加技能和插件,获得无限功能 |
surgeai/gpt-5.2)openclaw statussurgeai.one 的网络连接openclaw doctor 进行诊断