LiteLLMModels

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.

Prices from LiteLLM's price fileChecked

Kimi K2.7 Code vs Kimi K3 side by side

Headline prices in US dollars per 1M tokens: each model's own lab where it sells it, otherwise its cheapest provider. Source: LiteLLM model price file, as of October 21, 2026.
Kimi K2.7 CodeKimi 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 window262,144 tokens1,048,576 tokens
Max output262,144 tokens1,048,576 tokens
Image inputYesYes
Tool callingYesYes
Structured output (JSON)YesYes
Prompt cachingYesYes
ReasoningYesYes
Providers on LiteLLM1615
Price shown is fromMoonshot AIMoonshot AI
Added to LiteLLMJune 2026August 16, 2026

Cheapest provider for each

Benchmark scores

From the Epoch AI Benchmarking Hub (CC BY 4.0), data as of August 27, 2026. Some results were run by Epoch and others collected by Epoch from each benchmark's own leaderboard, linked in the first column. Each model's best reported reasoning setting is shown in brackets. Higher is better. Only benchmarks with a score for both models are shown.
BenchmarkKimi K2.7 CodeKimi K3
Overall
Epoch Capabilities Index150.1157.9
Coding and agents
FrontierCode30.1%44.2%
APEX-Agents37.6%47.8%
Reasoning and knowledge
GPQA Diamond87.9%93.1% (max)
SimpleQA Verified36.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-202595.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.

Python SDK
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.