impulse

Kimi K2.7 Code

Open weights

MoonshotAI: Kimi K2.7 Code is a coding-focused model in Moonshot AI's Kimi K2 family, built to complete end-to-end programming tasks reliably over long contexts.

API id kimi-k2.7-codeReleased 12 Jun 2026 (Jun 2026)
Azure AI Foundry retires it on 16 Apr 2027 (in 148 days). 22 hosts keep serving it.
Input / 1M
$0.95
at Moonshot AI
Output / 1M
$4.00
at Moonshot AI
Context window
262K
tokens
Max output
262K
tokens per reply
Hosts
23
25 listings
Released
Jun 2026
12 Jun 2026

Pricing

List prices at Moonshot AI, in US dollars per million tokens.

TierInput / 1MOutput / 1M
Standard$0.95$4.00
Cached input
80% off input
$0.19

What it costs a month

At Moonshot AI list prices, 30 days.

  • Chat assistant5,000 requests a day, 2K in / 0.5K out, cached$517
  • RAG over documents2,000 requests a day, 8K in / 0.6K out, cached$418
  • Coding agent1,000 requests a day, 40K in / 2K out, cached$742
  • Overnight batch20,000 requests a day, 4K in / 0.4K out$3,240
Use your own numbers

Where to run it

23 hosts serve Kimi K2.7 Code. The comparison is on blended price, 3 parts input to 1 part output.

HostIn / out per 1M
kimi-k2.7-code
$0.95 / $4.00
kimi-k2.7-code
$0.38 / $1.60
−60% vs headline
W&B InferenceInference
Kimi-K2.7-Code
$0.60 / $3.00
−30% vs headline
DeepInfraInference
Kimi-K2.7-Code
$0.68 / $3.40
−21% vs headline
ai&Cloud
kimi-k2.7-code
$0.75 / $3.50
−16% vs headline
kimi-k2.7-code
$0.95 / $4.00
kimi-k2.7-code
$0.95 / $4.00
Qwen CloudLab API
kimi-k2.7-code
$0.95 / $4.00
kimi-k2-7-code
$0.95 / $4.00
kimi-k2.7-code
$0.95 / $4.00
Retires 16 Apr 2027
kimi-k2.7-code
$0.95 / $4.00
kimi-k2.7-code
$0.95 / $4.00
kimi-k2.7-code
$0.95 / $4.00
kimi-k2.7-code
$0.95 / $4.00
BasetenInference
Kimi-K2.7-Code
$0.95 / $4.00
Kimi-K2.7-Code
$0.95 / $4.00
Together AIInference
Kimi-K2.7-Code
$0.95 / $4.00
GMI CloudInference
kimi-k2.7-code
$0.95 / $4.00
Novita AIInference
kimi-k2.7-code
$0.95 / $4.00
Fireworks AIInference
kimi-k2p7-code
$0.95 / $4.00
PerplexityGateway
kimi-k2.7-code
$0.95 / $4.00
Kimi-K2.7-Code
$0.89 / $4.42
+4% vs headline
kimi-k2.7-code
$1.01 / $4.77
+14% vs headline
Show 2 more listings: regions, snapshots and variants
Fireworks AI
Alias
kimi-k2p7-code
$0.95 / $4.00
Inference APIs
Alias
kimi-k2.7-code
$0.89 / $4.42
+4% vs headline

Capabilities

Core

  • Streaming
  • Function calling
  • JSON mode
  • Structured outputs

Multimodal

  • Vision
  • Image input
  • Audio
  • Image generation
  • Video

Advanced

  • Reasoning
  • Tool calling
  • MCP
  • Prompt caching
  • Batch API
  • Embeddings
Takes in
TextImagesVideo
Produces
Text
Features
Prompt cachingVideo input
Open weights
License: Modified MIT License
Runs in about 2464.5 GB of GPU memory
Runtimes: SGLang, vLLM

Cheaper alternatives

Current models that cost less and keep most of what this one can do: tools, vision, reasoning, structured output, caching and enough context.

