Kimi K2.7 Code vs Kimi K3
As of October 21, 2026, Kimi K3 costs 216% more per input token than Kimi K2.7 Code ($3.00 vs $0.95 per 1M) and has a 1M-token context window versus 256K.
Kimi K2.7 Code vs Kimi K3 side by side
| Kimi K2.7 Code | Kimi K3 | |
|---|---|---|
| Input, per 1M tokens | $0.95 | $3.00 |
| Output, per 1M tokens | $4.00 | $15.00 |
| Cache read, per 1M tokens | $0.19 | $0.30 |
| Cache write, per 1M tokens | – | – |
| Context window | 262,144 tokens | 1,048,576 tokens |
| Max output | 262,144 tokens | 1,048,576 tokens |
| Image input | Yes | Yes |
| Tool calling | Yes | Yes |
| Structured output (JSON) | Yes | Yes |
| Prompt caching | Yes | Yes |
| Reasoning | Yes | Yes |
| Providers on LiteLLM | 16 | 15 |
| Price shown is from | Moonshot AI | Moonshot AI |
| Added to LiteLLM | June 2026 | August 16, 2026 |
Cheapest provider for each
- Kimi K2.7 Code: DeepInfra at $0.68 input and $3.40 output per 1M tokens (
deepinfra/moonshotai/Kimi-K2.7-Code) - Kimi K3: Sail at $2.50 input and $12.50 output per 1M tokens (
sail/moonshotai/Kimi-K3)
Benchmark scores
| Benchmark | Kimi K2.7 Code | Kimi K3 |
|---|---|---|
| Overall | ||
| Epoch Capabilities Index | 150.1 | 157.9 |
| Coding and agents | ||
| FrontierCode | 30.1% | 44.2% |
| APEX-Agents | 37.6% | 47.8% |
| Reasoning and knowledge | ||
| GPQA Diamond | 87.9% | 93.1% (max) |
| SimpleQA Verified | 36.5% | 50.6% (max) |
| Math | ||
| FrontierMath (tiers 1-3) | 54.0% | 72.2% (max) |
| FrontierMath (tier 4) | 12.2% | 39.0% (max) |
| OTIS Mock AIME 2024-2025 | 95.6% | 97.2% (max) |
When to pick which
Pick Kimi K2.7 Code for
- Costs 68% less per input token: $0.95 vs $3.00 per 1M.
Pick Kimi K3 for
- Larger context window: 1,048,576 vs 262,144 tokens.
- Returns up to 1,048,576 tokens per response, vs 262,144.
From differences in the data above only; where the data is equal, no reason is given.
Call Kimi K2.7 Code or Kimi K3 with LiteLLM
Both use the OpenAI format through LiteLLM, so switching is a model name change. Set each provider's API key in the environment first.
from litellm import completion
messages = [{"role": "user", "content": "Hello!"}]
# Kimi K2.7 Code
response = completion(model="moonshot/kimi-k2.7-code", messages=messages)
# Kimi K3
response = completion(model="moonshot/kimi-k3", messages=messages)
# Kimi K2.7 Code, falling back to Kimi K3 if the call fails
response = completion(model="moonshot/kimi-k2.7-code", messages=messages, fallbacks=["moonshot/kimi-k3"])FAQ
Which is cheaper, Kimi K2.7 Code or Kimi K3?
Kimi K2.7 Code is cheaper at 3 input tokens per output token: $1.712 per 1M tokens blended ($0.95 input, $4.00 output), versus $6.00 ($3.00 and $15.00) for Kimi K3, as of October 21, 2026.
Which has the larger context window, Kimi K2.7 Code or Kimi K3?
Kimi K3 has the larger context window: 1,048,576 tokens, versus 262,144 for Kimi K2.7 Code.
Can I switch from Kimi K2.7 Code to Kimi K3 without changing my code?
Yes. Through LiteLLM both use the OpenAI format, so switching means changing the model name from "moonshot/kimi-k2.7-code" to "moonshot/kimi-k3", or pointing a LiteLLM gateway model alias at the other model. You can also use one as a fallback for the other.
