Claude Opus 5.5 is live on SeedRouter

Text

Kimi K3.1 Pro

View Markdown

Native Kimi K3.1 Pro Chat Completions, Responses and Messages. Official parameters, reasoning history, structured output, media and cache accounting.

Use the public model ID kimi-k3.1-pro. The model page provides the Playground and live prices. Download the OpenAPI specification for complete nested request and response schemas.

Quick start

curl https://api.seedrouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $SEEDROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model":"kimi-k3.1-pro",
    "messages":[{"role":"user","content":"How can an idempotency key prevent a duplicate payment?"}],
    "max_completion_tokens":2048,
    "reasoning_effort":"low"
  }'

Native formats

FormatEndpointRequired fields
Chat CompletionsPOST /v1/chat/completionsmodel, messages
ResponsesPOST /v1/responsesmodel, input
MessagesPOST /v1/messagesmodel, messages, max_tokens

Use Authorization: Bearer $SEEDROUTER_API_KEY. Messages also uses anthropic-version: 2023-06-01. Each format returns native JSON or SSE events. Responses is stateless: replay complete history; previous_response_id is not a supported request field.

Request parameters

Blank Playground fields are omitted. Explicit false and zero are preserved where valid. Omitted does not mean nullable. Unknown top-level extensions are discarded; invalid official fields are rejected. Nested tool schemas and returned history remain intact.

Chat Completions

FieldTypeRequiredDefault / range
logprobsbooleanNodefault false
top_logprobsintegerNo0–20; requires logprobs=true
predictionobjectNoOmitted unless supplied
max_tokensintegerNo1–1048576
max_completion_tokensintegerNo1–1048576; default 131072
response_formatobjectNoOmitted unless supplied
stopunionNo≤5 strings; ≤32 UTF-8 bytes each
streambooleanNodefault false
stream_optionsobjectNoOmitted unless supplied
toolsarrayNoOmitted unless supplied
prompt_cache_keystringNoOmitted unless supplied
prompt_cache_optionsobjectNoOmitted unless supplied
safety_identifierstringNoOmitted unless supplied
tool_choiceunionNoOmitted unless supplied
messagesarrayYesOmitted unless supplied
reasoning_effortstringNolow, high, max; default "max"
modelstringYeskimi-k3.1-pro; default "kimi-k3.1-pro"
temperaturenumberNo1
top_pnumberNo0.95
nintegerNo1
frequency_penaltynumberNo0
presence_penaltynumberNo0

Responses

FieldTypeRequiredDefault / range
modelstringYeskimi-k3.1-pro; default "kimi-k3.1-pro"
inputunionYesOmitted unless supplied
instructionsstringNoOmitted unless supplied
streambooleanNodefault false
max_output_tokensintegerNo1–1048576; default 131072
reasoningobjectNoOmitted unless supplied
textobjectNoOmitted unless supplied
toolsarrayNoOmitted unless supplied
tool_choiceobjectNoOmitted unless supplied
includearrayNoOmitted unless supplied
prompt_cache_keystringNoOmitted unless supplied
prompt_cache_optionsobjectNoOmitted unless supplied
safety_identifierstringNoOmitted unless supplied

Messages

FieldTypeRequiredDefault / range
modelstringYeskimi-k3.1-pro; default "kimi-k3.1-pro"
messagesarrayYesOmitted unless supplied
max_tokensintegerYes1–1048576
systemunionNoOmitted unless supplied
streambooleanNodefault false
stop_sequencesarrayNo≤5 strings; ≤32 UTF-8 bytes each
toolsarrayNoOmitted unless supplied
tool_choiceobjectNoOmitted unless supplied
metadataobjectNoOmitted unless supplied
cache_controlobjectNoOmitted unless supplied
output_configobjectNoOmitted unless supplied

Chat has 22 top-level fields: model, five fixed sampling fields and 16 variable inputs. Responses has model plus 12 inputs; Messages has model plus 10 inputs. The Playground hides fixed model and fixed sampling controls.

Reasoning and output limits

Thinking is always enabled. Chat reasoning_effort, Responses reasoning.effort and Messages output_config.effort accept low, high or max; default max. All output limits include reasoning. Chat and Responses default to 131,072 output tokens, with a maximum of 1,048,576. Messages requires a positive max_tokens. Chat accepts deprecated max_tokens; prefer max_completion_tokens for new integrations.

The context window is 1,048,576 tokens. Input itself must fit inside it. When input plus the generation budget exceeds the window, the service can reduce the budget to the remaining space. A small output cap may stop before any visible answer appears.

Chat sampling is fixed: temperature:1, top_p:0.95, n:1, frequency_penalty:0, presence_penalty:0. Other values are invalid. Stop sequences match exact text and are excluded from the answer. Their 32-byte limit counts UTF-8 bytes, not characters.

