Moonshot 提供具有 OpenAI 相容端點的 Kimi API。設定 provider,並將預設模型設為Documentation Index
Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt
Use this file to discover all available pages before exploring further.
moonshot/kimi-k2.6,或搭配
kimi/kimi-code 使用 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 |
開始使用
選擇你的 provider,並依照設定步驟操作。- 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 網路搜尋
OpenClaw 也隨附 Kimi 作為web_search provider,由 Moonshot 網頁搜尋支援。
設定位於
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" 可在多輪之間保留完整
reasoning;省略它(或將它保留為 null)則會使用伺服器
預設策略。OpenClaw 只會為
moonshot/kimi-k2.6 轉送 thinking.keep,並會從其他模型中移除它。工具呼叫 id 清理
工具呼叫 id 清理
Moonshot Kimi 提供形如
functions.<name>:<index> 的 tool_call ids。OpenClaw 會原樣保留它們,讓多輪工具呼叫持續正常運作。若要在自訂的 OpenAI 相容 provider 上強制嚴格清理,請設定 sanitizeToolCallIds: true:串流用量相容性
串流用量相容性
原生 Moonshot 端點(
https://api.moonshot.ai/v1 和
https://api.moonshot.cn/v1)會在共用的
openai-completions transport 上宣告串流用量相容性。OpenClaw 會依端點
capabilities 判定,因此以相同原生
Moonshot 主機為目標的相容自訂 provider ids,會繼承相同的串流用量行為。使用隨附的 K2.6 定價時,包含輸入、輸出、
和快取讀取 token 的串流用量,也會轉換成本機估算 USD 成本,用於
/status、/usage full、/usage cost,以及由 transcript 支援的工作階段
帳務統計。端點與模型參照參考
端點與模型參照參考
| 提供者 | 模型參照前綴 | 端點 | 驗證環境變數 |
|---|---|---|---|
| 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 |
| 網頁搜尋 | 不適用 | 與 Moonshot API 區域相同 | KIMI_API_KEY 或 MOONSHOT_API_KEY |
- Kimi 網頁搜尋使用
KIMI_API_KEY或MOONSHOT_API_KEY,並預設使用https://api.moonshot.ai/v1與模型kimi-k2.6。 - 如有需要,請在
models.providers中覆寫定價與上下文中繼資料。 - 如果 Moonshot 為某個模型發布不同的上下文限制,請相應調整
contextWindow。
相關
模型選擇
選擇提供者、模型參照與容錯移轉行為。
網頁搜尋
設定包含 Kimi 在內的網頁搜尋提供者。
設定參考
提供者、模型與 plugins 的完整設定結構描述。
Moonshot Open Platform
Moonshot API 金鑰管理與文件。