curl --request POST \
--url https://direct.evolink.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kimi-k3.1-pro",
"input": "Reply with OK.",
"reasoning": {
"effort": "low"
},
"max_output_tokens": 1024
}
'{
"id": "resp_68f0c1c2d3e4f5a6b7c8d9e0",
"object": "response",
"created_at": 123,
"completed_at": 123,
"status": "in_progress",
"model": "<string>",
"output": [
{
"type": "reasoning",
"id": "rs_68f0c1c2d3e4f5a6b7c8d9e0",
"summary": [
{
"type": "summary_text",
"text": "<string>"
}
],
"encrypted_content": "<string>",
"status": "in_progress"
}
],
"usage": {
"input_tokens": 123,
"input_tokens_details": {
"cached_tokens": 123,
"cache_write_tokens": 123
},
"output_tokens": 123,
"output_tokens_details": {
"reasoning_tokens": 123
},
"total_tokens": 123
},
"incomplete_details": {
"reason": "max_output_tokens"
},
"error": {
"code": "<string>",
"message": "<string>"
},
"instructions": "<string>",
"reasoning": {},
"text": {},
"tools": [
{
"type": "function",
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true
}
],
"tool_choice": "auto",
"max_output_tokens": 123,
"temperature": 123,
"top_p": 123,
"parallel_tool_calls": true,
"service_tier": "<string>",
"store": true,
"background": true,
"previous_response_id": "<string>",
"conversation": {},
"prompt_cache_options": {
"mode": "implicit",
"ttl": "5m"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}Kimi K3.1 Pro / Highspeed - Responses 接口
使用 reasoning.effort 指定思考档位,prompt_cache_options 指定缓存。搜索通过 web_search_call 输出项返回。流式按 response.completed / response.incomplete / response.failed 等事件判断结束;达到输出上限会返回 incomplete。多轮请求携带完整 output 历史,包括 reasoning、工具调用与结果。
curl --request POST \
--url https://direct.evolink.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kimi-k3.1-pro",
"input": "Reply with OK.",
"reasoning": {
"effort": "low"
},
"max_output_tokens": 1024
}
'{
"id": "resp_68f0c1c2d3e4f5a6b7c8d9e0",
"object": "response",
"created_at": 123,
"completed_at": 123,
"status": "in_progress",
"model": "<string>",
"output": [
{
"type": "reasoning",
"id": "rs_68f0c1c2d3e4f5a6b7c8d9e0",
"summary": [
{
"type": "summary_text",
"text": "<string>"
}
],
"encrypted_content": "<string>",
"status": "in_progress"
}
],
"usage": {
"input_tokens": 123,
"input_tokens_details": {
"cached_tokens": 123,
"cache_write_tokens": 123
},
"output_tokens": 123,
"output_tokens_details": {
"reasoning_tokens": 123
},
"total_tokens": 123
},
"incomplete_details": {
"reason": "max_output_tokens"
},
"error": {
"code": "<string>",
"message": "<string>"
},
"instructions": "<string>",
"reasoning": {},
"text": {},
"tools": [
{
"type": "function",
"name": "<string>",
"description": "<string>",
"parameters": {},
"strict": true
}
],
"tool_choice": "auto",
"max_output_tokens": 123,
"temperature": 123,
"top_p": 123,
"parallel_tool_calls": true,
"service_tier": "<string>",
"store": true,
"background": true,
"previous_response_id": "<string>",
"conversation": {},
"prompt_cache_options": {
"mode": "implicit",
"ttl": "5m"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}https://direct.evolink.ai,对文本模型支持更好,支持长连接;https://api.evolink.ai 是多模态主力地址,对文本模型作为备用地址使用。授权
##所有接口均需要使用 Bearer Token 进行认证##
获取 API Key:
访问 API Key 管理页面 获取您的 API Key
使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY
请求体
使用 kimi-k3.1-pro 或 kimi-k3.1-pro-highspeed;Highspeed 提供更快的生成速度。
kimi-k3.1-pro, kimi-k3.1-pro-highspeed 本次请求的输入。传字符串等价于一条 user 消息;传数组时按顺序给出带类型的 item,可包含历史对话、工具调用与工具结果。
顶层系统指令,作为最靠前的指令生效。
为 true 时以 SSE 事件流返回响应。
最大生成 Token 数,包含思考与最终回答;默认 131072,最大 1048576,同时受剩余上下文限制。
1 <= x <= 1048576推理相关配置。
Show child attributes
Show child attributes
输出文本配置。
Show child attributes
Show child attributes
模型可调用的工具列表。
工具定义,按 type 区分。支持 function、custom(仅 apply_patch)、namespace 与 web_search,其他工具类型不支持。
- 函数工具
- 自定义工具
- 命名空间工具
- 联网搜索工具
Show child attributes
Show child attributes
控制工具调用行为。取 auto 时由模型自行决定是否调用工具。
auto 要额外返回的字段,仅在使用 web_search 工具时有效。web_search_call.action.sources 返回搜索命中的网页来源;web_search_call.results 返回图片搜索结果。
web_search_call.results, web_search_call.action.sources 上下文缓存写入选项。省略时默认自动写入 5m 缓存;写入、读取分别计费。
Show child attributes
Show child attributes
响应
响应创建成功
一次模型响应。
响应的唯一标识符。
"resp_68f0c1c2d3e4f5a6b7c8d9e0"
response 响应创建时的 Unix 时间戳。
响应结束时的 Unix 时间戳。status 为 completed 或 incomplete 时给出,为 in_progress 或 failed 时是 null。
响应状态。流式的起手快照为 in_progress。
in_progress, completed, incomplete, failed 产生本次响应的模型。
输出 item 数组,顺序为 web_search_call(如有)、reasoning、message、工具调用。
output 数组的元素,按 type 区分。
- 推理
- 消息
- 函数调用
- 自定义工具调用
- 联网搜索调用
Show child attributes
Show child attributes
input_tokens 包含缓存读写,普通输入需扣除 cached_tokens 和 cache_write_tokens;output_tokens 已包含思考。
Show child attributes
Show child attributes
status 为 incomplete 时给出原因。
Show child attributes
Show child attributes
status 为 failed 时给出错误信息。
Show child attributes
Show child attributes
工具定义,按 type 区分。支持 function、custom(仅 apply_patch)、namespace 与 web_search,其他工具类型不支持。
- 函数工具
- 自定义工具
- 命名空间工具
- 联网搜索工具
Show child attributes
Show child attributes
控制工具调用行为。取 auto 时由模型自行决定是否调用工具。
auto 固定为 false。
固定为 false。
固定为 null。
固定为 null。
服务端实际应用的上下文缓存写入选项。当请求省略 prompt_cache_options 时,以此处返回的 mode 和 ttl 为准
Show child attributes
Show child attributes