Moonshot AI: Kimi K2.7 Code
moonshotai/kimi-k2.7-code
Access Kimi K2.7 Code from Moonshot AI using Puter.js AI API.
Get Started// npm install @heyputer/puter.js
import { puter } from '@heyputer/puter.js';
puter.ai.chat("Explain quantum computing in simple terms", {
model: "moonshotai/kimi-k2.7-code"
}).then(response => {
document.body.innerHTML = response.message.content;
});
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.ai.chat("Explain quantum computing in simple terms", {
model: "moonshotai/kimi-k2.7-code"
}).then(response => {
document.body.innerHTML = response.message.content;
});
</script>
</body>
</html>
# pip install openai
from openai import OpenAI
client = OpenAI(
base_url="https://api.puter.com/puterai/openai/v1/",
api_key="YOUR_PUTER_AUTH_TOKEN",
)
response = client.chat.completions.create(
model="moonshotai/kimi-k2.7-code",
messages=[
{"role": "user", "content": "Explain quantum computing in simple terms"}
],
)
print(response.choices[0].message.content)
curl https://api.puter.com/puterai/openai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_PUTER_AUTH_TOKEN" \
-d '{
"model": "moonshotai/kimi-k2.7-code",
"messages": [
{"role": "user", "content": "Explain quantum computing in simple terms"}
]
}'
Model Card
Kimi K2.7 Code is Moonshot AI's open-weight coding-agent model, released June 2026 and purpose-built for long-horizon, autonomous coding tasks. It shares the same 1-trillion-parameter Mixture-of-Experts architecture (32B active parameters) as K2.6 but is entirely focused on software engineering workloads.
Compared to K2.6, it improves 21.8% on Kimi Code Bench v2, 11% on Program Bench, and 31.5% on MLS Bench Lite, while cutting reasoning-token usage by roughly 30%. It always runs in thinking mode — non-thinking mode is not supported.
With a 262K-token context window, K2.7 Code is well-suited for multi-file, repository-scale coding pipelines and agentic workflows where sustained reasoning and deep code understanding matter.
Context Window 262K
tokens
Max Output 262K
tokens
Input Cost $0.95
per million tokens
Output Cost $4
per million tokens
Input text
modalities
Tool Use Yes
Release Date Jun 15, 2026
Model Playground
Try Kimi K2.7 Code instantly in your browser.
This playground uses the Puter.js AI API — no API keys or setup required.
More AI Models From Moonshot AI
Find other Moonshot AI models →
Kimi K2.6
Kimi K2.6 is Moonshot AI's latest open-weight multimodal model, built on a 1-trillion-parameter mixture-of-experts architecture with a 256K context window. It excels at agentic coding and long-horizon execution, supporting sustained autonomous workflows with 4,000+ tool calls across languages like Rust, Go, and Python. On key benchmarks, it scores 58.6 on SWE-Bench Pro, 54.0 on HLE with Tools, and 50.0 on Toolathlon — competitive with GPT-5.4 and Claude Opus 4.6 on coding and agent tasks, though trailing them on pure reasoning. The model accepts text, image, and video input, supports both thinking and non-thinking modes, and offers an OpenAI-compatible API. It's a strong pick for developers building multi-step agentic workflows and complex software engineering pipelines.
ChatKimi K2.5
Kimi K2.5 is Moonshot AI's most capable open-source model, a natively multimodal (vision + text) trillion-parameter MoE with 32B active parameters released in January 2026. Built through continual pretraining on ~15 trillion mixed visual and text tokens atop the K2 base, it supports both thinking and instant modes with a 256K context window. It scored 76.8% on SWE-bench Verified, 96.1% on AIME 2025, and 50.2% on Humanity's Last Exam with tools — outperforming Claude Opus 4.5 and GPT-5.2 on the latter. Its standout feature is Agent Swarm, which coordinates up to 100 parallel sub-agents for complex tasks. K2.5 excels at vision-to-code generation, frontend development from screenshots, and large-scale agentic workflows, making it a strong choice for developers building multimodal AI agents.
ChatKimi K2 Thinking
Kimi K2 Thinking is Moonshot AI's reasoning-enhanced variant of Kimi K2, trained to interleave step-by-step chain-of-thought with dynamic tool calls. It supports up to 200–300 sequential tool calls without drift, enabling deep autonomous research, coding, and analysis workflows. It achieves 71.3% on SWE-bench Verified, 44.9% on Humanity's Last Exam (with tools), 60.2% on BrowseComp, and 99.1% on AIME 2025 (with Python) — placing it among the top open-source thinking models. It uses native INT4 quantization and a 256K context window. K2 Thinking is designed for complex, multi-step tasks where extended reasoning and sustained tool orchestration matter more than low-latency responses.
Frequently Asked Questions
You can access Kimi K2.7 Code by Moonshot AI through Puter.js AI API. Include the library in your web app or Node.js project and start making calls with just a few lines of JavaScript — no backend and no configuration required. You can also use it with Python or cURL via Puter's OpenAI-compatible API.
Yes, it is free if you're using it through Puter.js. With the User-Pays Model, you can add Kimi K2.7 Code to your app at no cost — your users pay for their own AI usage directly, making it completely free for you as a developer.
| Price per 1M tokens | |
|---|---|
| Input | $0.95 |
| Output | $4 |
Kimi K2.7 Code was created by Moonshot AI and released on Jun 15, 2026.
Kimi K2.7 Code supports a context window of 262K tokens. For reference, that is roughly equivalent to 524 pages of text.
Kimi K2.7 Code can generate up to 262K tokens in a single response.
Kimi K2.7 Code accepts the following input types: text. It produces: text.
Yes, Kimi K2.7 Code supports tool use (function calling), allowing it to interact with external tools, APIs, and data sources as part of its response flow.
Yes — the Kimi K2.7 Code API works with any JavaScript framework, Node.js, or plain HTML through Puter.js. Just include the library and start building. See the documentation for more details.
Get started with Puter.js
Add Kimi K2.7 Code to your app without worrying about API keys or setup.
Read the Docs View Tutorials