Integrating Moonshot AI’s Kimi models into Openclaw gives you access to one of the most capable Chinese LLMs with exceptional context window capabilities.
- Kimi models offer up to 256K context windows, enabling deep document analysis and long-form conversations.
- Developers often struggle with endpoint selection between international and China-specific APIs.
- A fully configured Moonshot integration with proper endpoint routing and thinking mode control.
Moonshot AI provides OpenAI-compatible endpoints, making integration straightforward for developers familiar with standard API patterns.

Step 1: Choose Your Endpoint
Moonshot offers two endpoints based on your location:
https://api.moonshot.ai/v1 — International endpoint
https://api.moonshot.cn/v1 — China endpoint
Step 2: Configure via CLI
For international users:
openclaw onboard --auth-choice moonshot-api-key
For China-based users:
openclaw onboard --auth-choice moonshot-api-key-cn
Step 3: Manual Configuration
Edit your ~/.openclaw/openclaw.json for advanced settings:
{
"env": { "MOONSHOT_API_KEY": "sk-..." },
"agents": {
"defaults": {
"model": { "primary": "moonshot/kimi-k2.5" }
}
},
"models": {
"providers": {
"moonshot": {
"baseUrl": "https://api.moonshot.ai/v1",
"apiKey": "${MOONSHOT_API_KEY}",
"api": "openai-completions"
}
}
}
}
Available Models
Popular Kimi model variants include:
- moonshot/kimi-k2.5 — General purpose
- moonshot/kimi-k2-thinking — Enhanced reasoning
- moonshot/kimi-k2-turbo-preview — Faster inference
Native Thinking Mode
Kimi supports binary thinking mode. Control it via:
/think off
Or permanently disable in config:
"params": { "thinking": { "type": "disabled" } }
Troubleshooting & Best Practices
- Tool compatibility: When thinking is enabled, tool choice must be auto or none. Openclaw auto-normalizes this.
- Context window: Use OpenRouter Models for comparison with other long-context models.
- Alternative setup: Consider OpenAI Models if you need broader ecosystem compatibility.
Moonshot integration positions Openclaw to leverage cutting-edge Chinese LLM technology with minimal configuration overhead.
