Moonshot provides the Kimi API with OpenAI-compatible endpoints. Configure the provider and set the default model toDocumentation 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, or use
Kimi Coding with kimi/kimi-code.
Built-in model catalog
| Model ref | Name | Reasoning | Input | Context | Max output |
|---|---|---|---|---|---|
moonshot/kimi-k2.6 | Kimi K2.6 | No | text, image | 262,144 | 262,144 |
moonshot/kimi-k2.5 | Kimi K2.5 | No | text, image | 262,144 | 262,144 |
moonshot/kimi-k2-thinking | Kimi K2 Thinking | Yes | text | 262,144 | 262,144 |
moonshot/kimi-k2-thinking-turbo | Kimi K2 Thinking Turbo | Yes | text | 262,144 | 262,144 |
moonshot/kimi-k2-turbo | Kimi K2 Turbo | No | text | 256,000 | 16,384 |
Getting started
Choose your provider and follow the setup steps.- Moonshot API
- Kimi Coding
Best for: Kimi K2 models via the Moonshot Open Platform.
Choose your endpoint region
| Auth choice | Endpoint | Region |
|---|---|---|
moonshot-api-key | https://api.moonshot.ai/v1 | International |
moonshot-api-key-cn | https://api.moonshot.cn/v1 | China |
Run a live smoke test
Use an isolated state dir when you want to verify model access and cost
tracking without touching your normal sessions:The JSON response should report
provider: "moonshot" and
model: "kimi-k2.6". The assistant transcript entry stores normalized
token usage plus estimated cost under usage.cost when Moonshot returns
usage metadata.Config example
Kimi web search
OpenClaw also ships Kimi as aweb_search provider, backed by Moonshot web
search.
Run interactive web search setup
plugins.entries.moonshot.config.webSearch.*.plugins.entries.moonshot.config.webSearch:
Advanced configuration
Native thinking mode
Native thinking mode
Moonshot Kimi supports binary native thinking:OpenClaw also maps runtime
Kimi K2.6 also accepts an optional
thinking: { type: "enabled" }thinking: { type: "disabled" }
agents.defaults.models.<provider/model>.params:/think levels for Moonshot:/think level | Moonshot behavior |
|---|---|
/think off | thinking.type=disabled |
| Any non-off level | thinking.type=enabled |
thinking.keep field that controls
multi-turn retention of reasoning_content. Set it to "all" to keep full
reasoning across turns; omit it (or leave it null) to use the server
default strategy. OpenClaw only forwards thinking.keep for
moonshot/kimi-k2.6 and strips it from other models.Tool call id sanitization
Tool call id sanitization
Moonshot Kimi serves tool_call ids shaped like
functions.<name>:<index>. OpenClaw preserves them unchanged so multi-turn tool calls keep working.To force strict sanitization on a custom OpenAI-compatible provider, set sanitizeToolCallIds: true:Streaming usage compatibility
Streaming usage compatibility
Native Moonshot endpoints (
https://api.moonshot.ai/v1 and
https://api.moonshot.cn/v1) advertise streaming usage compatibility on the
shared openai-completions transport. OpenClaw keys that off endpoint
capabilities, so compatible custom provider ids targeting the same native
Moonshot hosts inherit the same streaming-usage behavior.With the bundled K2.6 pricing, streamed usage that includes input, output,
and cache-read tokens is also converted into local estimated USD cost for
/status, /usage full, /usage cost, and transcript-backed session
accounting.Endpoint and model ref reference
Endpoint and model ref reference
| Provider | Model ref prefix | Endpoint | Auth env var |
|---|---|---|---|
| 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 endpoint | KIMI_API_KEY |
| Web search | N/A | Same as Moonshot API region | KIMI_API_KEY or MOONSHOT_API_KEY |
- Kimi web search uses
KIMI_API_KEYorMOONSHOT_API_KEY, and defaults tohttps://api.moonshot.ai/v1with modelkimi-k2.6. - Override pricing and context metadata in
models.providersif needed. - If Moonshot publishes different context limits for a model, adjust
contextWindowaccordingly.
Related
Model selection
Choosing providers, model refs, and failover behavior.
Web search
Configuring web search providers including Kimi.
Configuration reference
Full config schema for providers, models, and plugins.
Moonshot Open Platform
Moonshot API key management and documentation.