← Back to Directory
Moonshot AI
Code📅 Released: 2026-06-12

Kimi K2.7 Code

Moonshot AI's flagship 1-trillion parameter MoE model, optimized for long-horizon coding and 30% lower thinking-token overhead.

#coding#open-source#MoE#agentic

Overview

Kimi K2.7 Code is Moonshot AI's premier programming specialist released in June 2026. Built as a 1-trillion parameter Mixture-of-Experts (MoE) model, it introduces deep reasoning loops for software engineering while optimizing speed and efficiency. A key upgrade is the 30% reduction in thinking-tokens compared to K2.6, allowing developers to execute complex refactoring tasks at lower costs.

Unique Factor

A 1-trillion parameter MoE model that achieves state-of-the-art coding metrics while significantly reducing thinking-token overhead.

Key Capabilities

1T Parameter MoE
30% Lower Thinking-Token Cost
256K context
Agentic software refactoring

Benchmarks

MMLU Score
88%
HumanEval (Coding)
96.5%
GPQA Diamond
82%
MATH Benchmark
89%

Top Use Cases

Bilingual Code Refactoring

Refactor complex backend systems using instructions mixed in Chinese and English, preserving AST structure.

Example: “将这个 Express 后端重构为 Fastify,使用 TypeScript,并优化数据库连接池配置。

Autonomous Log Auditing

Feed large application logs and configuration scripts to locate server errors and generate fixes.

Example: “Audit these 100,000 lines of system logs. Identify why our Kubernetes nodes are restart-looping and write a YAML fix.

Detailed Features

01

1T Parameter MoE: Massive scale utilizing 100B active parameters per token for optimized reasoning.

02

30% Thinking Token Reduction: Reduced token footprint for complex programming loops, cutting costs and latency.

03

256K Context Window: High recall context suited for multi-file code editing and log audits.

04

Bilingual Coding Mastery: Equal accuracy parsing English and Chinese programming instructions.

Strengths & Pros

  • Exceptional coding intelligence and syntax accuracy
  • 30% reduction in token overhead translates directly to cost savings
  • Available for open-weights hosting and Cloudflare deployment

Limitations & Cons

  • Heavy infrastructure required for local 1T MoE deployment
  • No native vision or audio input support (focus is text/code)

Ideal Usage & Target Audience

Best For

Software engineering teams, DevOps managers, and developers looking for cost-effective agentic coding.

Not Recommended For

Users requiring native image generation or multimodal video analysis.

API Implementation

python
import openai

client = openai.OpenAI(base_url='https://api.moonshot.cn/v1', api_key='KIMI_API_KEY')
response = client.chat.completions.create(
    model='kimi-k2.7-code',
    messages=[{'role': 'user', 'content': 'Optimize this SQL query for high concurrency.'}]
)

Check the official documentation for full SDK details.

Frequently Asked Questions

Is Kimi K2.7 Code open source?

Yes, Moonshot AI has released open weights under a community license, and the API is accessible on various cloud hosting solutions.

What is the advantage of the 30% thinking token reduction?

AI reasoning models generate 'thinking tokens' internally before answering. By optimizing this process, K2.7 Code reduces overall cost and latency on API calls.

Technical Specs

Context256,000 tokens
Params1T (approx active 100B)
LicenseMoonshot Community / MIT
ArchLLM / MoE

API Pricing

$1 / 1M input tokens

Output: $4 / 1M tokens

✓ Free tier available
Access API

Developer

Long-context pioneers — creators of the Kimi chatbot and the agentic Kimi K-series models.

Prompt Library

Browse Coding Prompts

📋

Previous Version

Kimi K2 6