All models

Kimi K2.7 Code: Moonshot's coding model

Moonshot's latest open-weight model. Best-in-class agentic benchmarks at the open-source frontier and a Claude-compatible interface.

256K tokens · Text / Vision / Code · Prompt cache

Okou no longer runs Kimi K2.7 Code. This page is kept as a reference for its specs, pricing and benchmarks. For the same kind of work, use GPT 5.6 Luna.

See GPT 5.6 Luna

Kimi K2.7 Code is Moonshot's open-weight flagship and currently the strongest open-source agentic model on several public benchmarks. It sustains very long runs without losing the thread (Moonshot has documented unattended sessions of 12+ hours and 4,000+ tool calls) and accepts image and video input natively. Vendor-reported SWE-bench Pro hits 58.6 (above Claude Opus 4.6 and GPT-5.4 on that benchmark), and the hallucination rate dropped from K2.6's ~65% to ~39%.

Vendor list price is $1.14 / $4.80 per 1M tokens, open weights ship under a Modified MIT license, and the API is Anthropic-compatible. Reach for Sonnet 4.6 when production tool-routing reliability matters more than benchmark scores, and for Kimi K2.7 Code when latency dominates.

What is Kimi K2.7 Code?

June 2026 · Top of Moonshot's open-weight Kimi K2 series. Successor to K2.6 and K2 Thinking.

Kimi K2.7 Code is Moonshot AI's open-weight agentic model released June 2026. It's a 1-trillion-parameter Mixture-of-Experts (MoE) model with 32B active parameters per token. The same architecture family as K2.6 and K2 Thinking, with substantial gains on agentic coding and long-horizon reasoning.

K2.7 made a real splash on independent leaderboards. Vendor-reported scores put it ahead of GPT-5.4 (xhigh) and Claude Opus 4.6 (max effort) on SWE-bench Pro, with a hallucination rate of 39% (down from K2.6's 65%). Artificial Analysis ranks it #4 on its Intelligence Index. The leading open-weight option.

What's notable about Kimi K2.7 Code

Headline architecture and capability features.

K2.7 is a Mixture-of-Experts model with 1T total parameters and 32B active per token, fronted by a 256K-token context window and multimodal input across image and video (text-only output). Moonshot pairs it with an Agent Swarm runtime that scales horizontally to 300 sub-agents and 4,000 coordinated steps, and has documented long-horizon coding sessions of 12 hours or more. Open weights are published on Hugging Face under a Modified MIT License.

Specs at a glance

FamilyKimi K2 series
Parameters1T total / 32B active (MoE)
ModalitiesImage, video, text
LanguagesMultilingual
Context window256K tokens
LicenseModified MIT (open weights)

Kimi K2.7 Code benchmarks

Vendor-reported scores from Moonshot's K2.7 release blog. Independent third parties (Artificial Analysis, TokenMix) corroborate the relative ordering. K2.7's hallucination rate dropped to 39% from K2.6's 65%. A significant safety/reliability improvement.

SWE-bench Provendor-reported; beats GPT-5.4, Opus 4.6
58.6
SWE-bench Verifiedvendor-reported
80.2
Terminal-Bench 2.0Terminus-2 framework
66.7
LiveCodeBench (v6)vendor-reported
89.6
HLE (with tools)leads GPT-5.4 and Opus 4.6
54.0
BrowseComp (Agent Swarm)up from K2.6's 78.4
86.3
Artificial Analysis Intelligence Index#4 overall, leading open-weight
54

Kimi K2.7 Code pricing

Provider list price, per 1M tokens.

Input$1.14
Output$4.80
Cache read$0.19
Cache write$1.14

How Kimi K2.7 Code behaves in practice

Observed behaviour from production agent runs.

Long-context recall

Strongest long-context recall in our internal evaluation across the Built-in lineup. Maintains coherence across long agent transcripts where Anthropic Sonnet starts to drift.

Agentic benchmarks

Vendor-reported SWE-bench Pro 58.6 is the highest in the lineup at the time of writing. Beats GPT-5.4 and Opus 4.6.

Long-horizon coding

Documented 12+ hour autonomous sessions completing 4,000+ tool calls. The model genuinely sustains performance across very long runs.

Best agent tasks for Kimi K2.7 Code

The investigation that has to read every old thread

Dig through six months of Slack conversations to find why a customer churned, comb the support-ticket backlog for a recurring bug pattern, or stitch together insights across a hundred RFCs. K2.7's long-context recall holds up across transcripts where Anthropic Sonnet starts dropping earlier turns, which is exactly what "reading the whole pile" workflows need.

The autonomous refactor that runs overnight

Moonshot has documented a 13-hour autonomous refactor of an eight-year-old matching engine, with K2.7 sustaining 4,000+ tool calls without drifting off task. That's the kind of run where most models lose the goal somewhere around hour two; K2.7's long-horizon stability is what makes "start it Friday evening, check Monday morning" actually work.

The multimodal agent that handles screenshots and clips

K2.7 accepts both image and video input through MoonViT, which is unusual outside the Claude family. Useful for screenshot-driven QA agents, document-vision pipelines, and any deployment where you'd otherwise have to splice in a separate vision model just to read images.

Kimi K2.7 Code vs other models

Kimi K2.7 Code vs GLM-5.2

Both are current cost-saving long-context options. K2.7 Code is the Moonshot default with stronger multimodal coding fit; GLM-5.2 is the current Z.AI default with a larger 1M-token context window.

Kimi K2.7 Code vs Claude Sonnet 4.6

Sonnet (×1) leads on multi-tool English-language routing reliability. K2.7 (×0.3) wins on cost and on agentic benchmarks (SWE-bench Pro). Pair them: Sonnet for complex tool-routing, K2.7 for cost-sensitive agent work.

Kimi K2.7 Code vs DeepSeek V4 Pro

DeepSeek V4 Pro is cheaper and has a larger 1M-token context window. Kimi K2.7 Code is the stronger Moonshot-native coding route and includes vision input. Pick by provider fit and workload shape.

Bottom line: should you use Kimi K2.7 Code?

The open-weight default for serious agent work — long-context, cost-effective. The remaining gaps versus Sonnet 4.6 are tool-routing reliability and enterprise support.

Frequently asked questions

When was Kimi K2.7 Code released?

Moonshot AI released Kimi K2.7 Code on June 2026. Open weights are published on Hugging Face under a Modified MIT License.

What's the context window?

256K tokens. K2.7 differentiates on recall quality at that size, not raw window size. Recall starts to degrade past ~180K (similar to other 256K models).

How does Kimi K2.7 Code compare to Claude Opus 4.6?

On agentic benchmarks (vendor-reported), K2.7 leads. SWE-bench Pro 58.6 vs Opus 4.6's 53.4, HLE with tools 54.0 vs 53.0. Opus 4.6 retains an edge on safety profile and English-language tool-routing reliability in production.

Does K2.7 support image input?

Yes. K2.7 accepts image and video input. Text-only output. Multimodal agents work natively.

Availability of Kimi K2.7 Code on Okou

Kimi K2.7 Code has been removed from the Okou lineup, so it can no longer be selected in chat or in a workflow, and it is not available with your own API key. GPT 5.6 Luna covers the same cost-saving tier.