Kimi K2.7 Code API
Released June 12, 2026. A 1T-parameter MoE with 32B active per token, tuned for code generation and repository-scale work, with image and video input across a 256K context window.
💰 Save up to 70% vs official Moonshot AI pricingKimi K2.7 Code — cheaper than the official Moonshot AI API
Access Kimi K2.7 Code through AI API Hub and pay less per token. Same OpenAI-compatible endpoint, lower cost.
Technical Specifications
| Provider | Moonshot AI |
| Model Family | Kimi K2.7 Code |
| Release Date | 2026-06 |
| Context Window | 256K |
| Max Output Tokens | 32,768 |
| Input Price | $0.90 / 1M tokens |
| Output Price | $3.75 / 1M tokens |
| Vision Support | Yes ✓ |
| Function Calling | No |
| JSON Mode | No |
| Streaming | Yes ✓ |
| Fine Tuning | Not Available |
| Status | Active ✓ |
Overview
Kimi K2.7 Code is Moonshot AI's current kimi model, released in 2026-06. Released June 12, 2026. A 1T-parameter MoE with 32B active per token, tuned for code generation and repository-scale work, with image and video input across a 256K context window.
For developers, the headline numbers are a 256K context window and up to 32,768 output tokens per response — enough headroom for code-specialized kimi and image & video input without chunking your input. Priced at $0.90/1M input and $3.75/1M output, it sits in the budget tier — ideal for high-volume pipelines where token cost dominates.
On the capability side, Kimi K2.7 Code exposes 5 features: Code Generation, Vision, Video, Long Context, Streaming. Note that fine-tuning isn't supported — you'll work with the base model. Vision support means you can pass images alongside text, handy for document parsing or UI automation.
The practical appeal of routing Kimi K2.7 Code through AI API Hub is simplicity: one OpenAI-compatible endpoint, USDT & USDC payments, no credit card, and you're calling the API in under 30 seconds — just swap your base URL.
What Makes Kimi K2.7 Code Different
How Kimi K2.7 Code is used
Kimi K2.7 Code is used for text-to-video and image-to-video generation. You send a prompt or reference image, receive a video clip back. Common pipelines: marketing asset generation, storyboarding, social content, and visual prototyping. It doesn't handle text chat — route text workloads to a language model.
Pricing position within Moonshot AI
Kimi K2.7 Code sits in the middle of Moonshot AI's pricing at $0.90/1M input — 30% below the lineup average ($0.56 cheapest, $2.80 most expensive). 1 sibling cost less, 1 cost more. This mid-tier positioning makes it a sensible default when you're unsure which variant to pick.
Kimi K2.7 Code's role in the lineup
Within Moonshot AI's lineup, Kimi K2.7 Code is a mid-tier option — balanced between cost and capability. The kimi family has 4 active variants, and Kimi K2.7 Code occupies the lower end. This makes it a safe default for production workloads where you're not sure which tier to pick.
Real-world use cases
Real-world deployments: marketing video generation from product descriptions, social media content creation, storyboarding for video production, and visual prototyping for design teams. Kimi K2.7 Code outputs video clips directly — no separate rendering pipeline needed.
vs sibling models
What makes Kimi K2.7 Code different from sibling models: compared to Kimi K3 ($1.90/1M more expensive, 1M vs 256K context (larger)); Kimi K2.6 ($0.00/1M cheaper, 128K vs 256K context (smaller)); Kimi K2.5 ($0.34/1M cheaper, 128K vs 256K context (smaller)). Choose Kimi K2.7 Code when vision input is needed.
API Examples
Python
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.apiyihe.org/v1"
)
response = client.chat.completions.create(
model="kimi-k2.7-code",
messages=[
{"role": "user", "content": "Hello"}
]
)
print(response.choices[0].message.content)JavaScript / Node.js
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.API_KEY,
baseURL: "https://api.apiyihe.org/v1"
});
const response = await client.chat.completions.create({
model: "kimi-k2.7-code",
messages: [
{ role: "user", content: "Hello" }
]
});
console.log(response.choices[0].message.content);cURL
curl https://api.apiyihe.org/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "kimi-k2.7-code",
"messages": [
{"role": "user", "content": "Hello"}
]
}'Supported Features
| Vision / Image Input | ✅ Supported |
| Audio / Voice Input | ❌ Not Available |
| Function Calling | ❌ Not Available |
| JSON Mode | ❌ Not Available |
| Streaming | ✅ Supported |
| Fine-Tuning | ❌ Not Available |
| Multimodal | ❌ Not Available |
Benchmark Scores
| Benchmark | Score |
|---|---|
| MMLU | Not Publicly Available |
| GPQA | Not Publicly Available |
| SWE-Bench | Not Publicly Available |
| HumanEval | Not Publicly Available |
| GSM8K | Not Publicly Available |
| MATH | Not Publicly Available |
| MMMU | Not Publicly Available |
Pricing History
Kimi K2.7 Code was released in 2026-06 by Moonshot AI and is currently publicly available via AI API Hub.
Current Pricing: $0.90 per 1M input tokens · $3.75 per 1M output tokens. Pay-as-you-go with no minimum commitment.
Pricing Model: Token-based billing (pay per use). No subscription fees. No hidden costs.
💡 Moonshot AI occasionally updates pricing. AI API Hub reflects current pricing in real-time. All prices in USD. Pay with USDT or USDC — no currency conversion fees.
Compare Alternatives
Frequently Asked Questions
What is Kimi K2.7 Code?
Kimi K2.7 Code is Moonshot AI's current kimi model. Released June 12, 2026. A 1T-parameter MoE with 32B active per token, tuned for code generation and repository-scale work, with image and video input across a 256K context window. It offers a 256K context window and supports Code Generation, Vision, Video. You can access it through AI API Hub using USDT or USDC — no credit card required.
How much does Kimi K2.7 Code cost?
Kimi K2.7 Code is priced at $0.90 per 1M input tokens and $3.75 per 1M output tokens, billed pay-as-you-go with no minimum. Through AI API Hub you can start with as little as $5 and scale from there.
Kimi K2.7 Code vs GPT-6 Astra?
They're built for different jobs. Kimi K2.7 Code costs $0.90/1M input with a 256K window; GPT-6 Astra runs $10.00/1M input with 1M. Kimi K2.7 Code is the more cost-effective pick and still brings code-specialized kimi. See the full side-by-side at /compare/kimi-k2.7-code-vs-gpt-6-astra/.
Kimi K2.7 Code context window?
Kimi K2.7 Code has a 256K context window, capable of processing up to 262,144 tokens in a single request. Maximum output tokens: 32,768.
Does Kimi K2.7 Code support function calling?
No, Kimi K2.7 Code does not natively support function calling. For function calling use cases, consider Moonshot AI's flagship models.
Is Kimi K2.7 Code multimodal?
Partially — Kimi K2.7 Code supports vision (image input) but not native audio processing.
Kimi K2.7 Code API rate limits?
Kimi K2.7 Code rate limits: 5K RPM. Higher tier plans offer increased throughput. For high-volume production use, consider Moonshot AI's faster variant models.
How to access Kimi K2.7 Code API?
Access Kimi K2.7 Code through AI API Hub: (1) Register at z.apiyihe.org/register?aff=ZVtr, (2) Deposit USDT/USDC, (3) Get your API key instantly, (4) Use the OpenAI-compatible endpoint https://api.apiyihe.org/v1 with model name "kimi-k2.7-code". Start building in under 30 seconds.