OpenClaw Kilocode 提供商配置指南

2026-03-25 17:55 更新

Kilo 网关

Kilo 网关提供了一套统一的 API,可通过单个端点和 API 密钥,将请求路由到众多模型背后。它兼容 OpenAI 接口,因此大多数 OpenAI SDK 只需切换基础 URL 即可正常工作。

获取 API 密钥

  1. 访问 app.kilo.ai
  2. 登录或创建你的账户
  3. 导航到 API 密钥页面,生成一个新的密钥

CLI 配置

openclaw onboard --kilocode-api-key <key>

或者设置环境变量:

export KILOCODE_API_KEY="your-api-key"

配置片段

env: { KILOCODE_API_KEY: "sk-..." },
agents: {
  defaults: {
    model: { primary: "kilocode / anthropic / claude-opus-4.6" },
  },
},

暴露的模型引用

内置的 Kilo 网关目录目前提供了这些模型引用:

  • kilocode / anthropic / claude-opus-4.6(默认)
  • kilocode / z-ai / glm-5:free
  • kilocode / minimax / minimax-m2.5:free
  • kilocode / anthropic / claude-sonnet-4.5
  • kilocode / openai / gpt-5.2
  • kilocode / google / gemini-3-pro-preview
  • kilocode / google / gemini-3-flash-preview
  • kilocode / x-ai / grok-code-fast-1
  • kilocode / moonshotai / kimi-k2.5

注意事项

  • 模型引用的格式为 kilocode / <提供商> / <模型>(例如 kilocode / anthropic / claude-opus-4.6
  • 默认模型:kilocode / anthropic / claude-opus-4.6
  • 基础 URL:https://api.kilo.ai/api/gateway/
  • 如需了解更多模型 / 提供商选项,请查看模型提供商概念
  • Kilo 网关在底层使用 Bearer 令牌来承载你的 API 密钥。
以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号