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-Compatible API
Public endpoint: POST /v1/messages. Set reasoning effort in output_config.effort and the 5m/1h write TTL in top-level cache_control. Preserve thinking, signature, tool_use, and server search-result blocks in full.
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, which has better support for text models and long-lived connections. https://api.evolink.ai is the primary endpoint for multimodal services and serves as a fallback address for text models.Authorizations
##All APIs require Bearer Token authentication##
Get API Key:
Visit the API Key Management Page to obtain your API Key
Add to request header:
Authorization: Bearer YOUR_API_KEY
Body
Use kimi-k3.1-pro or kimi-k3.1-pro-highspeed; Highspeed offers faster generation.
kimi-k3.1-pro, kimi-k3.1-pro-highspeed Maximum number of tokens allowed for this generation, including thinking and final text.
1 <= x <= 1048576Anthropic Messages message list. For multi-turn conversations, return complete assistant content blocks unchanged.
1Show child attributes
Show child attributes
System prompt as a string or array of text blocks.
Whether to return an Anthropic SSE event stream.
Custom functions or server-side web search. Built-in search uses type=web_search_20250305 and name=web_search; billed per actual call.
- Option 1
- Option 2
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Stop sequences: an exact match stops generation and is omitted from output. At most 5 sequences, each no longer than 32 bytes.
5Only top-level cache_control controls the write TTL; cache markers inside message blocks do not replace it. Default when omitted: 5m.
Show child attributes
Show child attributes
Output configuration: reasoning effort and structured output.
Show child attributes
Show child attributes
Response
Message response; streaming requests return an Anthropic SSE event stream
message assistant "kimi-k3.1-pro"
Anthropic content block for text, image, reasoning, tool use, or a tool result.
- 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