Structured output and predictions

Chat accepts response_format.type of text, json_object or json_schema. JSON mode also needs a prompt asking for JSON. JSON Schema requires json_schema.name and json_schema.schema; strict defaults to true.

Responses uses text.format with type:json_schema, schema, optional name and strict. Messages uses output_config.format with type:json_schema and schema. Follow Moonshot Flavored JSON Schema; do not assume every general JSON Schema extension is enforced. Validate completed output in your application.

Chat predicted output uses prediction:{type:"content",content:...}. Content is a string or text-only parts. Use it for mostly known output, such as a file receiving a small edit.

Tools and preserved conversation history

Chat tools use type:function with function.name and function.parameters. Optional fields include description and strict (default true). Names match ^[a-zA-Z_][a-zA-Z0-9-_]{0,127}$. Tool choice supports auto, none and required; required needs at least one available tool. Forcing a named function conflicts with always-on thinking.

A dynamic Chat tool message is {role:"system",tools:[...]} without content. Keep these messages in the conversation. Append the complete assistant reply, including reasoning_content and tool_calls, then return each tool result as a role:tool message with the matching tool_call_id. Assistant tool replies can carry null content. Other message roles still require content.

Responses supports native function, namespace, apply_patch custom and web_search tool definitions with tool_choice:"auto". Return function_call_output or custom_tool_call_output items with matching call IDs. The include values web_search_call.results and web_search_call.action.sources affect web-search output only.

Messages supports native tool definitions and tool choice objects with type auto, any or none. Preserve assistant thinking blocks and their signatures. Return tool-result blocks inside user messages. Your application validates arguments, executes custom functions and controls external actions.

Chat Partial Mode sets partial:true only on the final assistant message. Messages continues a final assistant message directly. Do not rebuild history from visible answer text alone.

Media constraints

Chat accepts text, image_url and video_url content blocks. Use base64 data URLs or accepted ms:// references; arbitrary public media URLs are unsupported. Image formats: JPEG, PNG, GIF, WebP, BMP, HEIC and HEIF. Video formats: MP4, MPEG, MOV, AVI, FLV, MPG, WebM, WMV and 3GPP. The official guide specifies a total request-body limit of 100M, with no separate image-count cap. 4K images and Full HD video are recommendations, not required limits.

Responses uses input_image.image_url with a data URL. Messages uses an image source such as {type:"base64",media_type:"image/png",data:"..."}, or type url with an accepted ms:// reference. Messages inline image types are JPEG, PNG, GIF and WebP. These formats do not inherit Chat's video block by implication; use their dedicated schemas.

The Playground attaches inline images. Use native conversation fields or the JSON editor for video blocks and file references. File upload/management is outside these generation endpoints. A file ID created with another account is not necessarily usable.

Caching and usage

Chat and Responses use prompt_cache_key and prompt_cache_options:{mode:"implicit",ttl:"5m"}. TTL accepts 5m or 1h, default 5 minutes. Messages uses top-level cache_control:{type:"ephemeral",ttl:"5m"} and optional metadata.user_id. Nested Messages cache-control markers are ignored. Content-level prompt_cache_breakpoint is invalid.

An existing cached prefix retains its original TTL when refreshed. Requesting a different lifetime does not prove that it applied. Chat's official cache-write headers report actual 5-minute and 1-hour counts. Responses can return applied prompt_cache_options; Messages reports both TTL counters in usage.cache_creation.

FormatTotal inputCache readCache write
Chatusage.prompt_tokensprompt_tokens_details.cached_tokensprompt_tokens_details.cache_write_tokens
Responsesusage.input_tokensinput_tokens_details.cached_tokensinput_tokens_details.cache_write_tokens
Messagesinput_tokens + cache_read_input_tokens + cache_creation_input_tokenscache_read_input_tokenscache_creation_input_tokens

Chat and Responses input totals already include cache reads and writes. These categories and the uncached remainder are disjoint; do not add cache tokens twice. Output includes reasoning. Messages separates writes into ephemeral_5m_input_tokens and ephemeral_1h_input_tokens. See live rates; public generation responses do not contain monetary charges.

Streaming and completion

Set stream:true. Chat emits data chunks and [DONE]; stream_options.include_usage:true requests the final usage chunk. Responses uses named events such as response.output_text.delta, response.completed and response.incomplete. Messages uses message_start, content-block events, message_delta and message_stop.

A closed connection alone does not prove completion. Check native finish reasons and terminal status. An interrupted stream may lack final usage. Stopping a reader does not guarantee generation cancellation.

Official references

Checked on October 25, 2026: Kimi K3.1 Pro guide, Chat, Responses, Messages, vision and caching.