Skip to content

Models / Moonshot AI

Kimi K2.7 Code

Available

Kimi K2.7 Code is Moonshot AI’s coding model, built on Kimi K2.6.

Good for Coding agents · Hard reasoning · Images and screenshots

kimi-k2.7-codeGet API keyCompare

Is it right for you?

It is older than our current Kimi K3. Moonshot lists a 256K context window and input of text, images and video. Thinking is always on and cannot be turned off. Moonshot says it uses about 30% fewer thinking tokens than K2.6 and scores higher on its coding benchmarks. Pick it for long coding sessions if you tested it. For general writing and analysis, Moonshot recommends K2.6.

Best for

  • Long coding sessions: refactors, multi-file features and long debugging.
  • Coding agents that also read screenshots or video.
  • Teams that want fewer thinking tokens than K2.6 on code tasks.

Not ideal for

  • Quick answers: thinking cannot be turned off, so every reply includes thinking tokens.
  • General writing and analysis: Moonshot recommends K2.6 for those.
  • Strict tool control: with thinking on, tool_choice accepts only auto or none.

Next to the rest of the Moonshot AI line

ModelInputOutputContextPer session
Kimi K2.6$1.1515$4.7831256K$0.3752
Kimi K2.7 Code (this page)$1.1515$4.7831256K$0.3922
Kimi K3$3.2900$16.4498256K$1.0462

What it costs

Prepaid, per token, no subscription. Set your traffic to see your bill.

percent of input tokens
Estimated monthly spend
$441.96

30 days, at today's prices. You're billed on actual tokens.

Per request
$0.007366
Coding session
$0.39
Per day
$14.73
Suggested key budget
$510.00
Alert at 80%
$408.00

A coding session is 30 requests of 20,000 input tokens, 80% from cache, and 1,000 output tokens each: the same session as the "Per session" column above. Thinking tokens are billed as output, so reasoning raises the cost.

One price all day: this model has no peak pricing in our catalogue.

Capabilities

What Kimi K2.7 Code can do, as Moonshot AI lists it.

CapabilitySupport
Tool callingYes, including multi-step calls
Parallel tool callsNot listed
ReasoningAlways on: non-thinking mode is not supported
Reasoning effortNot listed
Image inputYes: images and video; images must be base64
JSON outputNot mentioned
StreamingYes
Prompt caching—

Get started

Create a key in the console, export it as YUNSHU_API_KEY, then use one of these.

export ANTHROPIC_BASE_URL=https://api.yunshurouter.com
export ANTHROPIC_AUTH_TOKEN=$YUNSHU_API_KEY
export ANTHROPIC_MODEL=kimi-k2.7-code

Full steps for each tool: integration guides →

Questions

What is Kimi K2.7 Code?

Kimi K2.7 Code is a coding model from Moonshot AI. It is built on Kimi K2.6 and made for long-horizon coding and agent tasks.

Does Kimi K2.7 Code support tool calling?

Yes. Tool calling works in both the OpenAI format (tools) and the Anthropic format (tools with input_schema). Moonshot supports multi-step calls, and with thinking on, tool_choice accepts only auto or none.

Does Kimi K2.7 Code support reasoning?

Yes, and it is always on. Moonshot does not support a non-thinking mode for this model.

Should I use Kimi K2.7 Code or Kimi K3?

Use Kimi K3 for new work, because it is the current model. Moonshot’s pages do not compare the two. K2.7 Code is the coding-focused model from the K2 line.