Skip to main content

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 reuse client.

Basic call

Thinking effort

K3 always has thinking mode enabled and supports configuring its thinking effort with the top-level reasoning_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 separate reasoning_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.

Structured output

Use json_schema with strict: true to constrain the final message.content. Parse only that field, not reasoning_content.
See Structured Output.

Partial Mode

Add an assistant message with partial=True at the end of messages to continue from a text prefix. Prepend that prefix when displaying the final result.
See Partial Mode.

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.
See Tool Choice.

Dynamic tool loading

Place a complete tool definition in a system message without content. The tool becomes available from that message onward.
  • Include the complete name, description, and parameters definition.
  • The declaration takes effect at its position in messages.
  • Keep this message in later request history; the server does not retain it.
See Dynamic Tool Loading.

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.
See Context Caching.

Official tools

Official tools are integrated through Formula:
  1. Fetch tool definitions from the Formula /tools endpoint.
  2. Add those definitions to the Chat Completions tools field.
  3. When the model returns tool_calls, submit each function name and arguments to the Formula /fibers endpoint.
  4. Add the complete assistant message and Fiber output as the corresponding tool message.
  5. Call Chat Completions again until the model returns a final answer.
See Official Tools for the complete client and API contract. Web search is being updated and is not recommended for use in the near term.

Important limits

  • reasoning_effort currently supports only max; K3 always has thinking mode enabled.
  • max_completion_tokens defaults to 131072 and can be set up to 1048576.
  • temperature=1.0, top_p=0.95, n=1, presence_penalty=0, and frequency_penalty=0 are 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 make content an array of objects.
  • Web search is being updated and is not recommended for production workflows in the near term.

FAQ

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.

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.