Skip to content
OpenKey

Kimi K2.7 Code

Moonshot AIReleased Jun 12, 2026

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. It uses a native multimodal mixture-of-experts...

Try in playground
Context window
262K tokens
Max output
16K tokens
Input
text, image
Output
text
Tokenizer
Other
Released
Jun 12, 2026
Reasoning
always on

Pricing

Per 1M tokens. The provider price and our flat 3% fee are separate columns — what you pay is their sum.

Per 1M tokensProvider+ 3% feeYou pay
Input$0.740$0.022$0.762
Output$3.50$0.105$3.60
Cache read$0.150$0.0045$0.154

Benchmarks

Artificial Analysis

Intelligence index
41.9
Coding index
60.8
Agentic index
29.6

Design Arena

CategoryEloWin rateRank
androidnativeagents122152.3%#10
Full-stackagents123453.9%#7
htmlslidesagents121553.8%#5
Mobile appsagents121749.1%#12
Web appsagents124750.8%#8
3Dmodels131757.8%#12
Codemodels130755.6%#11
Data vizmodels126252.2%#24
Game devmodels128251.7%#21
UI componentsmodels129454.1%#17
Websitesmodels131957.4%#6

Head-to-head preference voting. How we filter and rank

Supported parameters

  • frequency_penalty
  • include_reasoning
  • logit_bias
  • logprobs
  • max_tokens
  • min_p
  • parallel_tool_calls
  • presence_penalty
  • reasoning
  • reasoning_effort
  • repetition_penalty
  • response_format
  • seed
  • stop
  • structured_outputs
  • temperature
  • tool_choice
  • tools
  • top_k
  • top_logprobs
  • top_p

Call it

OpenAI-compatible: point your SDK at api.openkey.ai/v1 and use model moonshotai/kimi-k2.7-code.

Code sample language
curl https://api.openkey.ai/v1/chat/completions \
  -H "Authorization: Bearer $OPENKEY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "moonshotai/kimi-k2.7-code",
    "messages": [{"role": "user", "content": "Hello"}]
  }'
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.openkey.ai/v1",
    api_key=os.environ["OPENKEY_API_KEY"],
)

completion = client.chat.completions.create(
    model="moonshotai/kimi-k2.7-code",
    messages=[{"role": "user", "content": "Hello"}],
)
print(completion.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.openkey.ai/v1",
  apiKey: process.env.OPENKEY_API_KEY,
});

const completion = await client.chat.completions.create({
  model: "moonshotai/kimi-k2.7-code",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(completion.choices[0].message.content);

Questions

How much does Kimi K2.7 Code cost via API?
Through OpenKey, Kimi K2.7 Code costs $0.762 per 1M input tokens and $3.60 per 1M output tokens. That is the provider price ($0.740 / $3.50) plus a flat 3% fee — nothing else.
What is Kimi K2.7 Code's context window?
Kimi K2.7 Code accepts up to 262K tokens of context and returns up to 16K tokens per request.
Is Kimi K2.7 Code OpenAI-compatible?
Yes. Send requests to OpenKey's /v1/chat/completions endpoint with model "moonshotai/kimi-k2.7-code" using any OpenAI SDK — only the base URL and API key change.
What inputs does Kimi K2.7 Code support?
Kimi K2.7 Code accepts text, image input and produces text output.

More from Moonshot AI

All Moonshot AI models →