Kimi K2.7 Codemoonshot/kimi-k2-7-code
Kimi K2.7 Code is Moonshot AI's coding-agent specialist, released 2026-06-12. A 1-trillion-parameter Mixture-of-Experts model (32B active, 384 experts) with a 256K-token context window, it targets long-horizon agentic software engineering and uses roughly 30% fewer reasoning tokens than K2.6 while scoring higher on Moonshot's coding benchmarks. Open weights under a Modified MIT license.
Pricing across providers
| Provider | Input /1M | Output /1M | Blended /1M | Latency p50 | Format | Freshness | Action |
|---|---|---|---|---|---|---|---|
| Moonshot AI kimi-k2.7-code | $0.95 | $4.00 | $1.71 | — | OpenAI-compatible | Price 1mo ago | Try → |
Affiliate disclosure: We may earn a commission from qualified signups. Pricing independence is enforced at the data layer — see our Editorial Independence Policy.
Works with
Point any of these clients at a hosting's base URL — they all speak at least one of this model's endpoint protocols (OPENAI_COMPATIBLE).
Capabilities
- chat
- code
- reasoning
- long_context
- agent
Code samples
Example using Moonshot AI — the cheapest hosting for this model as of last verification. Swap base_url and model to use a different provider from the matrix above.
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.moonshot.cn/v1",
)
response = client.chat.completions.create(
model="kimi-k2.7-code",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)
Technical specs
- Context
- 262K
- Max output
- 262K
- Parameters
- —
- Release
- —
- Training cutoff
- —
- License
- Modified MIT
Similar models
Compare with
- Kimi K2.7 Code vs DeepSeek V3.1Comparison planned — not yet published
- Kimi K2.7 Code vs R1Comparison planned — not yet published
- Kimi K2.7 Code vs DeepSeek V3Comparison planned — not yet published
Frequently asked
How much does Kimi K2.7 Code cost?+−
How do I access Kimi K2.7 Code from outside China?+−
Is Kimi K2.7 Code open-source? Can I fine-tune it?+−
Is Kimi K2.7 Code OpenAI-compatible?+−
openai SDK client at the Provider's base_url and use the Provider's model name. See the Code Samples above for a copy-pasteable example.