Skip to main content

Kimi K3 API: Pricing and Context

Hanks
HanksEngineer
Share

Kimi K3 API Guide (2026): Pricing, Context, and Examples

The Kimi K3 API went live on July 16, 2026, at https://api.moonshot.ai/v1 with the model ID kimi-k3. Moonshot says the full weights will be released by July 27 under a Modified MIT license; until those files actually appear, K3 is not downloadable or locally deployable. What developers can use today is a 2.8-trillion-parameter MoE model with native vision, a 1,048,576-token context window, always-on max reasoning, and API pricing of $3 input, $15 output, and $0.30 for cache-hit input per million tokens.

This is a launch-week decision guide: the call pattern, the bill, and the limits that can change an engineering decision.

What Is Kimi K3?

Kimi K3 is Moonshot AI's flagship for long-horizon coding, knowledge work, and multimodal reasoning.

What Is Kimi K3?
SpecificationKimi K3
Architecture2.8T-parameter Mixture of Experts; 16 of 896 experts active
AttentionKimi Delta Attention plus Attention Residuals
Context window1,048,576 tokens, including input and output
InputText and native vision; images via base64 or uploaded file ID
ReasoningAlways on; only reasoning_effort="max" is available at launch
API pricing$3.00 cache-miss input / $0.30 cache-hit input / $15.00 output per 1M tokens
Current accessKimi API and hosted Kimi products
Open weightsPromised by July 27, 2026; not released as of July 17

MoE does not mean all 2.8 trillion parameters run for every token. K3 activates 16 experts; the headline count describes total capacity, not dense inference on the entire model.

API live since July 16; full weights due by July 27 under Modified MIT — no local deployment yet

The hosted API is live; the open weights are still a promise. Moonshot says it plans to release the full weights and technical report by July 27 in its K3 launch announcement. Recheck the repository, license, and serving instructions before planning self-hosting.

How to Call the Kimi K3 API

How to Call the Kimi K3 API

OpenAI SDK setup, Python and cURL examples

The Moonshot AI API uses an OpenAI-compatible Chat Completions interface. Install openai>=1.0, export MOONSHOT_API_KEY, and use Moonshot's base URL. Both examples set a small output cap because K3's default is unusually large.

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["MOONSHOT_API_KEY"],
    base_url="https://api.moonshot.ai/v1",
)

response = client.chat.completions.create(
    model="kimi-k3",
    messages=[{"role": "user", "content": "Review this API design."}],
    max_completion_tokens=1024,
)
print(response.choices[0].message.content)
curl https://api.moonshot.ai/v1/chat/completions \
  -H "Authorization: Bearer $MOONSHOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kimi-k3",
    "messages": [{"role": "user", "content": "Review this API design."}],
    "max_completion_tokens": 1024
  }'

For streaming, structured output, vision, and tool calling, Moonshot provides additional K3 request examples.

API behavior to know: max-only reasoning, no sampling parameters, 131K default output cap, base64-only vision

K3 is not parameter-compatible with every OpenAI client preset.

  • Reasoning is always enabled; reasoning_effort accepts only max. Do not send the K2.x thinking object.
  • Omit temperature, top_p, and seed; sampling is fixed.
  • max_completion_tokens defaults to 131,072. Set an explicit, smaller limit unless the task genuinely needs a long answer.
  • Public image URLs are not supported. Send base64 image data or upload the file and reference its ms:// file ID.
  • Moonshot's web-search tool is being updated and is not recommended for production use yet.
  • Preserve the complete assistant message, including reasoning history, across multi-turn and tool-calling sessions. Keeping only content can make later turns unstable.

Migration notes from K2.5 / K2.7 Code and the August 31 deprecations

As of July 17, new users cannot access kimi-k2.5 or moonshot-v1, and Moonshot marks both models for full retirement on August 31. Recheck the notice before cutover, then regression-test prompts, tool loops, output parsing, and spending limits.

K2.7 Code is not in that notice. At $0.95 input and $4 output per million tokens, it remains the rational default for routine coding. I would move to K3 only when 1M context, a longer agent horizon, or vision feedback justifies the difference.

Kimi K3 API Pricing and Real Cost

Kimi K3 API Pricing and Real Cost

$3 input / $15 output / $0.30 cache hit — flat across the 1M window

K3 uses flat pricing across the full context window: $3.00 per million cache-miss input tokens, $0.30 per million cache-hit tokens, and $15.00 per million output tokens. There is no long-context surcharge; taxes are separate.

Watch the output rate. A request can fit the window and still be uneconomic if the agent produces long reasoning traces on every turn.

One caching example: an 800K-token document across 10 calls