Same model, cheaper host

  • CLF AI Gateway
    kimi-k2.7-code
    $0.38 / $1.60
    60% less
  • W&B Inference
    Kimi-K2.7-Code
    $0.60 / $3.00
    30% less
  • DeepInfra
    Kimi-K2.7-Code
    $0.68 / $3.40
    21% less
  • ai&
    kimi-k2.7-code
    $0.75 / $3.50
    16% less

Smaller Moonshot AI models

No cheaper Moonshot AI model keeps its key capabilities.

Other frontier labs

  • GPT-5.4 Mini
    OpenAI · on OpenAI
    $0.75 / $4.50
    Has every key capability
    1% less
  • Gemini 3.8 Flash
    Google · on Google AI Studio
    $0.75 / $3.75
    Has every key capability
    12% less
  • Grok Build 0.1
    xAI · on xAI
    $1.00 / $2.00
    Has every key capability
    27% less
  • Claude Haiku 5.5
    Anthropic · on Anthropic
    $0.10 / $0.50
    Has every key capability
    88% less

Open-weight picks

  • Inkling Small
    Independent · on DeepInfra
    $0.45 / $1.20
    Has every key capability
    63% less
  • DeepSeek Flash
    DeepSeek · on DeepSeek
    $0.30 / $1.20
    Has every key capability
    69% less
  • Qwen3.7 Plus
    Alibaba Qwen · on Replicate
    $0.276 / $1.10
    Has every key capability
    72% less
  • MiMo V2.6 Pro
    Xiaomi · on GMI Cloud
    $0.348 / $0.696
    Has every key capability
    75% less

Call it

Using Moonshot AI's API.

Python
from litellm import completion

response = completion(
    model="moonshot/kimi-k2.7-code",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)

Quick answers

How much does Kimi K2.7 Code cost?

On Moonshot AI, Kimi K2.7 Code costs $0.95 per million input tokens and $4.00 per million output tokens. Cached input costs $0.19 per million tokens. The cheapest host is CLF AI Gateway, at $0.38 per million input tokens and $1.60 per million output tokens.

Which APIs offer Kimi K2.7 Code?

Kimi K2.7 Code runs on 23 APIs: Moonshot AI, CLF AI Gateway, W&B Inference, DeepInfra, ai&, Alibaba DashScope, Qianwen AI Platform, Qwen Cloud, EmpirioLabs AI and 14 more.

What is Kimi K2.7 Code's context window?

262K tokens, with up to 262K tokens in one reply.

Is Kimi K2.7 Code being retired?

Azure AI Foundry retires it on 16 Apr 2027. 22 hosts keep serving it.

What are cheaper alternatives to Kimi K2.7 Code?

Models that cost less and keep most of what it can do: GPT-5.4 Mini on OpenAI (1% less), Gemini 3.8 Flash on Google AI Studio (12% less) and Inkling Small on DeepInfra (63% less). Kimi K2.7 Code itself costs 60% less on CLF AI Gateway. Savings are on a mix of 3 input tokens to 1 output token.

When was Kimi K2.7 Code released?

Moonshot AI released it on 12 Jun 2026.

What is Kimi K2.7 Code's API model id?

Use kimi-k2.7-code with Moonshot AI. Other hosts use their own ids: Kimi-K2.7-Code on W&B Inference, Kimi-K2.7-Code on DeepInfra, kimi-k2-7-code on EmpirioLabs AI, Kimi-K2.7-Code on Baseten.

Sources

Raw catalog entry for kimi-k2.7-code on Moonshot AI
{
  "cache_read_input_token_cost": 1.9e-7,
  "input_cost_per_token": 9.5e-7,
  "litellm_provider": "moonshot",
  "max_input_tokens": 262144,
  "max_output_tokens": 262144,
  "mode": "chat",
  "output_cost_per_token": 0.000004,
  "source": "https://platform.kimi.ai/docs/pricing/chat-k27-code",
  "supports_function_calling": true,
  "supports_prompt_caching": true,
  "supports_reasoning": true,
  "supports_response_schema": true,
  "supports_tool_choice": true,
  "supports_video_input": true,
  "supports_vision": true
}