Kimi K2.7 Code API
Access Kimi K2.7 Code through one API key. Moonshot AI's coding-specialized model.
Moonshot AI's latest coding-specialized model. Tuned for agentic software engineering and tool use with a 256K token context window.
Takes 30 seconds.
Kimi K2.7 Code API pricing
Pay per request from your YepAPI balance — no subscription, no monthly minimum. Prices updated October 23, 2026.
| Token type | Price |
|---|---|
| Input | $0.99 / 1M tokens |
| Output | $4.95 / 1M tokens |
| Context window | 262K tokens |
| What it costs | Per job | Per 1,000 |
|---|---|---|
| Chat reply1K input + 500 output tokens | $0.0035 | $3.47 |
| RAG answer8K input + 800 output tokens | $0.012 | $11.88 |
| Agent step with tools30K input + 2K output tokens | $0.04 | $39.60 |
| Long document summary100K input + 2K output tokens | $0.109 | $108.90 |
4,900+
Developers
2.3M+
API calls served
184
Endpoints
$0.01
Per call
Yep, that's it.
Try it live
Send a message and see Kimi K2.7 Code respond in real time.
Maximum tokens in the response.
Real-time tokens
Kimi K2.7 Code specs
| Provider | Moonshot AI |
|---|---|
| Model ID | moonshotai/kimi-k2.7-code |
| Endpoint | /v1/ai/chat |
| Type | Text Generation |
| Context window | 262K tokens |
| Max output | 16K tokens |
| Reasoning | No |
| OpenAI-compatible | Yes — /v1/ai/chat/completions |
How to get a Kimi K2.7 Code API key
- 1
Create an account
Sign up at yepapi.com with Google or email. It takes about 30 seconds.
- 2
Create an API key
Open the dashboard, go to API Keys and create a key. Copy it — it starts with yep_sk_.
- 3
Call Kimi K2.7 Code
Send a request to /v1/ai/chat with the x-api-key header and model "moonshotai/kimi-k2.7-code".
- 4
Pay as you go
Usage is billed per request from your balance. Top up any amount; there is no subscription.
Strengths
Tuned specifically for software engineering, with strong code generation, editing, and debugging across languages.
Holds up to 262,144 input tokens, enough to load large multi-file projects and supporting docs into one request.
Optimized for agentic workflows and tool calling, suited to autonomous coding agents that plan and execute steps.
Delivers coding-specialist performance at pricing well below premium coding models.
Quick start
Copy this snippet and start making calls with Kimi K2.7 Code.
const res = await fetch('https://api.yepapi.com/v1/ai/chat', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"model": "moonshotai/kimi-k2.7-code",
"messages": [
{
"role": "user",
"content": "Explain API gateways in 2 sentences."
}
],
"maxTokens": 256
}),
});
const { data } = await res.json();
console.log(data.message.content);Kimi K2.7 Code vs similar models
Every model below runs on the same API key — switch by changing the model ID.
| Model | Provider | Price | Context |
|---|---|---|---|
| Kimi K2.7 Code | Moonshot AI | $0.99 in / $4.95 out per 1M | 262K |
| Kimi K2.5 | Moonshot AI | $0.74 in / $3.69 out per 1M | 262K |
| Kimi K3 | Moonshot AI | $4.43 in / $22.15 out per 1M | 1.0M |
| Nemotron 3 Super | NVIDIA | $0 in / $0 out per 1M | 262K |
| Qwen3.7 Flash | Qwen | $0.04 in / $0.19 out per 1M | 1M |
| Solar Mini 4 | Upstage | $0.07 in / $0.30 out per 1M | 524K |
| Nemotron 3.5 Lightning | NVIDIA | $0.10 in / $0.30 out per 1M | 262K |
| DeepSeek V4 Flash | DeepSeek | $0.13 in / $0.27 out per 1M | 1.0M |
Why use Kimi K2.7 Code through YepAPI?
Kimi K2.7 Code API: Moonshot AI's coding agent model
Kimi K2.7 Code is Moonshot AI's coding-specialized model, tuned for agentic software engineering and tool use with a 256K-token context window. YepAPI serves it through one OpenAI-compatible endpoint.
Your single YepAPI key also reaches DeepSeek, Claude, Grok, Gemini, and more, plus SEO, SERP, and scraping endpoints, so a coding agent can call data and search tools from the same key.
What is Kimi K2.7 Code?
Kimi K2.7 Code is Moonshot AI's latest coding-specialized model, purpose-built for software engineering and agentic workflows. It offers a 262,144-token (256K) context window with up to 16,384 output tokens, and is tuned for code generation, editing, debugging, and tool use rather than general chat. Its standout trait is agentic tool calling: it is designed to plan and execute multi-step engineering tasks, making it a fit for autonomous coding agents and IDE assistants. The large context lets it reason over big, multi-file projects, and it delivers this specialist coding ability at strong value.
Build with Kimi K2.7 Code via YepAPI
Call YepAPI's OpenAI-compatible /v1/ai/chat endpoint with any OpenAI client; tool/function calling works through the standard schema. Set the base URL, add your key, and set the model string to Kimi K2.7 Code. Switching models is a single string change. Because the same key reaches the whole catalog, your coding agent can use Kimi K2.7 Code for engineering and call other models or YepAPI's data and search endpoints in the same workflow.
Kimi K2.7 Code API pricing — $0.99 input / $4.95 output per 1M tokens
Kimi K2.7 Code costs $0.99 per 1M input tokens and $4.95 per 1M output tokens. For a coding-specialized model built for agentic work, this is strong value, well below premium coding models while offering a 256K context and tool-use tuning. Per-token billing suits agents that read large contexts but emit comparatively short, targeted edits, keeping per-task cost reasonable.
Kimi K2.7 Code for agentic software engineering
Kimi K2.7 Code is built for autonomous coding agents: planning changes, calling tools, editing across files, and debugging within a large 256K context. It fits IDE assistants, CI bots, and engineering agents that need to load substantial project context and then act on it through tool calls. The coding-specialist tuning means it stays focused on engineering tasks, and the value pricing makes it viable to run agents that issue many calls per session.
What developers say
“Switched from SerpAPI and cut our SERP costs by 80%. Same data quality, way simpler billing.”
“One API key for AI models, SERP data, and web scraping. Saved us from managing 4 separate providers.”
“The $5 free credit let us prototype our entire rank tracking feature before committing. No other API does that.”
Frequently asked questions
Moonshot AI's latest coding-specialized model. Tuned for agentic software engineering and tool use with a 256K token context window.
Kimi K2.7 Code costs $0.99 per 1M input tokens and $4.95 per 1M output tokens through YepAPI, billed per request with no monthly fee. For example, a chat reply (1K input + 500 output tokens) costs about $0.0035.
Sign up at yepapi.com (Google or email, about 30 seconds), open the dashboard and create an API key. The same key works for Kimi K2.7 Code and every other model — no separate Moonshot AI account or waitlist.
Use "moonshotai/kimi-k2.7-code" as the model on /v1/ai/chat. The short alias "kimi-k2.7-code" also works.
Yes. Point the OpenAI SDK at https://api.yepapi.com/v1/ai with your YepAPI key and set model to "moonshotai/kimi-k2.7-code". Streaming works the same way, so existing OpenAI code only needs the base URL and key changed.
Kimi K2.7 Code supports a 262K token context window with up to 16K output tokens per request.
Explore more models
Kimi K3
Moonshot AIAccess Kimi K3 through one API key. Moonshot AI Kimi K3 Open-Weight Reasoning.
Kimi K2.5
Moonshot AIAccess Kimi K2.5 through one API key. Moonshot AI's flagship model.
Seed 2.0 Pro
ByteDanceAccess Seed 2.0 Pro through one API key. ByteDance's flagship Seed 2.0 reasoning model.
DeepSeek R1 0528
DeepSeekAccess DeepSeek R1 0528 through one API key. DeepSeek Open Chain-of-Thought Reasoning.
Qwen3.8 Max (0902)
QwenAccess Qwen3.8 Max (0902) through one API key. Qwen3.8 Max Updated Snapshot.
Gemini 3.5 Flash
GoogleAccess Gemini 3.5 Flash through one API key. Google's latest fast multimodal model.
More Text Generation models
- Gemini 2.5 Pro API · Google
- GPT-5.1 Codex Max API · OpenAI
- Seed-2.0-Code API · ByteDance
- Llama 4 Scout API · Meta
- Claude Sonnet 4.5 API · Anthropic
- Qwen3.8 Flash API · Qwen
- GPT-5.6 Sol Pro API · OpenAI
- GPT-5.2 Chat API · OpenAI
- Claude Sonnet 4.6 API · Anthropic
- Claude Sonnet 5.5 API · Anthropic
- Nemotron 3.5 Super VL API · NVIDIA
- Seed 2.1 Turbo API · ByteDance