moonshotai/kimi-k2.7-code

MoonshotAI: Kimi K2.7 Code

Context length
262K
Input / 1M tokens
$0.56
Output / 1M tokens
$3.10
Released
2026-06-12
Modality
text+image->text

About MoonshotAI: Kimi K2.7 Code

MoonshotAI: Kimi K2.7 Code is a coding-focused model in Moonshot AI's Kimi K2 family, built to complete end-to-end programming tasks reliably over long contexts. It uses a native multimodal mixture-of-experts...

Call MoonshotAI: Kimi K2.7 Code

Via OpenRouter: one base URL for every provider.

curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "moonshotai/kimi-k2.7-code",
    "messages": [{"role": "user", "content": "Say hello"}]
  }'

Direct on Moonshot AI (Kimi):

curl https://api.moonshot.ai/v1/chat/completions \
  -H "Authorization: Bearer $MOONSHOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kimi-k2.7-code",
    "messages": [{"role": "user", "content": "Say hello"}]
  }'

Moonshot AI (Kimi) keys

OpenRouter keys

OpenRouter keys work for moonshotai/kimi-k2.7-code regardless of the upstream provider.