Kimi K3 API Guide: Pricing, Context and Code
Kimi K3 is available through Kimi's API as `kimi-k3`. The interface is compatible with familiar OpenAI-style clients, but long contexts and max reasoning change how you should budget and structure a production request.
Quick start
Use the official Kimi endpoint and keep the API key in an environment variable. The launch documentation identifies `kimi-k3` as the general API model name; Kimi Code uses the shorter `k3` identifier in its own clients.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["MOONSHOT_API_KEY"],
base_url="https://api.moonshot.cn/v1",
)
response = client.chat.completions.create(
model="kimi-k3",
messages=[{"role": "user", "content": "Review this repository"}],
reasoning_effort="max",
)Launch pricing
Kimi's launch post lists prices per one million tokens. Cached input is much cheaper than uncached input, so stable prompts and reusable context can materially reduce cost. Treat these as launch figures and confirm the live platform price before making a budget commitment.
| Token type | Launch price / 1M |
|---|---|
| Cached input | $0.30 |
| Uncached input | $3.00 |
| Output | $15.00 |
Context and reasoning choices
K3 supports a context window of up to one million tokens, but a larger window is not a reason to send everything. Retrieve the most relevant files, preserve the model's thinking history when the client supports it, and start a fresh session when changing models or reasoning effort.
- Use max effort for difficult coding, research and multi-step agent work.
- Keep system instructions explicit because K3 can be overly proactive.
- Measure cache hit rate, input tokens, output tokens and task success together.
Frequently asked questions
What is the Kimi K3 API model ID?
Use `kimi-k3` on the Kimi API. Kimi Code uses `k3` in its own model selector.
Is the full 1M context always available?
The model supports up to 1M tokens, but product and membership limits can differ. Confirm the entitlement of the client or plan you use.
Primary sources
This guide prioritizes official Kimi and Moonshot AI materials. Product access and pricing can change, so confirm live details at the linked sources.