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": "Explain context caching in one sentence."
}
]
}
'{
"id": "chatcmpl-6adc72a2823cc13b156bf863",
"object": "chat.completion",
"created": 1792832163,
"model": "kimi-k3.1-pro",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Context caching stores repeated prefix content from requests so that later cache hits can be processed faster and at lower cost.",
"reasoning_content": "The user wants a one-sentence explanation of context caching, including what it stores and its benefits."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 24,
"completion_tokens": 96,
"total_tokens": 120,
"prompt_tokens_details": {
"cached_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 62
}
}
}{
"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 Quickstart
- Call Kimi models through the OpenAI Chat Completions protocol and select a model with
model - Only
modelandmessagesare required - All three models have a context window of 1,048,576 tokens and a default maximum output of 131,072 tokens
- Reasoning is always enabled for all three models and returned in
reasoning_content; reasoning tokens count toward output - For tool calling, web search, structured output, image input, or cache settings, see the full reference
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": "Explain context caching in one sentence."
}
]
}
'{
"id": "chatcmpl-6adc72a2823cc13b156bf863",
"object": "chat.completion",
"created": 1792832163,
"model": "kimi-k3.1-pro",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Context caching stores repeated prefix content from requests so that later cache hits can be processed faster and at lower cost.",
"reasoning_content": "The user wants a one-sentence explanation of context caching, including what it stores and its benefits."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 24,
"completion_tokens": 96,
"total_tokens": 120,
"prompt_tokens_details": {
"cached_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 62
}
}
}{
"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.reasoning_content. Reasoning tokens count toward output. Avoid setting max_completion_tokens too low: reasoning may exhaust the output budget before any answer text is produced.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 |
|---|---|
kimi-k3.1-pro | Latest-generation model (recommended) |
kimi-k3.1-pro-highspeed | Same parameters as Pro, faster generation |
kimi-k3 | Previous-generation model |
All three models have a context window of 1,048,576 tokens and always have reasoning enabled.
kimi-k3.1-pro, kimi-k3.1-pro-highspeed, kimi-k3 Conversation messages. Include historical messages in order for multi-turn conversations; see the full reference for how to return reasoning and tool-call history.
1Show child attributes
Show child attributes
Reasoning effort, default max. kimi-k3 supports only max; see the full reference for other compatible values.
low, high, max Maximum generated tokens, including reasoning and the final answer; default 131072, maximum 1048576.
1 <= x <= 1048576Whether to return the response as an SSE stream.
Response
Conversation generated successfully; streaming requests return an SSE event stream
Response ID.
"chatcmpl-6adc72a2823cc13b156bf863"
chat.completion "chat.completion"
Creation time as a Unix timestamp in seconds.
1792832163
Model used for this call.
"kimi-k3.1-pro"
Show child attributes
Show child attributes
Show child attributes
Show child attributes