curl --request POST \
--url https://direct.evolink.ai/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kimi-k3.1-pro",
"max_tokens": 1024,
"output_config": {
"effort": "low"
},
"messages": [
{
"role": "user",
"content": "Reply with OK."
}
]
}
'{
"id": "<string>",
"type": "message",
"role": "assistant",
"model": "kimi-k3.1-pro",
"content": [
{
"type": "text",
"text": "<string>"
}
],
"stop_reason": "end_turn",
"stop_sequence": "<string>",
"usage": {
"input_tokens": 123,
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123,
"output_tokens": 123,
"output_tokens_details": {
"thinking_tokens": 123
},
"cache_creation": {
"ephemeral_5m_input_tokens": 1,
"ephemeral_1h_input_tokens": 1
},
"server_tool_use": {
"web_search_requests": 1
}
}
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
},
"request_id": "<string>"
}Kimi K3.1 Pro / Highspeed - Anthropic 兼容接口
对外路径 POST /v1/messages。思考档位放在 output_config.effort;顶层 cache_control 控制 5m/1h 写入。完整保留 thinking、signature、tool_use 和服务端搜索结果块。
curl --request POST \
--url https://direct.evolink.ai/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kimi-k3.1-pro",
"max_tokens": 1024,
"output_config": {
"effort": "low"
},
"messages": [
{
"role": "user",
"content": "Reply with OK."
}
]
}
'{
"id": "<string>",
"type": "message",
"role": "assistant",
"model": "kimi-k3.1-pro",
"content": [
{
"type": "text",
"text": "<string>"
}
],
"stop_reason": "end_turn",
"stop_sequence": "<string>",
"usage": {
"input_tokens": 123,
"cache_creation_input_tokens": 123,
"cache_read_input_tokens": 123,
"output_tokens": 123,
"output_tokens_details": {
"thinking_tokens": 123
},
"cache_creation": {
"ephemeral_5m_input_tokens": 1,
"ephemeral_1h_input_tokens": 1
},
"server_tool_use": {
"web_search_requests": 1
}
}
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
},
"request_id": "<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 本次生成允许使用的最大 Token 数,包含 thinking 与最终文本。
1 <= x <= 1048576Anthropic Messages 消息列表。多轮对话需原样回传完整 assistant 内容块。
1Show child attributes
Show child attributes
系统提示,可为字符串或 text 块数组
是否使用 Anthropic SSE 事件流返回。
自定义函数或服务端联网搜索。内置搜索使用 type=web_search_20250305、name=web_search;实际调用按次收费。
- Option 1
- Option 2
Show child attributes
Show child attributes
Show child attributes
Show child attributes
停用词,完全匹配时停止输出,匹配到的词本身不会被输出。最多 5 个,每个不超过 32 字节。
5仅顶层 cache_control 控制写入 TTL;消息块内的缓存标记不能代替此字段。省略时默认为 5m。
Show child attributes
Show child attributes
输出配置:推理强度与结构化输出
Show child attributes
Show child attributes
响应
Message 响应;流式请求返回 Anthropic SSE 事件流
message assistant "kimi-k3.1-pro"
Anthropic 内容块,可用于文本、图片、推理、工具调用或工具结果。
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
Show child attributes
Show child attributes
end_turn, max_tokens, tool_use, refusal, null Show child attributes
Show child attributes