curl --request POST \
--url https://direct.evolink.ai/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kimi-k3",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "请用三句话介绍 Kimi K3。"
}
]
}
'{
"id": "<string>",
"type": "message",
"role": "assistant",
"model": "kimi-k3",
"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
}
}
}{
"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>"
}Messages API
Kimi K3 - Anthropic 兼容接口
使用 Anthropic Messages 协议调用 kimi-k3。支持非流式 JSON 与 Anthropic SSE 事件流。
POST
/
v1
/
messages
curl --request POST \
--url https://direct.evolink.ai/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kimi-k3",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "请用三句话介绍 Kimi K3。"
}
]
}
'{
"id": "<string>",
"type": "message",
"role": "assistant",
"model": "kimi-k3",
"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
}
}
}{
"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>"
}BaseURL 说明:默认 BaseURL 为
https://direct.evolink.ai,对文本模型支持更好,支持长连接;https://api.evolink.ai 是多模态主力地址,对文本模型作为备用地址使用。授权
##所有接口均需要使用 Bearer Token 进行认证##
获取 API Key:
访问 API Key 管理页面 获取您的 API Key
使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY
请求体
application/json
模型 ID。
可用选项:
kimi-k3 本次生成允许使用的最大 Token 数,包含 thinking 与最终文本。
必填范围:
x >= 1Anthropic Messages 消息列表。多轮对话需原样回传完整 assistant 内容块。
Minimum array length:
1Show child attributes
Show child attributes
系统提示词。Messages 协议使用顶层 system,不使用 system role。
是否使用 Anthropic SSE 事件流返回。
模型可调用的工具列表。
Show child attributes
Show child attributes
Show child attributes
Show child attributes
响应
Message 响应;流式请求返回 Anthropic SSE 事件流
可用选项:
message 可用选项:
assistant 示例:
"kimi-k3"
Anthropic 内容块,可用于文本、图片、推理、工具调用或工具结果。
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Show child attributes
Show child attributes
可用选项:
end_turn, max_tokens, tool_use Show child attributes
Show child attributes