writing/blog/2026/07
BlogJul 17, 2026·6 min read

Kimi K3 Developer Guide: API, Pricing, and Architecture

Hands-on developer guide to Moonshot Kimi K3: OpenAI-compatible API, caching that cuts costs up to 90%, 1M-token context, benchmarks, and self-hosting notes.

Open-weight AI just crossed a threshold. On July 16, 2026, Beijing-based Moonshot AI released Kimi K3, a 2.8-trillion-parameter mixture-of-experts model with native vision, video input, and a 1-million-token context window — the largest open-weight model ever announced, and the first to land within striking distance of Claude Fable 5 and GPT-5.6 Sol on real-world benchmarks.

For developers, K3 is more than a headline. It ships with an OpenAI SDK-compatible API, aggressive cache-aware pricing, and a promise of freely downloadable weights by July 27. This guide covers what K3 actually is, how to call it today, what it costs in practice, and when it makes sense over proprietary alternatives.

What Is Kimi K3?

Kimi K3 is a sparse mixture-of-experts (MoE) reasoning model that activates 16 of 896 experts per token. Moonshot calls it "the world's first open 3T-class model" — roughly 75 percent larger than DeepSeek's V4 Pro, the previous open-weight size record holder.

The headline specs:

  • 2.8 trillion total parameters in a sparse MoE design
  • 1-million-token context window — a 4x jump over K2.6's 256K
  • Native multimodality — vision and video understanding built in, not bolted on
  • Always-on reasoning — a "thinking mode" tuned for long-horizon agentic work
  • Two variants — K3 Max for chat and agent tasks, K3 Swarm Max for large-scale parallel processing

The model is live on Kimi.com, the Kimi Work desktop app, the Kimi Code terminal tool, and the Kimi API platform, with OpenRouter access also available.

The Architecture: Why K3 Scales Differently

K3 builds on two research contributions Moonshot published earlier this year, and both matter for practical workloads.

Kimi Delta Attention (KDA) is a hybrid linear attention mechanism that Moonshot says delivers up to 6.3x faster decoding in million-token contexts. Full quadratic attention becomes brutally expensive at 1M tokens; KDA is the reason a context window that size is usable rather than theoretical.

Attention Residuals (AttnRes) retrieves representations across model depth, adding roughly 25 percent training efficiency at under 2 percent extra cost. Combined with a stack of sparsity techniques — Stable LatentMoE, Quantile Balancing, and Per-Head Muon — Moonshot claims an approximate 2.5x improvement in overall scaling efficiency versus the K2 generation.

The practical upshot: K3 handles large repositories, long logs, and multi-step tool loops without the context compression tricks most agents rely on. On BrowseComp, it posts a state-of-the-art 91.2 running as a single agent with no context compression — a signal that the 1M window is genuinely load-bearing.

Benchmarks: Third Place Overall, First Among Open Models

On GDPval-AA v2 — a benchmark measuring real-world tasks across 44 occupations and 9 industries — K3 scored 1,687. That places it third overall, behind Claude Fable 5 Max (1,815) and GPT-5.6 Sol Max (1,747.8), but ahead of Claude Opus 4.8 (1,600).

With maximum reasoning effort, K3 also posts:

  • 93.5 on GPQA-Diamond (graduate-level science reasoning)
  • 91.2 on BrowseComp (agentic web research, single-agent)
  • 42.0 on SWE Marathon (long-horizon software engineering)
  • 1,527 on AA-Briefcase — second overall, ahead of GPT-5.6 Sol Max

Moonshot itself was measured in its announcement, noting K3 "still trails the most powerful proprietary models, Claude Fable 5 and GPT 5.6 Sol." That honesty is warranted — but the gap between open weights and the frontier has collapsed from a year to a few months.

Getting Started: The API Is OpenAI-Compatible

If you already build against the OpenAI or Anthropic SDKs, integration is minimal. Point the OpenAI client at Moonshot's base URL:

from openai import OpenAI
 
client = OpenAI(
    api_key="YOUR_MOONSHOT_API_KEY",
    base_url="https://api.moonshot.ai/v1",
)
 
response = client.chat.completions.create(
    model="kimi-k3",
    messages=[
        {"role": "system", "content": "You are a senior code reviewer."},
        {"role": "user", "content": "Review this diff for concurrency bugs:\n" + diff_text},
    ],
    temperature=0.3,
)
 
