概述
Kimi K3.1 Pro 是月之暗面(Moonshot AI)K3.1 系列的首个模型,也是 Kimi 迄今能力最强的旗舰模型。它是约 3 万亿参数级的开放权重模型,原生支持视觉理解与 100 万 token 上下文窗口,在编程、3D 创作、金融研究与建模上显著提升:可从修复真实代码库问题一路做到从零搭建完整项目,直接编写 Blender、FreeCAD 等软件脚本完成 3D 建模,并胜任财务建模与投研分析。思考模式始终开启,可通过 reasoning_effort 在 low / high / max 三档推理强度间选择,默认 max。
编程与 Agent
覆盖从修复真实代码库问题到从零搭建完整项目的编码任务,可驱动 Unity、Unreal Engine、Godot 等引擎;Terminal-Bench 4.0 得分 65.7%。
3D 建模与参数化设计
可依据文字、草图或参考图重建模型,直接编写 Blender、FreeCAD 等软件脚本,无需 MCP 连接器。
金融研究与建模
在 Office QA Pro v2 与 SpreadsheetBench 2 上取得最佳成绩,胜任财务建模、投研分析等专业工作流。
1M 上下文与原生视觉
支持 1M(1,048,576)token 上下文窗口,原生理解图像输入,整仓代码与长篇资料可一次载入。
功能
深度思考始终开启、不可关闭;reasoning_effort 可选 low / high / max,默认 max✓
视觉理解图像需以 base64 data URL 传入,不支持公网图片 URL✓
工具调用多轮工具调用需将完整 assistant 消息原样回传✓
结构化输出response_format 使用 json_schema 并设 strict: true✓
上下文缓存自动生效,命中缓存按缓存价计费✓
流式输出思考过程经 reasoning_content 增量返回✓
前缀补全Partial Mode:末尾 assistant 消息设 partial: true✓
定价
输入¥13/M tokens
输入(缓存命中)¥1.3/M tokens
输出¥68/M tokens
速率限制与上下文
上下文窗口1M
最大输出1M
RPM(请求 / 分钟)500
TPM(token / 分钟)3M
API 参考
POST
https://api.tokenfab.cn/v1/chat/completions请求示例
curl https://api.tokenfab.cn/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKENFAB_API_KEY" \
-d '{
"model": "kimi-k3.1-pro",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Please introduce yourself."}
]
}'import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("TOKENFAB_API_KEY"),
base_url="https://api.tokenfab.cn/v1",
)
response = client.chat.completions.create(
model="kimi-k3.1-pro",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Please introduce yourself."},
],
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.TOKENFAB_API_KEY,
baseURL: "https://api.tokenfab.cn/v1"
});
const response = await client.chat.completions.create({
model: "kimi-k3.1-pro",
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: "Please introduce yourself." }
]
});
console.log(response.choices[0].message.content);响应示例
{
"id": "chatcmpl-7f3a2c91",
"object": "chat.completion",
"created": 1793000000,
"model": "kimi-k3.1-pro",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"reasoning_content": "The user wants me to introduce myself, so I should state the model name and main capabilities.",
"content": "I am Kimi K3.1 Pro, a flagship model from Moonshot AI. I accept text and image input, support a 1M-token context window, and always think before answering."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 14,
"completion_tokens": 64,
"total_tokens": 78
}
}请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | ✓ | 模型 ID,如 kimi-k3.1-pro |
messages | array | ✓ | 对话消息列表,含 role 和 content;user 消息的 content 可为内容块数组以携带图片,图片需为 base64 data URL,不支持公网图片 URL;多轮对话需将完整 assistant 消息原样回传 |
reasoning_effort | string | — | 推理强度,low / high / max,默认 max;思考模式始终开启,不可关闭 |
max_completion_tokens | int | — | 最大输出 Token 数,默认 131072(128K),最大 1048576(1M) |
temperature | float | — | 固定为 1.0(top_p 固定 0.95、n 固定 1),建议不要显式传入 |
response_format | object | — | 结构化输出:type 设为 json_schema 并在 schema 中设 strict: true,约束最终 message.content |
stream | bool | — | 是否以 SSE 流式返回;思考过程经 delta.reasoning_content、最终回答经 delta.content 分别返回 |
tools | array | — | 工具定义列表,每个工具需包含 type: function 及 name、description、parameters |
tool_choice | string | — | 工具调用策略,如 auto / required(required 表示至少调用一个工具) |