Skip to main content

Overview

Kimi K3.1 Pro is Moonshot AI’s reasoning model for software development, complex reasoning, and multi-step tool workflows. APIYI provides the official-relay models kimi-k3.1-pro and kimi-k3.1-pro-highspeed. Both use the same request format; switch between them by changing model.
Start with Pro, then choose Highspeed if your workflow needs lower latency. Both models always use reasoning, with reasoning_effort controlling its depth. Highspeed has higher input, output, and cache-write prices.
One-hour caching did not pass this test run and is not listed as a verified capability. Basic chat, streaming, and tool calls passed. See the caching section for official parameters and test limits.

Quick Start

Call Chat Completions with the OpenAI SDK or HTTP.

Models and Pricing

Compare Pro and Highspeed, including cache charges.

Reasoning and Tools

Select reasoning effort and preserve tool-call history.

Context Caching

Review official cache parameters and the limits of APIYI’s tests.

Model Selection and Pricing

Both models are billed by actual token usage, and APIYI’s current configured rates match official prices. All rates below are in USD per 1M tokens. Regular-input and output charges were checked; cache rates are configured prices, not cache charges verified by this test run:
Model prices align with the official provider and may change. This table is a reference; the Model Pricing tab in the top navigation is authoritative: Model Pricing.

Effective Cost with Top-up Bonuses

For top-ups that qualify for the 20% bonus promotion, each unit paid provides 1.2 units of usable credit. Effective cost is therefore 1 ÷ 1.2 ≈ 83.33% of the listed price. The bonus increases available credit; listed model prices stay the same. Check the promotion page for eligibility, bonus rates, and current terms.

Basic Capability Tests

APIYI verified the following basic cases for both models on 2026-10-25 (UTC+8): This guide primarily uses Chat Completions. Existing Responses integrations can also use POST /v1/responses. The image test used Base64 data. Basic requests to POST /v1/messages also passed. Explicitly set top_p: 0.95 and temperature: 1 to avoid errors from default sampling-parameter conversion.
These tests checked basic requests, semantic results, and regular-input and output charges. They do not cover every parameter, maximum context, or long-running behavior. Cache lifetime and billing require separate checks, as described below.

Quick Start

Use an APIYI Token to call POST /v1/chat/completions. Start with reasoning_effort: "low", then increase it for tasks that require deeper reasoning.
Keep the model name in configuration. To use Highspeed, change it to kimi-k3.1-pro-highspeed and reuse the rest of your integration.

Reasoning and Key Parameters

Both models always use reasoning. Control depth with reasoning_effort; do not carry over the Kimi K2.5 enable_thinking switch.
Allow enough max_completion_tokens for reasoning and the answer. If reasoning exhausts the budget, the final answer may be empty or incomplete. Check finish_reason and increase the budget when needed.
The official sampling values are fixed at temperature=1, top_p=0.95, n=1, presence_penalty=0, and frequency_penalty=0. The Chat Completions examples omit them; for Messages, explicitly set the sampling parameters as described above. Avoid carrying incompatible settings over from another model.

Reading the Response

The final answer is in choices[0].message.content. Reasoning is returned in choices[0].message.reasoning_content. Read content for the answer, and handle reasoning_content separately if your interface displays it. Reasoning tokens are billed at the output rate. Estimate cost from response usage and console logs rather than visible answer length.

Streaming

Reasoning and answer text arrive in delta.reasoning_content and delta.content, respectively. A final usage chunk may have an empty choices array, so check chunk.usage before reading choices.

Tool Calls

The model generates function names and arguments; your application executes them. When the model returns tool_calls, append the complete assistant message, including reasoning_content and tool_calls, to history. Then append each tool result with its matching tool_call_id and send the next request.
Preserve the full assistant message in tool-call rounds. Dropping reasoning_content or tool_calls can disrupt subsequent reasoning or tool-result matching. Validate tool names, arguments, and execution permissions before running a requested operation.

Context Caching

The official caching mechanism is intended for repeated long system instructions, reference documents, and code context. Put stable content first and changing questions last.
One-hour caching did not pass this test run and is not a verified APIYI capability. Both models were tested with separate long prefixes for 5-minute and 1-hour policies. Requests succeeded but returned no effective cache-read or cache-write counts. Neither the four requests repeated after approximately 5.5 minutes nor subsequent short-interval repetitions showed cache hits. Logs for the 1-hour requests showed regular-input charges rather than 1-hour cache-write charges.
These results describe this test run; they do not establish that caching is unsupported for every request. Budget for regular-input charges until your own requests show cache usage and matching billing. The parameters and behavior below are references to the official format.

Choosing a Cache Lifetime

Chat Completions uses the top-level request field prompt_cache_options. The default lifetime is 5 minutes. To request a 1-hour lifetime:
LONG_STABLE_CONTEXT represents the long text you want to reuse. Keep that prefix identical in later requests and replace the final question.
The first cache write determines its lifetime. Sending ttl: "1h" for an existing 5-minute cache does not upgrade it. A hit refreshes the original lifetime. Compare policies using a different fresh prefix for each one.

How Reads and Writes Are Billed

  • Cache read: reused prefix tokens are charged at the cache-read rate.
  • Cache write: new cached prefix tokens are charged at the chosen 5-minute or 1-hour write rate.
  • Regular input: input outside the cached portion is charged at the regular input rate.
  • Output: reasoning and the final answer are charged at the output rate.
These are the official billing categories. This test run verified regular-input and output charges, but did not verify cache-read or cache-write settlement. Compare response usage, cache-read and cache-creation fields, and console billing logs; parameter acceptance alone is insufficient.

Technical Specifications and Integration Tips

1

Start with low reasoning effort

Send a short request to validate the model name, Token, and response parser before adding long context.
2

Budget for reasoning

Adjust max_completion_tokens based on usage and finish_reason. Increase reasoning_effort for more complex tasks.
3

Stream long-running tasks

Handle reasoning and answer text separately, read final usage, and allow sufficient timeouts in clients and proxies.
4

Verify cache usage before scaling

Repeat requests with a fixed long prefix, then compare cache usage and billing logs to confirm hits in your workflow.

FAQ

Both models use the same integration format. Highspeed targets lower latency at higher token prices. Actual speed depends on prompt length, reasoning effort, output length, and current load; evaluate it with your own workload.
K3.1 Pro models always use reasoning. Select reasoning_effort: "low" to control overhead rather than carrying over the old enable_thinking parameter.
Output usage includes reasoning tokens. Visible answer length does not represent total output usage; check response usage and console logs.
Under the official mechanism, an existing cache keeps its initial lifetime, so ttl: "1h" requires a fresh prefix. APIYI’s tests did not verify 1-hour retention or write charges; successful parameter acceptance is not proof of support.
A qualifying top-up provides 1.2 times the paid amount in credit, making effective cost 1 ÷ 1.2 ≈ 83.33% of list price. See the promotion terms for eligibility.
Official references: platform.moonshot.ai/docs/guide/kimi-k3-1-pro-quickstart, platform.kimi.ai/docs/guide/context-caching, and platform.moonshot.ai/docs/pricing/chat.