Source reviewedKimi API Platform official documentation
Kimi K3.1 Pro API quickstart: model ID, base_url, and OpenAI SDK calls
To integrate Kimi K3.1 Pro, use the model ID kimi-k3.1-pro, base_url=https://api.moonshot.ai/v1, and the OpenAI SDK's Chat Completions interface. This flagship model is unlocked only after a successful top-up of at least $1; the cumulative top-up amount determines the account tier and the concurrency, RPM, TPM, and TPD limits.
Content typeConfiguration
InputsThe flagship model kimi-k3.1-pro; the official page also lists the high-speed variant kimi-k3.1-pro-highspeed, whose pricing and availability require separate verification., Python 3.9+, openai>=1.0, Kimi API Chat Completions, and clients using the same OpenAI-compatible endpoint.
StatusPython 3.9+, openai>=1.0, Kimi API Chat Completions, and clients using the same OpenAI-compatible endpoint.
API configuration
Source reviewedKimi API Platform official documentation
Kimi K3.1 Pro reasoning levels and parameter configuration: reasoning_effort low, high, and max
Kimi K3.1 Pro always reasons. Set its reasoning level through the top-level reasoning_effort field in a Chat Completions request; the available values are low, high, and max, with max as the default.
Content typeConfiguration
InputsThe official page explicitly covers kimi-k3.1-pro; it describes this field as K3's top-level reasoning field but does not list a compatibility matrix for other model versions., The Kimi API Chat Completions interface and compatible clients that can pass through the top-level reasoning_effort field.
StatusThe Kimi API Chat Completions interface and compatible clients that can pass through the top-level reasoning_effort field.
API configurationreasoning
Source reviewedKimi API Platform official documentation
Kimi K3.1 Pro image and video input configuration: Base64, file IDs, and multimodal message structure
For Kimi K3.1 Pro vision requests, write the user message's content as a JSON array; images can use a Base64 image_url, while videos must be uploaded first and then referenced through a video_url using ms://<file-id>.
Content typeConfiguration
Inputskimi-k3.1-pro; the official page also lists kimi-k3, kimi-k2.6, kimi-k2.7-code, and kimi-k2.7-code-highspeed, and states that these models can understand videos., Kimi API Chat Completions; the official example uses the Python OpenAI SDK and https://api.moonshot.ai/v1.
StatusKimi API Chat Completions; the official example uses the Python OpenAI SDK and https://api.moonshot.ai/v1.
API configurationVisual prototype
Source reviewedKimi API Platform official documentation
Kimi K3.1 Pro JSON Schema structured output configuration: strict, MFJS, and final content parsing
Kimi K3.1 Pro uses response_format.type="json_schema" and strict=true to constrain fields, types, and nested structures; the client should parse only choices[0].message.content and should not treat reasoning_content or the entire response object as the JSON body.
Content typeConfiguration
Inputskimi-k3.1-pro., Kimi API Chat Completions; the official example uses the Python OpenAI SDK and https://api.moonshot.ai/v1.
StatusKimi API Chat Completions; the official example uses the Python OpenAI SDK and https://api.moonshot.ai/v1.
API configurationInformation extraction
Source reviewedKimi API Platform official documentation
Kimi K3.1 Pro multi-turn messages and tool history: preserve full reasoning_content
For multi-turn conversations and tool calls with Kimi K3.1 Pro, the complete assistant message returned by the API must be put back into messages unchanged, including reasoning_content; the client cannot save only the final answer.
Content typeWorkflow
Inputskimi-k3.1-pro. The history-preservation requirements in this article follow the official documentation for this model., Kimi API Chat Completions, and clients or Agents that can preserve and pass through the assistant's original fields.
StatusKimi API Chat Completions, and clients or Agents that can preserve and pass through the assistant's original fields.
API configurationAgent
Source reviewedKimi API Platform official documentation
Kimi K3.1 Pro Partial Mode prefix continuation: completing truncated output and preserving a fixed role opening
Kimi K3.1 Pro's Partial Mode requires appending a message with role="assistant" and partial=True to the end of the message list, with the text to preserve placed in content; the API response does not include this prefix, so the client must concatenate it manually.
Content typePrompting guide
InputsThe examples on this page use kimi-k3.1-pro by default; other models (such as kimi-k3.1-pro-highspeed) require replacing model and rechecking the parameters., Kimi API Chat Completions and OpenAI-compatible clients that can retain the original assistant fields.
StatusKimi API Chat Completions and OpenAI-compatible clients that can retain the original assistant fields.
API configurationWriting
Source reviewedKimi API Platform official documentation
Kimi K3.1 Pro context prefix caching and TTL configuration: automatic writes, hits, and usage verification
The Kimi API automatically reuses fixed content based on the request prefix; Kimi K3.1 Pro supports Cache Write, with a default 5m TTL or an explicit 1h TTL, but the order and exact text of the stable prefix must remain unchanged, and hits and writes must be verified through the API's usage fields.
Content typeConfiguration
Inputskimi-k3.1-pro; the official FAQ explicitly lists it as supporting Cache Write., Kimi API Chat Completions and Responses; Anthropic Messages uses the corresponding top-level cache_control.
StatusKimi API Chat Completions and Responses; Anthropic Messages uses the corresponding top-level cache_control.
API configurationcost
Source reviewedKimi API Platform official documentation
Kimi K3.1 Pro dynamic tool-loading workflow: inject tools on demand while preserving the cache prefix
When a conversation needs them, Kimi K3.1 Pro can inject complete tool definitions by appending a message with role="system" and tools; retaining loaded definitions exactly as they are reduces tool-definition tokens and preserves the existing prefix cache.
Content typeWorkflow
Inputskimi-k3.1-pro; the documentation also explicitly supports kimi-k3., Kimi API Chat Completions, and clients or backends that can append complete tool definitions by message.
StatusKimi API Chat Completions, and clients or backends that can append complete tool definitions by message.
API configurationAgent
Source reviewedKimi API Platform official documentation
Kimi K3.1 Pro tool-calling execution loop: schema, JSON arguments, and tool_call_id returns
The tool-calling loop is: submit JSON Schema tool definitions, read the call list returned with finish_reason=tool_calls, parse each function.arguments, execute it on the client, then append the result with the matching tool_call_id and role="tool", continuing until the model returns finish_reason="stop".
Content typeWorkflow
InputsThe page's current examples use kimi-k3.1-pro by default; it also mentions that it can be replaced with kimi-k3.1-pro-highspeed, but this article does not treat Highspeed as an equivalently tested version., Kimi API Chat Completions; the official examples use the OpenAI Python SDK or HTTP streaming responses, with the application executing the tools itself.
StatusKimi API Chat Completions; the official examples use the OpenAI Python SDK or HTTP streaming responses, with the application executing the tools itself.
API configurationAgent
Source reviewedOfficial Kimi API Platform documentation
Kimi K3.1 Pro tool choice configuration: automatic, forced, and disabled tool calls
Kimi K3.1 Pro's tool_choice can select automatic decision-making, disable tools, require at least one tool call, or specify a particular function for each request; tool search commonly uses required on the first round and switches back to auto after retrieval.
Content typeConfiguration
Inputskimi-k3.1-pro; the official complete request example explicitly uses this model ID., Kimi API Chat Completions; the client declares tools in the request and handles the tool results.
StatusKimi API Chat Completions; the client declares tools in the request and handles the tool results.
API configurationAgent
Source reviewedKimi API Platform (Moonshot AI official documentation)
Kimi API official prompt best practices: task constraints and prompting examples guide
Kimi recommends stating the task, context, role, input boundaries, execution steps, reference text, examples, and output constraints clearly; complex or long-context tasks should also be categorized, summarized, or processed in chunks to reduce model guesswork.
Content typePrompting guide
InputsThe Kimi API documentation does not limit this page to a specific model version; the page header includes an announcement for the Kimi K3.1 Pro launch, but the body is a general prompting guide., Kimi API Chat Completions messages, especially system and user messages; each client still needs to assemble requests according to its own interface.
StatusKimi API Chat Completions messages, especially system and user messages; each client still needs to assemble requests according to its own interface.
WritingResearchInformation extraction