Kimi K3.1 Pro API

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

Moonshot AIText Generation1M contextReleased Oct 23, 2026GermanyProprietary EndpointNew

About Kimi K3.1 Pro

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

Supports text and image inputs, function calling, JSON schema structured output, and built-in tools: web search billed at $0.015 per invoked call, and a web extractor and a code interpreter at no extra charge. Thinking is on by default with a reasoning_effort control (max is the default) and an enable_thinking switch; reasoning tokens are billed as output tokens. Prompt caching is automatic. Stop strings apply to reasoning as well as the answer. Temperature and other sampling settings are fixed by the model service. Video input, explicit cache controls, batches, and fine-tuning are not supported.

Also known as Kimi K3.1, Moonshot AI Kimi K3.1 Pro

reasoningfunction callingmultimodalvisionagentic codingweb searchcode interpretercache

Kimi K3.1 Pro specs

Model ID
kimi-k3-1-pro
Author
Moonshot AI
Category
Text Generation
Released
Oct 23, 2026
Context window
1M tokens
Max output
131,072 tokens
Input
TextImage
Output
Text
Structured output
JSON Schema
Region
Germany
Endpoints
POST/v1/chat/completionsPOST/v1/responsesPOST/v1/messagesPOST/v1beta/models/kimi-k3-1-pro:generateContent
Alternate model IDs
kimi-k3.1-promoonshotai/kimi-k3.1-pro

Kimi K3.1 Pro API pricing

Live pay-as-you-go rates from the EmpirioLabs catalog. You are billed only for what you use, with no monthly minimum.

Type
Spec
Rate
Input
per 1M prompt tokens
$2.00
Output
per 1M generated tokens
$10.00
Implicit cache read
per 1M cached input tokens
$1.80
Web search
per call when invoked
$0.015
Web extractor
per call when invoked
$0.00
Code interpreter
per call when invoked
$0.00
Compare on the full pricing page

How to call the Kimi K3.1 Pro API

Kimi K3.1 Pro serves the OpenAI-compatible Chat Completions API. Point any OpenAI SDK at https://api.empiriolabs.ai/v1 with your EmpirioLabs API key and use the model id kimi-k3-1-pro. Get an API key from the EmpirioLabs dashboard.

cURL
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": "Write a haiku about the ocean."}
    ]
  }'
Python (OpenAI SDK)
from openai import OpenAI

client = OpenAI(
    base_url="https://api.empiriolabs.ai/v1",
    api_key="YOUR_EMPIRIOLABS_API_KEY",
)

response = client.chat.completions.create(
    model="kimi-k3-1-pro",
    messages=[{"role": "user", "content": "Write a haiku about the ocean."}],
)
print(response.choices[0].message.content)
Full Kimi K3.1 Pro API reference

Kimi K3.1 Pro API parameters

Request parameters supported by the Kimi K3.1 Pro API on EmpirioLabs. Defaults apply when a field is omitted.

ParameterTypeDefaultRange / valuesDescription
max_tokensnumber1310721 to 131072Maximum output tokens. Reasoning tokens count toward this limit.
stopstring--Up to 4 strings where the model will stop generating further tokens.
enable_thinkingbooleantrue-Enable reasoning before answering. Turning it off lowers output quality.
reasoning_effortenummaxlow, medium, high, maxKimi K3.1 Pro reasoning effort. Higher effort spends more reasoning tokens before answering. Max is recommended and the default.
tool_web_searchbooleanfalse-Search the web for real-time information. Adds $0.015 to the request cost for each invoked call.
tool_web_extractorbooleanfalse-Extract and read content from URLs. Requires Web Search and Thinking.
tool_code_interpreterbooleanfalse-Run Python code in a sandbox. Requires Thinking.
disable_formattingbooleanfalse-Return the answer without the Sources list that web search adds.
response_formatenum--Constrain the output to valid JSON. Use JSON mode for any JSON object, or supply a JSON Schema to force an exact response shape.

Good to know

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.

Kimi K3.1 Pro API: common questions

How much does the Kimi K3.1 Pro API cost?

On EmpirioLabs, Kimi K3.1 Pro is billed pay as you go: Input $2.00 per 1M prompt tokens; Output $10.00 per 1M generated tokens; Implicit cache read $1.80 per 1M cached input tokens; Web search $0.015 per call when invoked; Web extractor $0.00 per call when invoked; Code interpreter $0.00 per call when invoked. The live rate card on this page always matches what the API charges.

What is the context window of Kimi K3.1 Pro?

Kimi K3.1 Pro supports a 1M-token context window with up to 131,072 output tokens per response.

Is the Kimi K3.1 Pro API OpenAI-compatible?

Yes. Kimi K3.1 Pro serves the OpenAI-compatible Chat Completions API, so existing OpenAI SDKs work by pointing base_url at https://api.empiriolabs.ai/v1 and setting the model id to kimi-k3-1-pro.

Can I try Kimi K3.1 Pro in the browser before integrating?

Yes. The EmpirioLabs playground runs Kimi K3.1 Pro in the browser with the same parameters the API exposes, so you can test prompts before writing code.

How do I get a Kimi K3.1 Pro API key?

Create an EmpirioLabs account, then generate a key under API Keys in the dashboard. Billing is pay-as-you-go credits, so you only pay for the requests you make.

Ready to use better endpoints?

Check out our pricing or reach out if you want your own model deployed on our stack.