Kimi K3.1 Pro
Kimi K3.1 Pro is Moonshot AI's current Kimi flagship for long-horizon coding, multi-step agent workflows and knowledge work. Kimi K3.1 Pro Highspeed is the variant of the same model that generates its answer faster. Both are called with the moonshot/ prefix on the /v1/chat/completions endpoint.
| Model | Context | Input / Cache read / Output ($/1M) |
|---|---|---|
moonshot/kimi-k3.1-pro |
1,048,576 | 2.00 / 0.20 / 10.00 |
moonshot/kimi-k3.1-pro-highspeed |
1,048,576 | 4.00 / 0.20 / 20.00 |
Highspeed's input and output prices are twice those of K3.1 Pro; cached input costs the same on both. Choose Highspeed for interactive work where waiting time matters and K3.1 Pro where cost matters more.
curl "$LLMTR_BASE_URL/v1/chat/completions" \ -H "Authorization: Bearer llmtr-your_key" \ -H "Content-Type: application/json" \ -d '{ "model": "moonshot/kimi-k3.1-pro", "messages": [ { "role": "system", "content": "Answer briefly and clearly." }, { "role": "user", "content": "Find the bug in this function and write the fixed version." } ], "max_tokens": 8192 }'Both models support streaming, JSON mode through response_format, and structured output with json_schema and strict: true. With structured output, parse only the message.content field.
temperature and top_p are fixed on these models: 1 and 0.95 are used instead of the value you send. A request with n other than 1, or with presence_penalty or frequency_penalty other than 0, is rejected with 400 invalid_request.
These models have no web search: a request that includes the $web_search tool is rejected with 400 unsupported_operation.
Reasoning
Section titled “Reasoning”Both models reason on every request and those tokens bill as output. Choose the level with the reasoning_effort field or with a suffix on the model id (moonshot/kimi-k3.1-pro:low).
| Model | Levels | When no level is sent |
|---|---|---|
moonshot/kimi-k3.1-pro |
low, high, max |
max |
moonshot/kimi-k3.1-pro-highspeed |
low, high, max |
max |
The higher the level, the longer the model thinks and the more output tokens are billed. Use low for simple questions and short answers.
Reasoning cannot be turned off. A request with "reasoning": false, "thinking": { "type": "disabled" } or the :fast suffix is rejected with 400 invalid_request; use low for the least thinking. "reasoning": true and :think are accepted and change nothing, since the model already reasons.
A level that is not listed (such as none or medium) is rejected with 400 invalid_request. Reasoning tokens count toward the max_tokens limit; if a response comes back with finish_reason: "length" or an empty content, raise max_tokens or choose a lower level. See also the Reasoning effort page.
In multi-turn conversations and tool loops, send the assistant message the model returned back together with its reasoning_content field; Moonshot recommends this for these models and LLMTR forwards the field on the assistant message as it is.
Image and video
Section titled “Image and video”Both models accept images (image_url) and video (video_url) in a user message. Media can be sent only as base64 data URLs; an address starting with https:// is rejected with 400 unsupported_input.
curl "$LLMTR_BASE_URL/v1/chat/completions" \ -H "Authorization: Bearer llmtr-your_key" \ -H "Content-Type: application/json" \ -d '{ "model": "moonshot/kimi-k3.1-pro:low", "messages": [ { "role": "user", "content": [ { "type": "image_url", "image_url": { "url": "data:image/png;base64,<BASE64_IMAGE>" } }, { "type": "text", "text": "Explain the error message in this screenshot." } ] } ], "max_tokens": 2048 }'The content field must be an array of objects. For video, send { "type": "video_url", "video_url": { "url": "data:video/mp4;base64,<BASE64_VIDEO>" } } in the same way.
Tool calling
Section titled “Tool calling”Both models support tool/function calling. tool_choice accepts auto, none and required; required makes the model call at least one tool. The { "type": "function", "function": { "name": "..." } } form that forces a specific function is not supported and is rejected with 400 invalid_request.
curl "$LLMTR_BASE_URL/v1/chat/completions" \ -H "Authorization: Bearer llmtr-your_key" \ -H "Content-Type: application/json" \ -d '{ "model": "moonshot/kimi-k3.1-pro-highspeed", "messages": [{ "role": "user", "content": "What is the weather in Istanbul?" }], "tools": [ { "type": "function", "function": { "name": "get_weather", "description": "Get the current weather for a city", "parameters": { "type": "object", "properties": { "city": { "type": "string" } }, "required": ["city"] } } } ], "tool_choice": "required", "reasoning_effort": "low", "max_tokens": 1024 }'On the second turn, send back the assistant message with the tool call (with tool_calls and reasoning_content) and, for each call, the tool's result (role: "tool" with the matching tool_call_id).
Repeated prompt prefixes are written to the cache automatically and read from it on later requests; no setting is needed. The first write bills at the input price, and tokens read from the cache bill at the cache-read price in the table. A cache entry expires after 5 minutes without use; every read renews that time.
To benefit from the cache, put fixed content such as the system prompt, tool definitions and reference text at the start of the request, and content that changes every turn at the end.
The 1-hour cache TTL is not available on these models: a request with "prompt_cache_options": { "ttl": "1h" } is rejected with 400 invalid_request. Omit prompt_cache_options or use "ttl": "5m".