Kimi K2.7 Code API
Moonshot's coding-focused model for agentic software work
About this model
Kimi K2.7 Code is Moonshot AI’s coding-focused model, announced in June 2026 and built on Kimi K2.6. Moonshot describes it as a 1-trillion-parameter mixture-of-experts model (32 billion active) and reports it uses about 30 percent fewer reasoning tokens than K2.6.
It supports tool calling and has a 256,000-token context window in this catalog. Moonshot recommends K2.6 rather than K2.7 Code for general tasks such as writing and conversation, so pick this one for programming work.
Use cases
- Writing and refactoring code
- Autonomous coding agents
- Debugging with tool calls
Input and output
- Input
- Text
- Output
- Text
Developer
Moonshot AI
Official site of Moonshot AI- Developer
- Moonshot
- Type
- Conversation
- Context
- 256,000 tokens
- Capabilities
- Tuned for code
Kimi K2.7 Code request example
Use https://gatelum.com/v1 as the base URL and pass moonshotai/kimi-k2.7-code in the model field. You create the key in your account after signing up.
curl --silent --show-error --fail-with-body \
--header 'Authorization: Bearer glt_YOUR_KEY' \
'https://gatelum.com/v1/chat/completions' \
--header "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"model": "moonshotai/kimi-k2.7-code",
"messages": [
{
"role": "user",
"content": "Hi! Tell me about yourself in two sentences."
}
]
}
JSONClaude Code and Anthropic-protocol clients
For clients using the Anthropic protocol, point the address at ANTHROPIC_BASE_URL=https://gatelum.com with no /v1. The model ID does not change.
export ANTHROPIC_BASE_URL=https://gatelum.com
export ANTHROPIC_AUTH_TOKEN=glt_YOUR_KEY
export ANTHROPIC_MODEL=moonshotai/kimi-k2.7-code
claudeWhere to use Kimi K2.7 Code
Guides with step-by-step instructions for the tools that support this model: