> ## Documentation Index
> Fetch the complete documentation index at: https://evolink.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Kimi API(모든 모델) - Chat Completions 빠른 시작

> - OpenAI Chat Completions 프로토콜로 Kimi 모델을 호출하고 `model`로 모델을 선택합니다
- `model`과 `messages`만 필요합니다
- 세 모델 모두 컨텍스트 창은 1,048,576 tokens이며 기본 최대 출력은 131,072 tokens입니다
- 세 모델 모두 추론이 항상 활성화되며 `reasoning_content`로 반환됩니다. 추론 토큰은 출력에 포함됩니다
- 도구 호출, 웹 검색, 구조화된 출력, 이미지 입력, 캐시 설정은 [전체 참조](/ko/api-manual/language-series/kimi/chat-completions/chat-completions-reference)를 확인하세요

> [!NOTE]
>
> **BaseURL**: 기본 BaseURL은 `https://direct.evolink.ai`이며 텍스트 모델과 장시간 연결을 더 잘 지원합니다. `https://api.evolink.ai`는 멀티모달 서비스의 기본 엔드포인트이자 텍스트 모델의 대체 주소입니다.

> [!NOTE]
>
> **Kimi 모델은 추론이 항상 활성화**되며 `reasoning_content`로 반환됩니다. 추론 토큰은 출력에 포함됩니다. `max_completion_tokens`를 너무 작게 설정하면 추론 중 출력 예산을 모두 사용하여 응답 본문이 없을 수 있습니다.


## OpenAPI

````yaml ko/api-manual/language-series/kimi/chat-completions/chat-completions-quickstart.json POST /v1/chat/completions
openapi: 3.1.0
info:
  title: Kimi API(모든 모델) - Chat Completions 빠른 시작
  description: >-
    OpenAI 호환 Chat Completions 프로토콜로 Kimi 텍스트 모델을 호출하는 빠른 시작 예제입니다. `model` 및
    `messages`만으로 대화를 시작할 수 있습니다. 도구 호출, 웹 검색, 구조화된 출력, 이미지 입력 등은 「전체 참조」 페이지를
    확인하세요.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://direct.evolink.ai
    description: 프로덕션(권장)
  - url: https://api.evolink.ai
    description: 대체 URL
security:
  - bearerAuth: []
tags:
  - name: Chat Completions
    description: OpenAI Chat Completions 호환 API
