Moonshot 提供具有 OpenAI 兼容端点的 Kimi API。配置 provider,并将默认模型设置为Documentation Index
Fetch the complete documentation index at: https://docs2.openclaw.ai/llms.txt
Use this file to discover all available pages before exploring further.
moonshot/kimi-k2.6,或通过
kimi/kimi-for-coding 使用 Kimi Coding。
内置模型目录
| 模型引用 | 名称 | 推理 | 输入 | 上下文 | 最大输出 |
|---|---|---|---|---|---|
moonshot/kimi-k2.6 | Kimi K2.6 | 否 | 文本,图像 | 262,144 | 262,144 |
moonshot/kimi-k2.5 | Kimi K2.5 | 否 | 文本,图像 | 262,144 | 262,144 |
moonshot/kimi-k2-thinking | Kimi K2 Thinking | 是 | 文本 | 262,144 | 262,144 |
moonshot/kimi-k2-thinking-turbo | Kimi K2 Thinking Turbo | 是 | 文本 | 262,144 | 262,144 |
moonshot/kimi-k2-turbo | Kimi K2 Turbo | 否 | 文本 | 256,000 | 16,384 |
入门指南
选择你的提供商并按照设置步骤操作。- Moonshot API
- Kimi Coding
最适合: 通过 Moonshot Open Platform 使用 Kimi K2 模型。
Choose your endpoint region
| 凭证选择 | 端点 | 地区 |
|---|---|---|
moonshot-api-key | https://api.moonshot.ai/v1 | 国际版 |
moonshot-api-key-cn | https://api.moonshot.cn/v1 | 中国 |
配置示例
Kimi Web 搜索
OpenClaw 还将 Kimi 作为web_search 提供商随附提供,由 Moonshot Web 搜索支持。
配置位于
plugins.entries.moonshot.config.webSearch 下:
高级配置
原生思考模式
原生思考模式
Moonshot Kimi 支持二进制原生思考:OpenClaw 还会为 Moonshot 映射运行时
Kimi K2.6 还接受可选的
thinking: { type: "enabled" }thinking: { type: "disabled" }
agents.defaults.models.<provider/model>.params 按模型配置:/think 级别:/think 级别 | Moonshot 行为 |
|---|---|
/think off | thinking.type=disabled |
| 任何非 off 级别 | thinking.type=enabled |
thinking.keep 字段,用于控制
reasoning_content 的多轮保留。将其设置为 "all" 可在轮次之间保留完整
推理;省略它(或将其保留为 null)则使用服务器
默认策略。OpenClaw 只会为
moonshot/kimi-k2.6 转发 thinking.keep,并会从其他模型中移除它。工具调用 ID 清理
工具调用 ID 清理
Moonshot Kimi 提供的 tool_call ID 形如
functions.<name>:<index>。OpenClaw 会原样保留它们,因此多轮工具调用可以继续正常工作。若要在自定义 OpenAI 兼容提供商上强制严格清理,请设置 sanitizeToolCallIds: true:流式用量兼容性
流式用量兼容性
原生 Moonshot 端点(
https://api.moonshot.ai/v1 和
https://api.moonshot.cn/v1)会在共享的
openai-completions 传输协议上声明流式用量兼容性。OpenClaw 会基于端点
能力启用该行为,因此面向相同原生
Moonshot 主机的兼容自定义提供商 ID 会继承相同的流式用量行为。使用内置 K2.6 定价时,包含输入、输出
和缓存读取 token 的流式用量也会转换为本地估算的美元费用,用于
/status、/usage full、/usage cost,以及基于转录记录的会话
计费。Endpoint and model ref reference
Endpoint and model ref reference
| 提供商 | 模型引用前缀 | 端点 | 认证环境变量 |
|---|---|---|---|
| Moonshot | moonshot/ | https://api.moonshot.ai/v1 | MOONSHOT_API_KEY |
| Moonshot CN | moonshot/ | https://api.moonshot.cn/v1 | MOONSHOT_API_KEY |
| Kimi Coding | kimi/ | Kimi Coding 端点 | KIMI_API_KEY |
| Web 搜索 | N/A | 与 Moonshot API 区域相同 | KIMI_API_KEY 或 MOONSHOT_API_KEY |
- Kimi Web 搜索使用
KIMI_API_KEY或MOONSHOT_API_KEY,并默认使用https://api.moonshot.ai/v1和模型kimi-k2.6。 - 如有需要,可在
models.providers中覆盖定价和上下文元数据。 - 如果 Moonshot 为某个模型发布了不同的上下文限制,请相应调整
contextWindow。
相关
Model selection
选择提供商、模型引用和故障转移行为。
Web search
配置包括 Kimi 在内的 Web 搜索提供商。
Configuration reference
提供商、模型和插件的完整配置架构。
Moonshot Open Platform
Moonshot API 密钥管理和文档。