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 K3.1 Pro / Highspeed - OpenAI-Compatible API
Call either model using the OpenAI Chat Completions format, with JSON or SSE streaming responses. Preserve the assistant’s complete reasoning_content and tool_calls across turns.
When web search returns tool_calls, send each call’s function.arguments as the content of a tool message with the matching tool_call_id, then request 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 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 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: low / high / max are recommended; default: max. Reasoning is always enabled. Client aliases: medium maps to high, xhigh to max, minimal / none to low. none does not disable reasoning. Higher effort usually increases reasoning tokens and latency. Reasoning tokens count as 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. If omitted, automatically writes to the 5m cache. 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 <= 1048576