The Kimi K3 API gives you Moonshot AI's flagship model — ~2.8 trillion parameters, a 1-million-token context window, and native vision — behind an OpenAI-compatible endpoint. If you already call GPT or any OpenAI-SDK model, switching to K3 is mostly a base-URL and model-name change. This page covers what it costs, how to authenticate, and the two settings that behave differently from the K2.x line.
This is an independent guide. Model IDs, endpoints, pricing, and limits are set by Moonshot and can change — always confirm against the official quickstart at platform.kimi.ai/docs/guide/kimi-k3-quickstart before you build on them.
Kimi K3 API Pricing
K3 is pay-as-you-go, billed per million tokens. Moonshot's stated launch rates:
| Token type | Kimi K3 | Kimi K2.6 (for reference) |
|---|---|---|
| Input (per 1M tokens) | $3.00 | $0.95 |
| Input — cache hit (per 1M) | $0.30 | — |
| Output (per 1M tokens) | $15.00 | $4.00 |
The cache-hit input price ($0.30) is the one to design around: K3 caches context automatically, so if you keep sending the same long system prompt or repo, most of your input tokens can bill at a tenth of the cache-miss rate. For long-context, repeat-context workloads that gap dominates your bill.
Rates are Moonshot's stated launch pricing (per platform.kimi.ai). K3 is a reasoning model that can emit a lot of output tokens, so estimate cost against real output volume, not just prompt size. Verify current rates before you commit budget.
Get a Kimi K3 API Key
- Go to the Moonshot developer platform at platform.kimi.ai and sign in.
- Open the API-keys section and create a new key. Copy it once — you usually can't see it again.
- Store it as an environment variable (never hard-code it in client-side code or commit it to Git).
Keep the key server-side. If a request comes from a browser, proxy it through your own backend so the key is never exposed to users.
Quickstart: OpenAI-Compatible Call
Because the endpoint is OpenAI-compatible, you can use the official openai SDK and just repoint the base URL. Confirm the exact base URL and model ID in the quickstart — the values below reflect Moonshot's published API.
Python
from openai import OpenAI
client = OpenAI(
api_key="YOUR_MOONSHOT_KEY", # from an env var in real code
base_url="https://api.moonshot.ai/v1" # verify in the official quickstart
)
resp = client.chat.completions.create(
model="kimi-k3", # the K3 model ID from the quickstart
messages=[
{"role": "user", "content": "Explain MoE routing in two sentences."}
],
)
print(resp.choices[0].message.content)
curl
curl https://api.moonshot.ai/v1/chat/completions \
-H "Authorization: Bearer $MOONSHOT_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kimi-k3",
"messages": [{"role": "user", "content": "Hello, Kimi K3"}]
}'
If your app already targets an OpenAI-style API, that's the whole migration: change base_url, swap the model name, and point at your Moonshot key.
Reasoning Effort (New in K3)
K3 is an always-on reasoning model, and it controls how hard it thinks with a reasoning_effort parameter — this is different from the thinking control on the K2.x line, so code written for K2 won't carry over unchanged.
- At launch, K3 defaults to max reasoning effort. That's the strongest setting — and the most verbose and expensive, since reasoning tokens count as output.
- Moonshot has said low and high effort modes follow in later updates; check the quickstart for the current accepted values.
- When streaming, reasoning content and the final answer may arrive on separate channels — handle both if you render tokens live.
Practical takeaway: if you're cost-sensitive or latency-sensitive, don't leave everything on max. Match the effort level to the task once lower tiers are available.
Using the 1M-Token Context Window
K3 accepts up to 1,048,576 tokens of context — roughly 700,000 English words. That changes how you architect an app: instead of building a retrieval pipeline to squeeze a codebase into a small window, you can often send the whole repository or document set as context and let the model work over it directly.
Two things to keep in mind:
- Cost. A million input tokens at the cache-miss rate is real money — lean on automatic context caching ($0.30/1M cache-hit) by keeping the stable part of your prompt identical across calls.
- Not everything needs 1M. Huge contexts add latency. Use the big window when the task genuinely spans a large corpus, not by default.
Rate Limits & Tiers
Moonshot applies per-account rate limits (requests and tokens per minute) that scale with your usage tier, as most LLM APIs do. The exact numbers depend on your account level and change over time, so we're not quoting figures we can't guarantee — check your limits on the platform dashboard.
- Read your current limits in the platform console rather than assuming a number.
- Handle
429responses with exponential backoff and retries. - If you need higher throughput, request a tier upgrade through the platform.
Kimi K3 API FAQ
What is the Kimi K3 model ID?
Use the K3 identifier shown in the official quickstart (published as kimi-k3). Model names occasionally get versioned suffixes, so confirm the exact string in the docs before shipping.
Is the Kimi K3 API OpenAI-compatible?
Yes. Point any OpenAI-SDK client at Moonshot's base URL, set the model to K3, and use your Moonshot key — existing chat-completions code works with minimal changes.
How much does the Kimi K3 API cost?
Moonshot's stated launch rates are $3.00 per 1M input tokens ($0.30 on a cache hit) and $15.00 per 1M output tokens. Because K3 reasons at max effort by default, output volume drives most of the bill.
Does the API support the full 1M-token context?
Yes — up to 1,048,576 tokens. Watch cost and latency; use automatic context caching to keep repeat-context calls cheap.
How do I lower my K3 API bill?
Keep the stable part of your prompt identical to hit the cache price, cap output length, and drop reasoning effort below max once lower tiers ship.
New to Kimi K3?
Read the full overview — specs, benchmarks, how it compares to Claude and GPT, and how to run it locally.
← Back to the Kimi K3 guide