Skip to navigation

Kimi K3

Beta
View as Markdown

Kimi K3 is a general-purpose open-weight model served on Sarvam infrastructure. It accepts text, images, and video and has a 1,048,576-token context window.

Kimi K3 is in beta. Its behaviour, limits, and availability may change before general availability. Beta models must be enabled for your API key; without access, requests return 400 invalid_request_error (“This model is currently in beta”). Contact us to request access. See Beta models.

At a glance

Model IDkimi-k3
Best forAgentic workflows and reasoning over images and video
Context window1,048,576 tokens
Input → outputText + image + video (beta, short clips only) → text
ReasoningAlways on: low, high, or max (default). See Reasoning
Tool callingSupported, including parallel tool calls
APIsPOST /v2/chat/completions and POST /v2/responses
Pricing₹270 input · ₹27 cached input · ₹1,350 output per 1M tokens; reasoning is billed as output (Pricing)

Key capabilities

Long context

Process up to 1,048,576 tokens across the prompt, reasoning, and generated output.

Image and video input

Send base64 images and short base64 video clips alongside text.

Reasoning

Receive reasoning in reasoning_content separately from the final answer in content.

Tool calling

Use OpenAI-compatible tools and tool_choice for agentic workflows.

Structured output

Constrain answers with response_format JSON schemas.

Log probabilities

Request logprobs and top_logprobs, and n > 1 choices.

Moving from OpenRouter, Fireworks AI, or Together AI? The migration guides map model IDs and request fields to Sarvam.

Quickstart

from sarvamai import SarvamAI
client = SarvamAI(api_subscription_key="YOUR_SARVAM_API_KEY")
response = client.chat.completions_v2(
model="kimi-k3",
messages=[
{
"role": "user",
"content": "Plan a three-step approach to migrate a monolith to microservices.",
}
],
max_tokens=4000,
)
print(response.choices[0].message.content)

Supported parameters

model: "kimi-k3" on Chat Completion V2 and Responses. Full request/response schemas live on those API reference pages; this table covers what’s actually accepted for this model.

ParameterChat Completion V2Responses
Streaming (stream)
Image input (base64) image_url input_image
Video input (base64, beta) video_url, short clips only 400
Audio input 400 400
Tool calling (tools, tool_choice)
parallel_tool_calls: false enforced
Structured output (response_format / text.format)
Log probabilities (logprobs, top_logprobs) send top_logprobs with include: ["message.output_text.logprobs"]; logprobs: true returns 400
Multiple choices (n > 1) requires temperature > 0N/A — Responses has no n
Reasoning controlreasoning_effort: low, high, or max (default)reasoning.effort: same values
Turn reasoning off always thinks always thinks

On POST /v2/responses, logprobs is only populated when the request includes "include": ["message.output_text.logprobs"]. Without it, output[].content[].logprobs is always an empty array even if top_logprobs is set. Verified against the live API on 2026-10-22.

Reasoning

Thinking is always on and can’t be turned off. Effort levels: low, high, max (default max). Set them with reasoning_effort on chat or reasoning.effort on Responses.

Read the reasoning trace from choices[].message.reasoning_content on chat. On Responses, output starts with a reasoning item; read its content[0].text (summary is empty). Reasoning tokens are billed as output tokens and count against max_tokens / max_output_tokens.

On Responses, when the model calls tools, output has one reasoning item followed by the function_call items for that turn (sometimes with a message item between them).

Image input

Send images inline as base64 data URIs in an image_url content part on chat, or an input_image part on Responses. Supported formats are PNG, JPEG, WebP, GIF, BMP, and TIFF. Images sent by file_id are not supported.

import base64
with open("chart.png", "rb") as f:
data_uri = "data:image/png;base64," + base64.b64encode(f.read()).decode()
response = client.chat.completions_v2(
model="kimi-k3",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "Summarise this chart."},
{"type": "image_url", "image_url": {"url": data_uri}},
],
}
],
max_tokens=2000,
)

Images are resized to about 12.8 megapixels. Images above about 179 megapixels are rejected.

Video input (beta)

Send a video inline as a base64 data URI in a video_url content part on Chat Completion V2. Remote video URLs return 400, and the Responses API doesn’t accept video.

Kimi K3 understands only very short clips, about four frames. Longer clips can come back as blank or repeated frames, and the answer describes only part of the video. For longer videos, use MiMo V2.6 Flash or MiMo V2.6 Pro.

import base64
with open("clip.mp4", "rb") as f:
video_uri = "data:video/mp4;base64," + base64.b64encode(f.read()).decode()
response = client.chat.completions_v2(
model="kimi-k3",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "Describe what happens in this clip."},
{"type": "video_url", "video_url": {"url": video_uri}},
],
}
],
max_tokens=2000,
)

Audio input is not supported and returns 400.

Tool calling

Pass OpenAI-compatible tools. tool_choice accepts "auto", "none", "required", or a named function ({"type": "function", "function": {"name": "..."}}). The model can return several tool calls in one turn; set parallel_tool_calls: false to get at most one.

Multiple choices

n > 1 needs temperature greater than 0. Sending n > 1 with temperature: 0 returns 400.

Known limitations

  • Video input is beta and reliable only for very short clips (see Video input).
  • Reasoning and the final answer share the max_tokens / max_output_tokens budget.
  • A stop string can match inside the thinking, which ends the response early with content: null. Use stop strings that won’t appear in reasoning.
  • Set max_tokens explicitly. When it’s omitted, generation isn’t capped at a small default and long answers can run to tens of thousands of tokens.

Limits and errors

AreaLimit or conditionAPI responseRecommended action
Outputmax_tokens exceeds 1,048,576400 invalid_request_errorSet max_tokens within the context window.
Request sizeRequest body exceeds 40 MiB (41,943,040 bytes)413 invalid_request_error, with the limit in the messageSend smaller or fewer media files. Base64 adds about 33%, so about 30 MB of raw media fits.
Media URLAn image, audio, or video part uses an http(s) URL400 invalid_request_errorSend the file inline as a base64 data URI.
Media countMore than 999 images or 999 videos in one request400 invalid_request_errorSplit the request.
Image sizeImage above about 179 megapixels400 invalid_request_errorDownscale the image.
ModalityRequest includes audio input400 invalid_request_errorSend text, image, or video input.
Choicesn > 1 with temperature: 0400 invalid_request_errorSet temperature above 0.
ReasoningReasoning consumes the full max_tokens budget200 with finish_reason: "length"Raise max_tokens or lower the reasoning effort.
AuthenticationAPI key is missing or invalid403 invalid_api_key_errorCheck the api-subscription-key header.
ModelModel ID is unknown or unavailable404 not_found_errorCheck the spelling; model IDs are case-sensitive.
QuotaNo credits remain402 insufficient_quota_errorAdd credits in the dashboard.
Rate limitRequest or concurrency limit is exceeded429 rate_limit_exceeded_errorBack off and retry.
AvailabilityModel remains overloaded after retries503 model_overloadedRetry later.