Kimi-K2.7-Code
Kimi-K2.7-Code is Moonshot AI's 1T-total, 32B-active open-weight multimodal MoE model featuring native INT4 quantization, MoonViT vision input, and 256K context for long-horizon agentic coding and multi-turn tool use.
What you can do
- Cross-repository agentic software engineering
- Mockup and bug-screenshot visual coding
- Autonomous multi-turn terminal tool execution
Input & output
- Input
- Code repositories, UI mockups, error screenshots, terminal logs, and tool schemas (up to 256K tokens)
- Output
- Token-efficient thinking traces, multi-file code diffs, visual-to-code frontends, and structured tool calls
Try a prompt like this
Inspect the attached browser layout bug screenshot alongside our CSS Grid and Vue 3 source files, diagnose why sticky headers overflow on mobile viewports, and emit a clean unified diff.
Things to know
Native INT4 weights require ~600GB VRAM (deployable on a single 8×80GB/96GB GPU node via vLLM/SGLang); Modified MIT License requires "Kimi K2.7 Code" UI attribution above 100M MAU or $20M monthly revenue.
All listed models publish open weights for self-hosted deployment; check each repository's license before commercial use.
Call it through the API
The platform exposes an OpenAI-compatible API. Use an official SDK or any HTTP client, then set the gateway URL, API key, and model ID.
- Endpoint
POST/v1/chat/completions- Model repo ID
MoonshotAI/Kimi-K2.7-Code
import os
from openai import OpenAI
client = OpenAI(
base_url=os.environ["API_BASE_URL"],
api_key=os.environ["API_KEY"],
)
response = client.chat.completions.create(
model="MoonshotAI/Kimi-K2.7-Code",
messages=[{"role": "user", "content": "Inspect the attached browser layout bug screenshot alongside our CSS Grid and Vue 3 source files, diagnose why sticky headers overflow on mobile viewports, and emit a clean unified diff."}],
)
print(response.choices[0].message.content)Before running a sample, set the API_BASE_URL (gateway URL) and API_KEY environment variables.
Read the full API guide