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(모든 모델) - Chat Completions 전체 참조
OpenAI Chat Completions 형식으로 Kimi 모델을 호출하며 일반 JSON 및 SSE 스트리밍 응답을 지원합니다. 여러 턴의 대화에서는 assistant 메시지의 reasoning_content와 tool_calls를 모두 보존하세요.
웹 검색이 tool_calls를 반환하면 각 호출의 function.arguments를 동일한 tool_call_id를 가진 tool 메시지의 내용으로 다시 보내고 요청을 이어서 최종 답변을 생성하세요.
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이며 텍스트 모델과 장시간 연결을 더 잘 지원합니다. https://api.evolink.ai는 멀티모달 서비스의 기본 엔드포인트이자 텍스트 모델의 대체 주소입니다.인증
##모든 API에는 Bearer Token 인증이 필요합니다##
API Key 발급:
API Key 관리 페이지에서 API Key를 발급받으세요
요청 헤더에 추가:
Authorization: Bearer YOUR_API_KEY
본문
호출할 모델:
| 모델 ID | 특성 | 추론 강도 |
|---|---|---|
kimi-k3.1-pro | 최신 세대 모델(권장) | low / high / max, 기본값 max |
kimi-k3.1-pro-highspeed | Pro와 동일한 매개변수, 더 빠른 생성 | kimi-k3.1-pro와 동일 |
kimi-k3 | 이전 세대 모델 | max만 지원 |
세 모델 모두 컨텍스트 창은 1,048,576 tokens이며 추론이 항상 활성화됩니다.
캐시 쓰기 TTL(prompt_cache_options)은 K3.1 시리즈만 지원하며 kimi-k3는 이 매개변수를 지원하지 않습니다.
kimi-k3.1-pro, kimi-k3.1-pro-highspeed, kimi-k3 대화 메시지입니다. 여러 턴 대화에서는 과거 assistant 메시지 전체를 포함하세요.
1Show child attributes
Show child attributes
추론과 최종 답변을 포함한 최대 생성 토큰 수입니다. 기본값은 131072, 최대값은 1048576이며 남은 컨텍스트의 제한도 받습니다.
1 <= x <= 1048576추론 강도. 추론은 항상 활성화됩니다.
kimi-k3.1-pro/kimi-k3.1-pro-highspeed:low/high/max를 권장하며 기본값은max입니다. 범용 클라이언트 호환을 위해medium은high,xhigh는max,minimal/none은low로 처리합니다.none도 추론을 끄지 않습니다.kimi-k3:max만 지원합니다(기본값).
강도를 높이면 일반적으로 추론 토큰과 지연 시간이 증가합니다. 추론 토큰은 출력에 포함됩니다.
low, high, max, medium, xhigh, minimal, none 응답을 SSE 스트림으로 반환할지 여부입니다.
함수 도구 또는 웹 검색입니다. 검색은 {"type":"web_search"}로 선언합니다.
128- Option 1
- Option 2
Show child attributes
Show child attributes
모델이 도구를 호출할지 또는 특정 함수를 강제로 호출할지 제어합니다.
auto, none, required 컨텍스트 캐시 쓰기 옵션. kimi-k3.1-pro / kimi-k3.1-pro-highspeed만 지원하며 kimi-k3는 이 매개변수를 지원하지 않습니다. 생략하면 기본적으로 5m 캐시에 자동으로 기록합니다. 쓰기와 읽기는 별도로 과금됩니다.
Show child attributes
Show child attributes
출력 형식입니다. text는 일반 텍스트, json_object는 JSON 객체, json_schema는 지정한 JSON Schema를 따르는 구조화 출력입니다.
Show child attributes
Show child attributes
이전 클라이언트용 출력 제한 별칭입니다. 새 요청에는 max_completion_tokens를 사용하고 둘을 동시에 지정하지 마세요.
1 <= x <= 1048576샘플링 온도. 모델에서 1로 고정하므로 전달할 필요가 없습니다. kimi-k3.1-pro / kimi-k3.1-pro-highspeed는 이 필드를 자동으로 무시하며 kimi-k3는 지원하지 않는 값에 대해 오류를 반환합니다.
핵 샘플링 임계값. 모델에서 0.95로 고정하므로 전달할 필요가 없습니다. kimi-k3.1-pro / kimi-k3.1-pro-highspeed는 이 필드를 자동으로 무시하며 kimi-k3는 지원하지 않는 값에 대해 오류를 반환합니다.