Moonshot Kimi
first_party
Getting credentials
api-key
api_key via header (header Authorization: Bearer)
Environment: MOONSHOT_API_KEY
Create keys at the Kimi Open Platform (intl) or platform.kimi.com (CN, Chinese phone required). Keys are region-bound: .ai and .cn are not interchangeable.
Endpoints
| ID | URL | Protocol | Auth |
|---|---|---|---|
| chat-completions | https://api.moonshot.ai/v1/chat/completions | openai-chat | any |
| anthropic | https://api.moonshot.ai/anthropic | anthropic-messages | any |
API surfaces
textstreamingfilesbatch
Quirks
- China base: https://api.moonshot.cn/v1 (console platform.kimi.com). No embeddings endpoint. Partial Mode (partial: true) and ms:// file references are Moonshot extensions. Context caching is automatic for prompts over 256 tokens. Rate limits tier by cumulative top-up. (docs)
- Sampling params are fixed on k-series models (temperature 1.0, top_p 0.95; k2.6 uses 0.6 outside thinking mode) and error if set otherwise; only moonshot-v1 allows modifying temperature. tool_choice required is k3-only. (docs)
- The /anthropic endpoint (for Claude Code et al.) uses OPEN PLATFORM keys — never Kimi Code keys. WebFetch is unsupported there; WebSearch 400s on kimi-k2.7-code with thinking off. (docs)
Models offered
| Model | Wire ID | Endpoint | Status | Reasoning |
|---|---|---|---|---|
| moonshot/kimi-k2-5 | kimi-k2.5 | chat-completions | deprecated | toggle · default on · returns reasoning_content |
| moonshot/kimi-k2-6 | kimi-k2.6 | chat-completions | ga | toggle · default on · returns reasoning_content · round-trips reasoning_content |
| moonshot/kimi-k2-7-code | kimi-k2.7-code | anthropic | ga | toggle · default on · mandatory · returns reasoning_content · round-trips reasoning_content |
| moonshot/kimi-k2-7-code | kimi-k2.7-code-highspeed | chat-completions | ga | toggle · default on · mandatory · returns reasoning_content · round-trips reasoning_content |
| moonshot/kimi-k2-7-code | kimi-k2.7-code | chat-completions | ga | toggle · default on · mandatory · returns reasoning_content · round-trips reasoning_content |
| moonshot/kimi-k3 | kimi-k3 | chat-completions | ga | effort · default on · mandatory · returns reasoning_content · round-trips reasoning_content |