> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.empiriolabs.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.empiriolabs.ai/_mcp/server.

# 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.

![Kimi K3.1 Pro](https://media.empiriolabs.ai/model-logos/kimi.png)

[Moonshot AI](/providers/moonshot) · 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

| Field               | Value                                                                                                                       |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| Model id            | `kimi-k3-1-pro`                                                                                                             |
| Model release date  | 2026-10-23                                                                                                                  |
| Input modalities    | Text, Image                                                                                                                 |
| Output modalities   | Text                                                                                                                        |
| Context window      | 1M                                                                                                                          |
| Weight precision    | -                                                                                                                           |
| Max output tokens   | 131,072                                                                                                                     |
| Region              | Germany                                                                                                                     |
| Features            | reasoning, function_calling, multimodal, vision, agentic_coding, web_search, code_interpreter, cache                        |
| Native inference    | No                                                                                                                          |
| New                 | Yes                                                                                                                         |
| Structured output   | JSON Schema                                                                                                                 |
| Supported endpoints | `POST /v1/chat/completions`, `POST /v1/responses`, `POST /v1/messages`, `POST /v1beta/models/kimi-k3-1-pro:generateContent` |
| Alternate model ids | `kimi-k3.1-pro`, `moonshotai/kimi-k3.1-pro`                                                                                 |

## Pricing

| Charge              | 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  |

## Example request

```bash
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

| Parameter               | Type    | Required | Default  | Description                                                                                                                                                                |
| ----------------------- | ------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `max_tokens`            | number  | no       | `131072` | Maximum output tokens. Reasoning tokens count toward this limit. · Range: 1 – 131072                                                                                       |
| `stop`                  | string  | no       | -        | Up to 4 strings where the model will stop generating further tokens.                                                                                                       |
| `enable_thinking`       | boolean | no       | true     | Enable reasoning before answering. Turning it off lowers output quality.                                                                                                   |
| `reasoning_effort`      | enum    | no       | `"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_search`       | boolean | no       | false    | Search the web for real-time information. Adds \$0.015 to the request cost for each invoked call.                                                                          |
| `tool_web_extractor`    | boolean | no       | false    | Extract and read content from URLs. Requires Web Search and Thinking.                                                                                                      |
| `tool_code_interpreter` | boolean | no       | false    | Run Python code in a sandbox. Requires Thinking.                                                                                                                           |
| `disable_formatting`    | boolean | no       | false    | Return the answer without the Sources list that web search adds.                                                                                                           |
| `response_format`       | enum    | no       | -        | 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:

```json
"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`.