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 API (All Models) - Chat Completions Full Reference
Call Kimi models in OpenAI Chat Completions format, with regular JSON or SSE streaming responses. In multi-turn conversations, preserve the complete reasoning_content and tool_calls in assistant messages.
When web search returns tool_calls, send each call’s function.arguments back as the content of a tool message with the same tool_call_id, then continue the request to generate the final answer.
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, 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.
Cache write TTL (prompt_cache_options) is supported only by the K3.1 series; kimi-k3 does not support this parameter.
kimi-k3.1-pro, kimi-k3.1-pro-highspeed, kimi-k3 Conversation messages. For multi-turn conversations, include complete historical assistant messages.
1Show child attributes
Show child attributes
Maximum generated tokens, including reasoning and the final answer. Default: 131072; maximum: 1048576, also limited by the remaining context.
1 <= x <= 1048576Reasoning effort. Reasoning is always enabled.
kimi-k3.1-pro/kimi-k3.1-pro-highspeed:low/high/maxare recommended; defaultmax. For generic client compatibility,mediummaps tohigh,xhightomax, andminimal/nonetolow;nonedoes not disable reasoning.kimi-k3: onlymaxis supported (default).
Higher effort typically increases reasoning tokens and latency. Reasoning tokens count toward output.
low, high, max, medium, xhigh, minimal, none Whether to return the response as an SSE stream.
Function tools or web search. Declare search with {"type":"web_search"}.
128- Option 1
- Option 2
Show child attributes
Show child attributes
Controls whether the model calls tools or forces a specific function call.
auto, none, required Context cache write options, supported only by kimi-k3.1-pro / kimi-k3.1-pro-highspeed; kimi-k3 does not support this parameter. When omitted, a 5m cache is written automatically by default. Writes and reads are billed separately.
Show child attributes
Show child attributes
Output format: text for plain text, json_object for a JSON object, or json_schema for structured output following a JSON Schema.
Show child attributes
Show child attributes
Legacy output-limit alias. Use max_completion_tokens for new requests; avoid setting both.
1 <= x <= 1048576Sampling 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.