Home Blog

How to Use the Kimi K3.1 Pro API

Kimi K3.1 Pro API blog cover

Nov 5, 2026

EmpirioLabs AI

Disclosure: This article was written with AI assistance and reviewed by EmpirioLabs AI.

Kimi K3.1 Pro is available on EmpirioLabs. It is Moonshot's flagship model for long coding and agent work, released on October 23, 2026 as a post-trained version of Kimi K3. It reads text and images in a 1M token context, reasons before it answers at a depth you choose, calls your functions, returns JSON that follows your schema, and can search the web, read pages, and run Python on its own. Moonshot reports gains over Kimi K3 in coding, 3D creation, and financial research.

What the model does

Text and image input. Send screenshots, diagrams, and photos in the same request as the prompt, using the standard image_url content block, as a web address or a data URL.

Adjustable reasoning. Thinking is on by default. reasoning_effort sets its depth: low, medium, high, or max, with max as the default. The reasoning text comes back in reasoning_content.

Built-in tools. Three tools are available and off by default: web search (tool_web_search), a web extractor that reads pages (tool_web_extractor), and a Python code interpreter (tool_code_interpreter). They work on their own or together with your function tools and structured output, in streaming and non-streaming requests.

Functions and structured output. Function calling supports forced and required tool choices with thinking on, and response_format enforces a JSON schema exactly. Repeated prompt prefixes are cached automatically and billed at the cached input rate.

Watch the launch film

Every program in the film was written by Kimi K3.1 Pro in one shot through the EmpirioLabs API: a ray traced black hole, an ink simulation that runs on the GPU, a clock tower, a marble run, a roller coaster, and a city that grows from nothing. The score was generated by ACE-Step on EmpirioLabs. Watch it on YouTube.

How to call Kimi K3.1 Pro

Use the OpenAI-compatible chat completions endpoint and set model to kimi-k3-1-pro. This request searches the web and reasons at high depth:

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",
    "reasoning_effort": "high",
    "tool_web_search": true,
    "messages": [
      {"role": "user", "content": "What changed in the latest stable Python release? Three bullet points."}
    ]
  }'

The answer ends with a Sources list of the pages the model used, and usage.tool_usage.web_search counts the searches it ran. The same model ID works on the Responses, Messages, and Gemini-compatible endpoints listed on the model page, and with "stream": true.

Choosing a reasoning effort

Depth and output tokens. Reasoning tokens are billed as output tokens, and low uses far fewer of them than the other levels. Use low for quick replies and routine tool calls, and keep max for hard coding and long agent runs.

Turning thinking off. enable_thinking set to false removes reasoning altogether, which also removes the tokens it adds to the prompt, but it lowers output quality. Web search still works without thinking. The web extractor and the code interpreter do not.

Moving from Kimi K3

What to change. Set model to kimi-k3-1-pro. reasoning_effort and tool_web_search work the same way, and thinking can now be turned off. Kimi K3 stays available, and it remains the choice for video input, which Kimi K3.1 Pro does not take.

Operational notes

  • max_tokens includes reasoning. A small value can end inside the reasoning and return no answer, with finish_reason set to length. Leave room for both, or leave it unset. With a built-in tool on, the minimum is 16.
  • Stop strings also apply to reasoning. A stop string that appears in the reasoning ends the reply there, with no answer. Use strings that will not appear in the model's thinking, or turn thinking off for that request.
  • Search results count as input tokens. The pages a search returns are added to the model's input, and one request can run several searches, each with its own fee.
  • Sampling is fixed. temperature, top_p, and the penalty settings are ignored.
  • Search answers end with a Sources list. Set disable_formatting to true when another program reads the output and expects the answer alone. Structured output never gets the list.

Pricing

Token usage is billed at one input rate, one output rate, and a lower rate for cached input, the same at every context length. Reasoning tokens are billed as output tokens, and each executed web search adds a per-search fee. See the live model page and pricing page for current rates.

Start building

Try Kimi K3.1 Pro in the Playground, read the API documentation, or compare it with other models in the model catalog.

Ready to use better endpoints?

Explore our models, or contact us about business inquiries, custom deployments, or anything else.