print(response.choices[0].message.content)

The same pattern works in TypeScript:

import OpenAI from "openai";
 
const client = new OpenAI({
  apiKey: process.env.MOONSHOT_API_KEY,
  baseURL: "https://api.moonshot.ai/v1",
});
 
const response = await client.chat.completions.create({
  model: "kimi-k3",
  messages: [{ role: "user", content: "Summarize this 400-page RFP..." }],
});

One current limitation worth knowing: on OpenRouter, K3 currently exposes only the max reasoning effort level, with lower tiers promised later. Budget latency accordingly — early testers report complex agentic coding tasks running 30-plus minutes. K3 is a depth model, not a speed model.

Pricing: Caching Is the Whole Game

K3's list pricing is $3 per million input tokens and $15 per million output — mid-tier territory. The real story is the cache tier:

  • Cached input: $0.30 per million tokens — a 90 percent discount
  • Uncached input: $3.00 per million tokens
  • Output: $15.00 per million tokens

Moonshot reports cache-hit rates above 90 percent in coding workloads, where agents repeatedly resend the same repository context. In practice, that means an agentic coding session can run 60-80 percent cheaper than list price. For comparison, Claude Opus 4.8 costs roughly 1.7x more on input and about 2x more on output.

To exploit this, structure prompts the same way you would for Anthropic's prompt caching: stable content first (system prompt, repository map, documentation), volatile content last (the current task, latest tool results). Every token you keep byte-identical across calls is a token billed at ten cents on the dollar.

Agentic Coding: Where K3 Wants to Live

Moonshot is aiming K3 squarely at the agentic coding market. The model is described as strongest at navigating large repositories, using tools, debugging, and iterating against images, logs, tests, and runtime feedback — and the product lineup reflects that: Kimi Code is a terminal coding agent in the Claude Code mold, while K3 Swarm Max targets parallel multi-agent processing, continuing the swarm direction Moonshot began with Kimi K2.6.

The 1M context changes agent architecture decisions. Patterns that exist mainly to work around small contexts — aggressive summarization, sliding windows, sub-agent fan-out purely for context relief — become optional. A single K3 agent can hold an entire mid-sized codebase, its test output, and a long tool-use history simultaneously.

Self-Hosting: Realistic, but Not for Everyone

The full weights ship by July 27 under a free open-weight distribution. They come in MXFP4 quantization with MXFP8 activations, and Moonshot recommends a supernode of 64 or more accelerators for full deployment.

That puts self-hosted K3 beyond hobbyists and most startups — but within reach of regional cloud providers, research institutions, and sovereign AI programs. For Tunisia and the wider MENA region, that is the strategically interesting part: frontier-class capability without dependence on US API providers, on infrastructure you control. Expect third-party inference providers to pick up K3 hosting once the weights land, which historically drives per-token prices well below first-party rates — the same dynamic covered in our self-hosted LLM guide.

When to Choose K3 Over Claude or GPT

Choose K3 when:

  • Cost dominates and your workload is cache-friendly (agentic coding, document pipelines)
  • You need a genuine 1M-token context on an open model
  • Open weights matter — compliance, data sovereignty, or future self-hosting
  • You are building for markets where US API dependence is a business risk

Stay with Claude Fable 5 or GPT-5.6 when:

  • You need maximum capability — both still outscore K3 on real-world work
  • Latency matters; K3's max-effort reasoning is slow on hard tasks
  • You depend on mature ecosystem tooling around a specific provider
  • Weights-not-yet-released risk is unacceptable — until July 27, benchmark claims remain unverified by independent researchers

A pragmatic middle path is multi-model routing: send high-volume, cache-heavy work to K3 and escalate the hardest reasoning to a frontier model — the architecture we describe in our LLM gateway guide.

Conclusion

Kimi K3 is the strongest open-weight release to date, and the first that forces a genuine build-versus-buy conversation at the frontier tier. The architecture is credible, the API is drop-in, and the cache pricing is disruptive. The caveats are real too: it is slow at full reasoning effort, the weights are not out until July 27, and the very top of the leaderboard still belongs to proprietary models.

For developers, the move this week is cheap: point an OpenAI client at the Kimi API, run your evaluation set, and measure the cache-hit economics on your own workload. If the numbers hold, the open-model era just became a lot harder to ignore.

For the launch-day details, read our news coverage of the K3 release.