> ## Documentation Index
> Fetch the complete documentation index at: https://mixroute.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Kimi K3.1 Pro

> Moonshot 推理模型，具备 1M token 上下文和原生视觉理解能力，适用于编程与智能体工作流。

Kimi K3.1 Pro 在 Kimi K3 基础上强化编程、3D 开发工作流和研究能力。通过 MixRoute Chat Completions 调用时，使用下方完整模型 ID。

## 模型信息

| 字段 | 说明 |
| - | - |
| Model ID | `kimi-k3.1-pro` |
| API | `POST /v1/chat/completions` |
| 上下文窗口 | 1M tokens（厂商规格） |

> [!NOTE]
>
> 下方能力与限制依据厂商模型规格；实际可用性、请求限制与价格取决于 MixRoute 路由和模型市场。

## 请求示例

将 `MIXROUTE_API_KEY` 设为你的 MixRoute API Key。示例选择 `low` 推理强度。

**cURL**

```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
  -H "Authorization: Bearer $MIXROUTE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kimi-k3.1-pro",
    "messages": [{"role": "user", "content": "Suggest three ways to simplify this application architecture."}],
    "reasoning_effort": "low"
  }'
```

**Python**

```python theme={null}
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["MIXROUTE_API_KEY"],
    base_url="https://api.mixroute.ai/v1",
)
response = client.chat.completions.create(
    model="kimi-k3.1-pro",
    messages=[{"role": "user", "content": "Suggest three ways to simplify this application architecture."}],
    reasoning_effort="low",
)
print(response.choices[0].message.content)
```

**Streaming**

```python theme={null}
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["MIXROUTE_API_KEY"],
    base_url="https://api.mixroute.ai/v1",
)
stream = client.chat.completions.create(
    model="kimi-k3.1-pro",
    messages=[{"role": "user", "content": "Suggest three ways to simplify this application architecture."}],
    reasoning_effort="low",
    stream=True,
)
for chunk in stream:
    if chunk.choices:
        print(chunk.choices[0].delta.content or "", end="", flush=True)
```

## 请求字段

| 参数 | 类型 | 必填 | 说明 |
| - | - | - | - |
| `model` | string | 是 | 使用 `kimi-k3.1-pro`。 |
| `messages` | array | 是 | 包含 `role` 与 `content` 的消息数组。 |
| `reasoning_effort` | string | 否 | 可选 `low`、`high`、`max`，默认 `max`；思考始终启用。 |
| `max_completion_tokens` | integer | 否 | 输出 token 预算；厂商默认 131072，上限 1048576，同时受上下文与路由限制。 |
| `stream` | boolean | 否 | 设为 `true` 启用 SSE 流式响应。 |
| `tools` | array | 否 | OpenAI 格式的函数定义。 |
| `tool_choice` | string | 否 | 可选 `auto`、`none`、`required`。 |

## 使用注意

* 省略固定采样参数：`temperature=1.0`、`top_p=0.95`、`n=1`、`presence_penalty=0`、`frequency_penalty=0`。不要传入 K2.x 的 `thinking` 参数。
* 多轮对话和工具调用时，完整回传 assistant 消息，包括 `reasoning_content` 与 `tool_calls`，不要只保留 `content`。
* 图片输入的 `content` 应为数组，在 `image_url` 部分传入 base64 data URL；厂商不接受公网图片 URL。上游文件 ID 不能直接当作 MixRoute 文件使用。
* 流式响应区分 `reasoning_content` 与最终答案 `content`；流式示例仅打印最终答案。

[Chat Completions 请求格式](https://mixroute.ai/docs/zh-Hans/api-reference/endpoint/chat-openai.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.