Skip to content

配置AI模型

选择AI模型

推荐国内用户使用:

模型价格特点
DeepSeek V3便宜性价比高
DeepSeek R1中等推理能力强
MiniMax中等中文优化好

获取API Key

DeepSeek

  1. 访问 DeepSeek开放平台
  2. 注册账号
  3. 创建API Key
  4. 充值(支持微信/支付宝)

MiniMax

  1. 访问 MiniMax开放平台
  2. 注册企业/个人账号
  3. 创建API Key

配置OpenClaw

编辑 ~/.openclaw/openclaw.json

json
{
  "auth": {
    "profiles": {
      "deepseek:default": {
        "provider": "deepseek",
        "mode": "api_key"
      }
    }
  },
  "models": {
    "providers": {
      "deepseek": {
        "baseUrl": "https://api.deepseek.com/v1",
        "api": "openai-completions",
        "models": [
          {
            "id": "deepseek-chat",
            "name": "DeepSeek V3"
          }
        ]
      }
    }
  }
}

然后在 .env 文件中添加:

DEEPSEEK_API_KEY=sk-xxxxxxxxxxxxxxxx

测试

重启Gateway:

bash
openclaw gateway restart

发送测试消息,看看AI是否回复!

Released under the MIT License.