Assume an agent sends the same 800,000-token prefix ten times. Without caching, input costs 10 × 0.8 × $3 = $24.00. With caching, the first call costs $2.40 and nine hits cost 9 × 0.8 × $0.30 = $2.16, totaling $4.56.

That saves $19.44, or 81%. Each hit is 90% cheaper, but the prefix must stay stable. Moonshot matches reusable prefixes automatically, so there is no cache ID or extra parameter to configure.

The hidden cost is output. Artificial Analysis measured about 130 million output tokens across its index run versus a 63 million model average, just over 2×, at roughly 62 tokens per second. Max reasoning plus $15 output can erase cache savings, so cap completions and track cost per completed task.

Kimi K3 Benchmarks and Limitations

Kimi K3 Benchmarks and Limitations

Official vs third-party results

Moonshot reports strong results, but its launch evaluations use different harnesses across models. I treat them as test candidates, not a universal ranking.

Two independent snapshots help. Artificial Analysis scored K3 at 57.1, fourth among 189 models. Arena.ai placed it first in Frontend Code Arena at 1,679 points, ahead of Claude Fable 5 at 1,631 and GPT-5.6 Sol at 1,618. That is a frontend signal, not proof that K3 wins every workload.

Current limits: days-old model, hallucination uptick, no technical report yet

  • K3 has only been public for days, so there is little production history for rate limits, long-session stability, and failure recovery.
  • Artificial Analysis measured a 50.9% hallucination rate on its AA-Omniscience test versus 39.3% for K2.6. The composite score improved, but factual reliability still needs workload-specific evaluation.
  • Moonshot has not published the K3 technical report yet. Training details, reproducible evaluation notes, weight files, and practical self-hosting guidance remain incomplete.

Quick verdict: when to pick K3 vs K2.7 Code vs closed frontier models

Pick K3 for long-running agents, repositories that genuinely exceed K2.7 Code's 262,144-token window, or coding tasks that need screenshot and visual feedback. Keep K2.7 Code for ordinary implementation, debugging, and tool loops where its much lower input and output prices matter more than a 1M window. For high-stakes production work, a mature closed frontier model may still be the safer choice until K3 has a longer reliability record and its technical report is available.

If you are evaluating K3 inside a coding-agent workflow, I would use a plan-first loop with review at every stage, just as I would for any expensive agent model. At Verdent, we recommend starting with one scoped repository task and a human-owned diff; this step-by-step coding-agent workflow shows where to keep human control.

when to pick K3 vs K2.7 Code vs closed frontier models

FAQ

Is Kimi K3 ready for production workloads right now?

Yes, but I would start with a small traffic slice rather than a full migration. The API is live, yet K3 has only days of public operating history, uses max reasoning on every call, and still lacks a technical report. Put hard output caps, cost alerts, retries, and human review around the first workload. Production-ready access is not the same as production-proven behavior.

How much does context caching save on long-running agent tasks?

A successful cache hit cuts repeated K3 input from $3.00 to $0.30 per million tokens, a 90% saving on that cached prefix. End-to-end input savings are lower because the first request is a miss and changing prefixes may not hit. Ten calls with a stable 800K-token prefix save 81%; less stable agent histories may land well below that, so inspect actual cache-hit usage.

Should I migrate from Kimi K2.7 Code to K3 today?

Not for routine coding. K2.7 Code costs $0.95 input and $4 output per million tokens, versus K3's $3 and $15, and it is not included in the August 31 sunset notice. Test K3 when a task needs more than 256K context, longer autonomous execution, or visual feedback. Otherwise, keep the cheaper model and compare completed-task quality before changing the default.

Does Kimi K3 work with existing coding agents and tools?

Usually, yes. K3 exposes an OpenAI-compatible Chat Completions API and is positioned for coding-agent and tool-calling workflows. Compatibility still needs one important adjustment: your agent must retain the complete assistant message, including reasoning content, across tool calls and later turns. Remove unsupported sampling controls and budget carefully for max-only reasoning, because an otherwise compatible long-running loop can become unexpectedly expensive.

Can I run Kimi K3 locally once the weights are released?

In principle, but not on normal consumer hardware. At 2.8 trillion parameters, even an aggressive roughly 2-bit representation is about 700 GB before runtime overhead, KV cache, and serving buffers; a practical 650 GB–1 TB estimate already assumes extreme quantization and careful engineering. Wait for the actual weight format, license, and serving recipes on or before July 27 before treating any local deployment plan as real.

Hanks
Written byHanksEngineer

As an engineer and AI workflow researcher, I have over a decade of experience in automation, AI tools, and SaaS systems. I specialize in testing, benchmarking, and analyzing AI tools, transforming hands-on experimentation into actionable insights. My work bridges cutting-edge AI research and real-world applications, helping developers integrate intelligent workflows effectively.

Related Guides