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>"
}
}Chat Completions API
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
POST
/
v1
/
chat
/
completions
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>"
}
}BaseURL: The default BaseURL is
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 is always enabled for Kimi models and returned in
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
application/json
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.
Available options:
kimi-k3.1-pro, kimi-k3.1-pro-highspeed, kimi-k3 Response
Conversation generated successfully; streaming requests return an SSE event stream