YepAPI
Moonshot AIText Generation/v1/ai/chat

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 typePrice
Input$0.99 / 1M tokens
Output$4.95 / 1M tokens
Context window262K tokens
What it costsPer jobPer 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.

POST/v1/ai/chat

Maximum tokens in the response.

Real-time tokens

Hit "Send Request" to see the response

Kimi K2.7 Code specs

ProviderMoonshot AI
Model IDmoonshotai/kimi-k2.7-code
Endpoint/v1/ai/chat
TypeText Generation
Context window262K tokens
Max output16K tokens
ReasoningNo
OpenAI-compatibleYes — /v1/ai/chat/completions

How to get a Kimi K2.7 Code API key

  1. 1

    Create an account

    Sign up at yepapi.com with Google or email. It takes about 30 seconds.

  2. 2

    Create an API key

    Open the dashboard, go to API Keys and create a key. Copy it — it starts with yep_sk_.

  3. 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. 4

    Pay as you go

    Usage is billed per request from your balance. Top up any amount; there is no subscription.

Strengths

✓
Coding-specialized

Tuned specifically for software engineering, with strong code generation, editing, and debugging across languages.

✓
256K token context

Holds up to 262,144 input tokens, enough to load large multi-file projects and supporting docs into one request.

✓
Agentic tool use

Optimized for agentic workflows and tool calling, suited to autonomous coding agents that plan and execute steps.

✓
Great value for code

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.

ModelProviderPriceContext
Kimi K2.7 CodeMoonshot AI$0.99 in / $4.95 out per 1M262K
Kimi K2.5Moonshot AI$0.74 in / $3.69 out per 1M262K
Kimi K3Moonshot AI$4.43 in / $22.15 out per 1M1.0M
Nemotron 3 SuperNVIDIA$0 in / $0 out per 1M262K
Qwen3.7 FlashQwen$0.04 in / $0.19 out per 1M1M
Solar Mini 4Upstage$0.07 in / $0.30 out per 1M524K
Nemotron 3.5 LightningNVIDIA$0.10 in / $0.30 out per 1M262K
DeepSeek V4 FlashDeepSeek$0.13 in / $0.27 out per 1M1.0M

Why use Kimi K2.7 Code through YepAPI?

✓One API key for all models — no separate accounts
✓OpenAI SDK compatible — just change the base URL
✓No monthly minimums — pay per token
✓Switch models with one line of code
✓Full provider passthrough — citations, search results, and all extras included
✓Streaming and non-streaming support on every model
✓Works with Cursor, Claude, LangChain, and any LLM tool
✓Unified billing across all providers

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.

Start generating in 30 seconds

Pay per call, no subscriptions.

What developers say

“Switched from SerpAPI and cut our SERP costs by 80%. Same data quality, way simpler billing.”

Marcus T.

SEO Platform Founder

“One API key for AI models, SERP data, and web scraping. Saved us from managing 4 separate providers.”

Priya S.

Full-Stack Developer

“The $5 free credit let us prototype our entire rank tracking feature before committing. No other API does that.”

Jake R.

Indie Hacker

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.

Ready to use Kimi K2.7 Code?

Pay per call, no subscriptions.

Explore more models