Skip to content

Kimi (Moonshot) Setup

Get API Key

Choose the key source for your product:

Official Endpoints

Kimi supports both OpenAI and Anthropic protocols. Kimi Code uses the same key for both endpoints, while the model list is filtered by the key's membership entitlement:

ProtocolBase URLCommon endpoint
OpenAI (pay-as-you-go)https://api.moonshot.cn/v1https://api.moonshot.cn/v1/chat/completions
Anthropic (Kimi Code)https://api.kimi.com/coding/https://api.kimi.com/coding/v1/messages
OpenAI (Kimi Code)https://api.kimi.com/coding/v1https://api.kimi.com/coding/v1/chat/completions

When Kimi is added from CCX's automatic provider flow (also available as Kimi Code), CCX validates and binds an endpoint per key. Kimi Code models are discovered with GET /coding/v1/models.

Kimi Code model entitlements

MembershipModelsContext window
Andantekimi-for-coding256K
Moderatok3, kimi-for-coding256K
Allegretto and abovek3, kimi-for-coding, kimi-for-coding-highspeedUp to 1M for K3; 256K for the other models

k3 supports low, high, and max reasoning effort. Thinking stays enabled for the K2.7 Code models. Disabling thinking routes K3 and K2.7 Code to K2.6.

The k3[1m] form is only a Claude Code environment-variable hint. API requests and CCX model fields use k3.

Add Channel in CCX

Select Kimi / Kimi Code and enter one or more Kimi Code API keys. CCX probes https://api.kimi.com/coding/v1/models per key instead of sending a fake inference request, so models outside the membership tier are not listed.

Option 2: Chat Endpoint (OpenAI Compatible)

FieldValue
NameKimi
Service Typeopenai
Base URLhttps://api.moonshot.cn/v1
API KeysYour Moonshot API Key

Option 3: Messages Endpoint (Anthropic Compatible)

For Claude Code CLI and other tools using Claude Messages protocol.

FieldValue
NameKimi Code
Service Typeclaude
Base URLhttps://api.kimi.com/coding/
API KeysYour Kimi Code API Key

Kimi Code does not require mapping opus, sonnet, or haiku to a Claude model name. Prefer the model IDs returned by /coding/v1/models; configure an explicit CCX mapping when a client sends a generic alias.

Available Models

ModelDescription
k3Kimi K3 flagship coding model; 256K on Moderato and up to 1M on Allegretto+; supports low / high / max
kimi-for-codingKimi K2.7 Code, available to all Kimi Code memberships with server-side thinking
kimi-for-coding-highspeedKimi K2.7 Code HighSpeed, about 5-6x faster output with higher usage; Allegretto+
kimi-k2.7Latest pay-as-you-go model, native multimodal Agentic model
kimi-k2.6Multimodal Agentic model, 1T total / 32B active
kimi-k2.5Multimodal Agentic model
moonshot-v1-autoAuto-selects context length (legacy)
moonshot-v1-128k128K context (legacy)

Deprecation Notice

kimi-k2 will be retired on 2026/05/25. Please migrate to kimi-k2.6.

Notes

  • The China pay-as-you-go OpenAI-compatible Base URL is https://api.moonshot.cn/v1; CCX also retains compatibility with the global https://api.moonshot.ai/v1 endpoint
  • Kimi Code Anthropic Base URL is https://api.kimi.com/coding/; its OpenAI Base URL is https://api.kimi.com/coding/v1
  • Kimi Code /coding/v1/models returns the model range for the current key. A 401/403 from that endpoint usually means the key is invalid or unusable; an inference request can also return 401 when its model or context entitlement is unavailable
  • kimi-k2.7 is the latest pay-as-you-go model with long-context coding support
  • kimi-for-coding and kimi-for-coding-highspeed should only be used with the Kimi Code endpoint