# Kimi K2.7-Code

> Moonshot's strongest open-weight coding model, tuned for long-horizon agentic software work.

- Maker: Moonshot AI (Kimi)
- Line: Kimi K2
- Canonical page: https://ai-tldr.dev/models/kimi-k2-7-code/
- Updated: 2026-06-18

## In short

Kimi K2.7-Code is Moonshot AI's coding-focused agentic model, built on top of Kimi K2.6. Moonshot AI (Kimi) released it on 2026 as an open-weight model. It has a 256K-token context window and costs $0.95 per million input tokens and $4.00 per million output tokens. You can use it through Moonshot AI (Kimi).

## Facts

| Fact | Value | Source |
| --- | --- | --- |
| Context window | 256K | [1] |
| Input price | $0.95 / 1M tokens (cached $0.19) | [2] |
| Output price | $4.00 / 1M tokens | [2] |
| Licence | Modified MIT License · open weights | [1] |
| Released | 2026 | [1] |
| Parameters | 1T total · 32B active | [1] |

## Sources

1. [Hugging Face model card](https://huggingface.co/moonshotai/Kimi-K2.7-Code)
2. [Kimi API platform & pricing](https://platform.kimi.ai/)

## Overview

Kimi K2.7-Code is Moonshot AI's coding-focused agentic model, built on top of Kimi K2.6. It is a 1-trillion-parameter Mixture-of-Experts model that activates 32B parameters per token (384 experts, 8 selected per token plus 1 shared expert, across 61 layers), and ships with open weights under a Modified MIT License.

The model targets real-world, long-horizon software engineering: multi-step coding agents, codebase understanding, and tool-driven workflows. Moonshot reports substantial gains on long-horizon coding tasks over K2.6, together with roughly a 30% reduction in thinking-token usage, which lowers the cost of agentic runs.

K2.7-Code is served through Moonshot's Kimi API platform with OpenAI- and Anthropic-compatible endpoints, supports a 256K-token context window and tool calling, and runs with thinking enabled. It is also the model behind the Kimi Code CLI for terminal and IDE coding agents.

## Benchmarks

- Kimi-Code-Bench v2: 62% ([source](https://huggingface.co/moonshotai/Kimi-K2.7-Code))
- Program-Bench: 53.6% ([source](https://huggingface.co/moonshotai/Kimi-K2.7-Code))
- MCP Mark Verified: 81.1% ([source](https://huggingface.co/moonshotai/Kimi-K2.7-Code))

## Pricing

- Input: $0.95 / 1M tokens
- Cached input: $0.19 / 1M tokens
- Output: $4.00 / 1M tokens

Source: https://platform.kimi.ai/

## Strengths

- Strong long-horizon, multi-step agentic coding performance built on the K2.6 base.
- Token-efficient reasoning — about 30% fewer thinking tokens than K2.6, cutting agent run costs.
- Large 256K-token context for whole-codebase understanding and long trajectories.
- Native tool calling with OpenAI/Anthropic-compatible APIs for easy agent integration.
- Open weights (Modified MIT) enabling self-hosting and customization.

## Best for

- Autonomous coding agents that plan and execute multi-step software tasks.
- Code generation and refactoring across large, multi-file repositories.
- Terminal/IDE coding assistants via the Kimi Code CLI.
- Tool-using agents that integrate external systems through MCP-style workflows.

## How to access

- [Moonshot AI (Kimi)](https://platform.moonshot.ai/) — model id `kimi-k2.7-code`

## Kimi K2 versions

- Kimi K2.7-Code (12 June 2026) — this page
- [Kimi K2.6](https://ai-tldr.dev/models/kimi-k2-6/) (20 April 2026)
- [Kimi K2.5](https://ai-tldr.dev/models/kimi-k2-5/) (27 January 2026)
- [Kimi K2-Instruct-0905](https://ai-tldr.dev/models/kimi-k2-instruct-0905/) (9 September 2025)
- [Kimi K2](https://ai-tldr.dev/models/kimi-k2/) (11 July 2025)

## FAQ

### What is Kimi K2.7-Code?

Kimi K2.7-Code is Moonshot AI's open-weight, coding-focused agentic model built on Kimi K2.6. It is a 1-trillion-parameter Mixture-of-Experts model that activates 32B parameters per token, tuned for long-horizon software engineering, code generation, and tool-using coding agents, and released under a Modified MIT License.

### How large is the context window?

Kimi K2.7-Code supports a 256K-token context window, large enough to load substantial portions of a codebase and to sustain long, multi-step agentic coding trajectories. Combined with native tool calling, this makes it well suited to whole-repository understanding and extended autonomous engineering sessions.

### How much does the Kimi K2.7-Code API cost?

On Moonshot's Kimi platform, K2.7-Code is priced at $0.95 per million input tokens and $4.00 per million output tokens, with cache-hit input billed at $0.19 per million tokens. The model also reduces thinking-token usage by roughly 30% versus K2.6, which lowers the effective cost of agentic runs.

### Are the model weights open?

Yes. Kimi K2.7-Code is an open-weight model published on Hugging Face under a Modified MIT License, so it can be self-hosted and customized. It is also available as a hosted API on Moonshot's Kimi platform with OpenAI- and Anthropic-compatible endpoints for teams that prefer managed inference.

## Links

- [Hugging Face model card](https://huggingface.co/moonshotai/Kimi-K2.7-Code)
- [Kimi API platform & pricing](https://platform.kimi.ai/)
- [Moonshot AI developer platform](https://platform.moonshot.ai/)
- [Kimi K2.6 quickstart docs](https://platform.kimi.ai/docs/guide/kimi-k2-6-quickstart)

Source: AI/TLDR LLM registry, https://ai-tldr.dev/models/kimi-k2-7-code/
