Kimi K2.7 Code
Model details
- Model
kimi-k2.7-code- Provider
moonshotai-cn- API
openai-completions- Base URL
https://api.moonshot.cn/v1- Input
- text, image
- Reasoning
- Yes
- Context window
- 262,144
- Max tokens
- 262,144
Show configuration
{
"providers": {
"moonshotai-cn": {
"apiKey": "YOUR_API_KEY",
"models": [
{
"id": "kimi-k2.7-code",
"name": "Kimi K2.7 Code",
"reasoning": true,
"input": [
"text",
"image"
],
"thinkingLevelMap": {
"off": null
},
"contextWindow": 262144,
"maxTokens": 262144,
"cost": {
"input": 0.95,
"output": 4,
"cacheRead": 0.19,
"cacheWrite": 0
},
"compat": {
"supportsStore": false,
"supportsDeveloperRole": false,
"supportsReasoningEffort": false,
"maxTokensField": "max_tokens",
"supportsStrictMode": false,
"thinkingFormat": "deepseek"
}
}
],
"api": "openai-completions",
"baseUrl": "https://api.moonshot.cn/v1"
}
}
}Pricing
USD per million tokens. A tier is selected from the total input tokens in each request and applies to that entire request.
| Request input | Input | Output | Cache read | Cache write |
|---|---|---|---|---|
| All requests | $0.95 | $4 | $0.19 | $0 |
Session cost calculator
Estimate the requests made during an agent session. A user turn can make several model calls while using tools, so costs are calculated per model request.
Estimated session$0.00
- Uncached input
- —
- Cache reads
- —
- Uncached prefixes
- —
- Cache writes
- —
- Output
- —
- Without caching
- —
The first request starts cold unless marked otherwise. Output is billed separately from context growth because reasoning tokens are not always retained. This remains a directional estimate: providers differ in eligibility, rounding, and retention.
Compatibility flags
Effective values after applying Pi's API defaults and model overrides.
| Feature | Value |
|---|---|
supportsStore | No |
supportsDeveloperRole | No |
supportsReasoningEffort | No |
supportsUsageInStreaming | Yes |
maxTokensField | max_tokens |
requiresToolResultName | No |
requiresAssistantAfterToolResult | No |
requiresThinkingAsText | No |
requiresReasoningContentOnAssistantMessages | No |
thinkingFormat | deepseek |
openRouterRouting | Empty |
vercelGatewayRouting | Empty |
chatTemplateKwargs | Empty |
zaiToolStream | No |
supportsStrictMode | No |
cacheControlFormat | None |
sendSessionAffinityHeaders | No |
supportsLongCacheRetention | Yes |