curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kimi-k3.1-pro",
"messages": [
{
"role": "user",
"content": "Reply with OK."
}
],
"reasoning_effort": "low",
"max_completion_tokens": 1024
}
'{
"id": "<string>",
"object": "chat.completion",
"created": 123,
"model": "kimi-k3.1-pro",
"choices": [
{
"index": 123,
"message": {
"role": "system",
"content": "<string>",
"reasoning_content": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"tool_call_id": "<string>"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"prompt_tokens_details": {
"cached_tokens": 123,
"cache_write_tokens": 1
},
"completion_tokens_details": {
"reasoning_tokens": 123
}
}
}{
"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 - OpenAI 兼容接口
使用 OpenAI Chat Completions 格式调用两款模型,支持普通 JSON 和 SSE 流式响应。多轮对话请完整保留 assistant 消息中的 reasoning_content 和 tool_calls。
联网搜索返回 tool_calls 时,将每个调用的 function.arguments 作为相同 tool_call_id 的 tool 消息内容回传,继续请求以生成最终回答。
curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kimi-k3.1-pro",
"messages": [
{
"role": "user",
"content": "Reply with OK."
}
],
"reasoning_effort": "low",
"max_completion_tokens": 1024
}
'{
"id": "<string>",
"object": "chat.completion",
"created": 123,
"model": "kimi-k3.1-pro",
"choices": [
{
"index": 123,
"message": {
"role": "system",
"content": "<string>",
"reasoning_content": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
],
"tool_call_id": "<string>"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123,
"prompt_tokens_details": {
"cached_tokens": 123,
"cache_write_tokens": 1
},
"completion_tokens_details": {
"reasoning_tokens": 123
}
}
}{
"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 对话消息。多轮对话需完整回传历史 assistant message。
1Show child attributes
Show child attributes
最大生成 Token 数,包含思考与最终回答;默认 131072,最大 1048576,同时受剩余上下文限制。
1 <= x <= 1048576思考强度。推荐 low / high / max,默认 max;模型始终思考。兼容通用客户端:medium 按 high,xhigh 按 max,minimal / none 按 low 处理;none 不会关闭思考。提高强度通常增加推理 Token 和延迟,思考 Token 计入输出。
low, high, max, medium, xhigh, minimal, none 是否使用 SSE 流式返回。
函数工具或联网搜索工具。联网搜索使用 {"type":"web_search"}。
128- Option 1
- Option 2
Show child attributes
Show child attributes
控制模型是否调用工具,或强制调用指定函数。
auto, none, required 上下文缓存写入选项。省略时默认自动写入 5m 缓存;写入、读取分别计费。
Show child attributes
Show child attributes
输出格式:text 为普通文本,json_object 返回 JSON 对象,json_schema 按指定的 JSON Schema 生成结构化结果。
Show child attributes
Show child attributes
兼容旧客户端的输出上限别名;新请求使用 max_completion_tokens,避免同时设置。
1 <= x <= 1048576