paths:
  /v1/chat/completions:
    post:
      tags:
        - Chat Completions
      summary: Kimi 빠른 채팅(모든 모델)
      description: >-
        - OpenAI Chat Completions 프로토콜로 Kimi 모델을 호출하고 `model`로 모델을 선택합니다

        - `model`과 `messages`만 필요합니다

        - 세 모델 모두 컨텍스트 창은 1,048,576 tokens이며 기본 최대 출력은 131,072 tokens입니다

        - 세 모델 모두 추론이 항상 활성화되며 `reasoning_content`로 반환됩니다. 추론 토큰은 출력에 포함됩니다

        - 도구 호출, 웹 검색, 구조화된 출력, 이미지 입력, 캐시 설정은 [전체
        참조](/ko/api-manual/language-series/kimi/chat-completions/chat-completions-reference)를
        확인하세요
      operationId: kimiChatCompletionsQuick
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionQuickRequest'
            examples:
              simple:
                summary: Pro 최소 요청
                value:
                  model: kimi-k3.1-pro
                  messages:
                    - role: user
                      content: 컨텍스트 캐시를 한 문장으로 설명해 주세요.
              highspeed:
                summary: 낮은 추론 강도의 Highspeed
                value:
                  model: kimi-k3.1-pro-highspeed
                  messages:
                    - role: user
                      content: 컨텍스트 캐시를 한 문장으로 설명해 주세요.
                  reasoning_effort: low
              k3:
                summary: Kimi K3 최소 요청
                value:
                  model: kimi-k3
                  messages:
                    - role: user
                      content: 컨텍스트 캐시를 한 문장으로 설명해 주세요.
              multi_turn:
                summary: 시스템 프롬프트와 여러 턴의 대화
                value:
                  model: kimi-k3.1-pro
                  messages:
                    - role: system
                      content: 당신은 꼼꼼한 기술 편집자입니다. 간결하게 답하세요.
                    - role: user
                      content: 컨텍스트 캐시란 무엇인가요?
                    - role: assistant
                      content: >-
                        컨텍스트 캐시는 요청에서 반복되는 접두사 내용을 저장하여 이후 요청이 캐시에 적중하면 더 빠르고
                        저렴하게 처리할 수 있게 합니다.
                    - role: user
                      content: 어떤 용도에 적합한가요?
                  reasoning_effort: low
              streaming:
                summary: SSE 스트리밍 출력
                value:
                  model: kimi-k3.1-pro
                  messages:
                    - role: user
                      content: 여름밤에 관한 네 줄의 짧은 시를 써 주세요.
                  reasoning_effort: low
                  max_completion_tokens: 2048
                  stream: true
      responses:
        '200':
          description: 대화 생성 성공. 스트리밍 요청은 SSE 이벤트 스트림을 반환합니다
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponse'
            text/event-stream:
              schema:
                type: string
                description: 'OpenAI Chat Completions 형식의 SSE 데이터이며 `data: [DONE]`으로 끝납니다.'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    ChatCompletionQuickRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          type: string
          enum:
            - kimi-k3.1-pro
            - kimi-k3.1-pro-highspeed
            - kimi-k3
          default: kimi-k3.1-pro
          description: |-
            호출할 모델:

            | 모델 ID | 특성 |
            |---|---|
            | `kimi-k3.1-pro` | 최신 세대 모델(권장) |
            | `kimi-k3.1-pro-highspeed` | Pro와 동일한 매개변수, 더 빠른 생성 |
            | `kimi-k3` | 이전 세대 모델 |

            세 모델 모두 컨텍스트 창은 1,048,576 tokens이며 추론이 항상 활성화됩니다.
        messages:
          type: array
          minItems: 1
          description: >-
            대화 메시지. 여러 턴의 대화에서는 이전 메시지를 순서대로 포함하세요. 추론과 도구 호출 기록을 다시 보내는 방법은 전체
            참조를 확인하세요.
          items:
            $ref: '#/components/schemas/MessageSimple'
        reasoning_effort:
          type: string
          enum:
            - low
            - high
            - max
          default: max
          description: 추론 강도. 기본값은 `max`입니다. `kimi-k3`는 `max`만 지원하며 다른 호환 값은 전체 참조를 확인하세요.
        max_completion_tokens:
          type: integer
          minimum: 1
          maximum: 1048576
          default: 131072
          description: 추론과 최종 답변을 포함한 최대 생성 토큰 수. 기본값 131072, 최댓값 1048576.
        stream:
          type: boolean
          default: false
          description: 응답을 SSE 스트림으로 반환할지 여부입니다.
    ChatCompletionResponse:
      type: object
      properties:
        id:
          type: string
          description: 응답 ID.
          example: chatcmpl-6adc72a2823cc13b156bf863
        object:
          type: string
          enum:
            - chat.completion
          example: chat.completion
        created:
          type: integer
          description: 생성 시각. Unix 타임스탬프(초).
          example: 1792832163
        model:
          type: string
          description: 이번 호출에 사용한 모델.
          example: kimi-k3.1-pro
        choices:
          type: array
          items:
            $ref: '#/components/schemas/Choice'
        usage:
          $ref: '#/components/schemas/Usage'
    MessageSimple:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - system
            - user
            - assistant
          description: '메시지 역할: `system`은 시스템 프롬프트, `user`는 사용자 입력, `assistant`는 이전 답변입니다.'
        content:
          type: string
          description: 메시지 내용(일반 텍스트).
          example: 컨텍스트 캐시를 한 문장으로 설명해 주세요.
    Choice:
      type: object
      properties:
        index:
          type: integer
          example: 0
        message:
          $ref: '#/components/schemas/AssistantMessage'
        finish_reason:
          type: string
          enum:
            - stop
            - length
            - tool_calls
          description: >-
            종료 사유: `stop`은 자연스러운 종료, `length`는 출력 한도 도달, `tool_calls`는 모델의 도구 호출
            요청입니다.
          example: stop
    Usage:
      type: object
      properties:
        prompt_tokens:
          type: integer
          description: 캐시 적중분을 포함한 전체 입력 토큰.
          example: 24
        completion_tokens:
          type: integer
          description: 추론 토큰을 포함한 출력 토큰.
          example: 96
        total_tokens:
          type: integer
          description: 입력과 출력 tokens의 합계입니다.
          example: 120
        prompt_tokens_details:
          type: object
          properties:
            cached_tokens:
              type: integer
              description: 캐시에서 제공된 입력 tokens입니다.
              example: 0
        completion_tokens_details:
          type: object
          properties:
            reasoning_tokens:
              type: integer
              description: 추론 tokens이며 completion_tokens에 이미 포함되어 있습니다.
              example: 62
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type:
                - string
                - 'null'
    AssistantMessage:
      type: object
      properties:
        role:
          type: string
          enum:
            - assistant
          example: assistant
        content:
          type:
            - string
            - 'null'
          description: 최종 답변.
          example: >-
            컨텍스트 캐시는 요청에서 반복되는 접두사 내용을 저장하여 이후 요청이 캐시에 적중하면 더 빠르고 저렴하게 처리할 수 있게
            합니다.
        reasoning_content:
          type: string
          description: 추론 내용. 여러 턴의 대화에서는 전체 assistant 메시지와 함께 다시 전송하세요.
          example: 사용자는 컨텍스트 캐시가 저장하는 내용과 장점을 한 문장으로 알고 싶어 합니다.
  responses:
    BadRequest:
      description: 잘못된 요청 매개변수
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: API Key가 없거나 유효하지 않습니다
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: 요청 한도 초과 또는 할당량 부족
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: 내부 서비스 오류
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##모든 API에는 Bearer Token 인증이 필요합니다##

        **API Key 발급:**

        [API Key 관리 페이지](https://evolink.ai/dashboard/keys)에서 API Key를 발급받으세요

        **요청 헤더에 추가:**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.