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 API (All Models) - Messages Full Reference
Public endpoint: POST /v1/messages. Set reasoning effort with output_config.effort. Top-level cache_control controls 5m/1h cache writes (K3.1 series only). Preserve all thinking, signature, tool_use, and server-side search result blocks.
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 API Key Management Page to get your API Key
Add to request header:
Authorization: Bearer YOUR_API_KEY
Body
Model to call:
| Model ID | Positioning | Reasoning effort |
|---|---|---|
kimi-k3.1-pro | Latest-generation model (recommended) | low / high / max, default max |
kimi-k3.1-pro-highspeed | Same parameters as Pro, faster generation | Same as kimi-k3.1-pro |
kimi-k3 | Previous-generation model | Only max |
All three models have a context window of 1,048,576 tokens and always have reasoning enabled.
Structured output (output_config.format), stop sequences (stop_sequences), and cache write TTL (cache_control) are supported only by the K3.1 series, not by kimi-k3. Responses from kimi-k3 may contain only text blocks without thinking blocks.
kimi-k3.1-pro, kimi-k3.1-pro-highspeed, kimi-k3 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. Output stops on an exact match, and the matched sequence itself is omitted. Up to 5 sequences, each no more than 32 bytes. On a match, stop_reason is end_turn and stop_sequence is null.
Supported only by kimi-k3.1-pro / kimi-k3.1-pro-highspeed; kimi-k3 does not support this parameter.
5Top-level cache write options, supported only by kimi-k3.1-pro / kimi-k3.1-pro-highspeed; kimi-k3 does not support this parameter. Only top-level cache_control controls the write TTL; cache markers inside message blocks cannot replace this field. Defaults to 5m when omitted.
Show child attributes
Show child attributes
Output configuration: reasoning effort and structured output.
Show child attributes
Show child attributes
Sampling temperature, fixed by the model at 1; omit this field. kimi-k3.1-pro / kimi-k3.1-pro-highspeed automatically ignore it; kimi-k3 returns an error for unsupported values.
Nucleus sampling threshold, fixed by the model at 0.95; omit this field. kimi-k3.1-pro / kimi-k3.1-pro-highspeed automatically ignore it; kimi-k3 returns an error for unsupported values.
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