Introducing Kimi K3
Kimi K3 is Kimi’s most capable model to date, with 2.8 trillion parameters. Built on Kimi Delta Attention, a hybrid linear attention mechanism, and Attention Residuals, it offers native visual understanding and a 1M-token context window for frontier intelligence scenarios such as software engineering, knowledge work, and deep reasoning.Get started
The examples require Python 3.9+ and the OpenAI SDK. Install the SDK and initialize the client once; later Python examples reuseclient.
Basic call
- Python
- cURL
Thinking effort
K3 always has thinking mode enabled and supports configuring its thinking effort with the top-levelreasoning_effort field. Do not use the K2.x thinking parameter.
Thinking effort currently supports only the
max level (default); more levels are coming soon. See Thinking Effort for usage.For multi-turn conversations and tool calls, add the complete assistant message returned by the API to the next request. Do not keep only
content.Streaming
Streaming responses provide separatereasoning_content and final-answer content deltas. See Streaming Output for details.
Vision input
For vision messages,content must be an array of objects, not a serialized string. See Vision Input for formats and limits.
- Local image
- Video file
Structured output
Usejson_schema with strict: true to constrain the final message.content. Parse only that field, not reasoning_content.
Name and age schema
Name and age schema
Partial Mode
Add an assistant message withpartial=True at the end of messages to continue from a text prefix. Prepend that prefix when displaying the final result.
Custom tools and tool_choice
Use tool_choice="required" on the first turn to require at least one tool call. After executing every call, return the complete assistant message and append one tool result with the matching tool_call_id for each call.
Minimal weather agent loop
Minimal weather agent loop
Dynamic tool loading
Place a complete tool definition in asystem message without content. The tool becomes available from that message onward.
Load a calculator dynamically
Load a calculator dynamically
- Include the complete
name,description, andparametersdefinition. - The declaration takes effect at its position in
messages. - Keep this message in later request history; the server does not retain it.
1M context and automatic caching
Context caching is automatic for regular model requests; no cache ID, TTL, or extra parameter is required. Keep the long prefix unchanged so later requests can automatically attempt a cache hit.Official tools
Official tools are integrated through Formula:- Fetch tool definitions from the Formula
/toolsendpoint. - Add those definitions to the Chat Completions
toolsfield. - When the model returns
tool_calls, submit each function name and arguments to the Formula/fibersendpoint. - Add the complete assistant message and Fiber output as the corresponding tool message.
- Call Chat Completions again until the model returns a final answer.
Important limits
reasoning_effortcurrently supports onlymax; K3 always has thinking mode enabled.max_completion_tokensdefaults to 131072 and can be set up to 1048576.temperature=1.0,top_p=0.95,n=1,presence_penalty=0, andfrequency_penalty=0are fixed; omit them from requests.- Return the complete assistant message unchanged in multi-turn conversations and tool calls.
- Vision input does not support public image URLs. Use base64 or
ms://<file-id>, and makecontentan array of objects. - Web search is being updated and is not recommended for production workflows in the near term.
FAQ
How is Kimi K3 billed?
How is Kimi K3 billed?
Kimi K3 offers a 1M-token context and uses flat pay-as-you-go pricing — there is no tiering by context length. Input (with separate rates for cache hits and misses) and output are billed at uniform per-token prices. See Kimi K3 pricing.
Model Pricing
For token pricing details, refer to Model Pricing.Related docs
Thinking Effort
Configure reasoning_effort.
Vision Input
Send images and videos.
Structured Output
Use strict JSON Schema.
Partial Mode
Continue from a prefix.
Tool Choice
Control whether the model calls tools.
Dynamic Tool Loading
Inject tool definitions on demand.
Tool Calling Best Practices
Combine tool-calling features.
Official Tools
Integrate Formula tools.
Kimi K3 Pricing
Review input and output prices.