Skip to navigation

Kimi K3.1 Pro

Kimi K3.1 Pro
Moonshot AI · Text Generation
POST /v1/chat/completions

Moonshot’s flagship reasoning model for long coding and agent work, with a 1M token context, image input, web search, and a code interpreter.

At a glance

FieldValue
Model idkimi-k3-1-pro
Model release date2026-10-23
Input modalitiesText, Image
Output modalitiesText
Context window1M
Weight precision-
Max output tokens131,072
RegionGermany
Featuresreasoning, function_calling, multimodal, vision, agentic_coding, web_search, code_interpreter, cache
Native inferenceNo
NewYes
Structured outputJSON Schema
Supported endpointsPOST /v1/chat/completions, POST /v1/responses, POST /v1/messages, POST /v1beta/models/kimi-k3-1-pro:generateContent
Alternate model idskimi-k3.1-pro, moonshotai/kimi-k3.1-pro

Pricing

ChargeSpecRate
Inputper 1M prompt tokens$2.00
Outputper 1M generated tokens$10.00
Implicit cache readper 1M cached input tokens$1.80
Web searchper call when invoked$0.015
Web extractorper call when invoked$0.00
Code interpreterper call when invoked$0.00

Example request

curl https://api.empiriolabs.ai/v1/chat/completions \
-H 'Authorization: Bearer $EMPIRIOLABS_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"model": "kimi-k3-1-pro", "messages": [{"role":"user","content":"Hello"}]}'

Parameters

ParameterTypeRequiredDefaultDescription
max_tokensnumberno131072Maximum output tokens. Reasoning tokens count toward this limit. · Range: 1 – 131072
stopstringno-Up to 4 strings where the model will stop generating further tokens.
enable_thinkingbooleannotrueEnable reasoning before answering. Turning it off lowers output quality.
reasoning_effortenumno"max"Kimi K3.1 Pro reasoning effort. Higher effort spends more reasoning tokens before answering. Max is recommended and the default. · Allowed: low, medium, high, max
tool_web_searchbooleannofalseSearch the web for real-time information. Adds $0.015 to the request cost for each invoked call.
tool_web_extractorbooleannofalseExtract and read content from URLs. Requires Web Search and Thinking.
tool_code_interpreterbooleannofalseRun Python code in a sandbox. Requires Thinking.
disable_formattingbooleannofalseReturn the answer without the Sources list that web search adds.
response_formatenumno-Constrain the output to valid JSON. Use JSON mode for any JSON object, or supply a JSON Schema to force an exact response shape.

Notes

Supports text and image inputs with a 1M token context, function calling, and JSON schema structured output. Built-in tools are off by default: web search at $0.015 per invoked call, and a web extractor and a code interpreter at no extra charge. One request can run more than one search, and each search is billed. Thinking is on by default: set its depth with reasoning_effort (max is the default), or turn it off with enable_thinking, which lowers output quality. Reasoning tokens are billed as output tokens. The web extractor and the code interpreter need thinking on, and the web extractor also needs web search. Stop strings apply to reasoning as well as the answer, so a stop string that appears in the reasoning ends the reply early. Temperature and other sampling settings are fixed by the model service.

Per-tool billing (usage.tool_usage)

When this model invokes tools (web search, code interpreter, etc.) inside a single request, the response carries a normalized usage.tool_usage map alongside the token counts. The example below shows the shape, exact field names, units, and which tools appear can vary slightly per provider:

"usage": {
"prompt_tokens": 123,
"completion_tokens": 456,
"cost_usd": 0.0042,
"tool_usage": {"web_search": 3, "code_interpreter": 1}
}

The tool counts are already factored into cost_usd, they are surfaced for transparency so you can audit per-tool billing. The field is omitted when no tools were invoked.


Machine-readable schema: GET https://api.empiriolabs.ai/v1/models/kimi-k3-1-pro.