Model overview
Text generationVision understandingDeep thinkingKimi-K2.7-Code is Kimi's strongest coding model to date. It follows instructions more reliably in long-context coding tasks, completes programming work with a higher success rate, and supports text, image, and video input, thinking mode, chat, and agent tasks.
Company: Moonshot AIProvider: Alibaba Cloud
Model capabilities
Input modalityT
Output modalityT
Model experience✓
Function calling✓
Structured output-
Web search-
Prefix completion-
Context cache✓
Batch inference✓
Fine-tuning-
Model pricing
Input$0.9701/1M tokens
Input (cache hit)$0.194/1M tokens
Explicit cache write$1.21/1M tokens
Explicit cache hit$0.09701/1M tokens
Output$4.03/1M tokens
Rate limits and context
Maximum input length224K
Context length256K
Maximum output length16K
RPM500
TPM1000000
API reference
EndpointPOST /v1/chat/completions
SDKOpenAI-compatible
API code examples
from openai import OpenAI client = OpenAI( api_key="$WLROUTER_API_KEY", base_url="https://api.wlrouter.com/v1" ) response = client.chat.completions.create( model="kimi-k2.7-code", messages=[ {"role": "user", "content": "Reply with one short sentence."} ], max_tokens=32, extra_body={"enable_thinking": True} ) print(response.choices[0].message.content)