> ## 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(모든 모델) - Messages 빠른 시작

> - Anthropic Messages 프로토콜로 Kimi 모델을 호출하고 `model`로 모델을 선택합니다
- `model`, `max_tokens`, `messages`만 필요합니다(Anthropic 프로토콜에서 `max_tokens`는 필수)
- 세 모델 모두 컨텍스트 창은 1,048,576 tokens입니다
- 세 모델 모두 추론이 항상 활성화되며 강도는 `output_config.effort`로 설정합니다
- 도구 호출, 웹 검색, 이미지 입력, 구조화된 출력, 캐시 설정은 [전체 참조](/ko/api-manual/language-series/kimi/messages/messages-reference)를 확인하세요

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

> [!NOTE]
>
> **Kimi 모델은 추론이 항상 활성화**됩니다. 응답의 `content`에는 보통 `type="thinking"` 블록이 포함되며 출력 토큰에 반영됩니다. `max_tokens`를 너무 작게 설정하면 추론 중 출력 예산을 모두 사용하여 응답 본문이 없을 수 있습니다.


## OpenAPI

````yaml ko/api-manual/language-series/kimi/messages/messages-quickstart.json POST /v1/messages
openapi: 3.1.0
info:
  title: Kimi API(모든 모델) - Messages 빠른 시작
  description: >-
    Anthropic Messages 프로토콜로 Kimi 텍스트 모델을 호출하는 빠른 시작 예제입니다. `model`,
    `max_tokens` 및 `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: Messages
    description: Anthropic Messages 호환 API
paths:
  /v1/messages:
    post:
      tags:
        - Messages
      summary: Kimi 빠른 채팅(모든 모델, Anthropic 호환)
      description: >-
        - Anthropic Messages 프로토콜로 Kimi 모델을 호출하고 `model`로 모델을 선택합니다

        - `model`, `max_tokens`, `messages`만 필요합니다(Anthropic 프로토콜에서
        `max_tokens`는 필수)

        - 세 모델 모두 컨텍스트 창은 1,048,576 tokens입니다

        - 세 모델 모두 추론이 항상 활성화되며 강도는 `output_config.effort`로 설정합니다

        - 도구 호출, 웹 검색, 이미지 입력, 구조화된 출력, 캐시 설정은 [전체
        참조](/ko/api-manual/language-series/kimi/messages/messages-reference)를
        확인하세요
      operationId: kimiMessagesQuick
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMessageQuickRequest'
            examples:
              simple:
                summary: Pro 최소 요청
                value:
                  model: kimi-k3.1-pro
                  max_tokens: 2048
                  messages:
                    - role: user
                      content: 컨텍스트 캐시를 한 문장으로 설명해 주세요.
              highspeed:
                summary: 낮은 추론 강도의 Highspeed
                value:
                  model: kimi-k3.1-pro-highspeed
                  max_tokens: 2048
                  output_config:
                    effort: low
                  messages:
                    - role: user
                      content: 컨텍스트 캐시를 한 문장으로 설명해 주세요.
              k3:
                summary: Kimi K3 최소 요청
                value:
                  model: kimi-k3
                  max_tokens: 2048
                  messages:
                    - role: user
                      content: 컨텍스트 캐시를 한 문장으로 설명해 주세요.
              multi_turn:
                summary: 시스템 프롬프트와 여러 턴의 대화
                value:
                  model: kimi-k3.1-pro
                  max_tokens: 2048
                  output_config:
                    effort: low
                  system: 당신은 꼼꼼한 기술 편집자입니다. 간결하게 답하세요.
                  messages:
                    - role: user
                      content: 컨텍스트 캐시란 무엇인가요?
                    - role: assistant
                      content: >-
                        컨텍스트 캐시는 요청에서 반복되는 접두사 내용을 저장하여 이후 요청이 캐시에 적중하면 더 빠르고
                        저렴하게 처리할 수 있게 합니다.
                    - role: user
                      content: 어떤 용도에 적합한가요?
              streaming:
                summary: Anthropic SSE 스트리밍
                value:
                  model: kimi-k3.1-pro
                  max_tokens: 2048
                  output_config:
                    effort: low
                  stream: true
                  messages:
                    - role: user
                      content: 여름밤에 관한 네 줄의 짧은 시를 써 주세요.
      responses:
        '200':
          description: Message 응답입니다. 스트리밍 요청은 Anthropic SSE 이벤트 스트림을 반환합니다
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
            text/event-stream:
              schema:
                type: string
                description: >-
                  일반적인 이벤트 순서는 message_start, content_block_*, message_delta,
                  message_stop입니다.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    CreateMessageQuickRequest:
      type: object
      required:
        - model
        - max_tokens
        - 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이며 추론이 항상 활성화됩니다.
        max_tokens:
          type: integer
          minimum: 1
          maximum: 1048576
          description: >-
            이번 생성에 허용된 최대 토큰 수. thinking과 최종 텍스트를 포함합니다. 값이 너무 작으면 추론 중 출력 예산을
            모두 사용하여 본문이 없을 수 있습니다. 최소 1024를 권장하며 작업 복잡도에 따라 늘리세요.
        messages:
          type: array
          minItems: 1
          description: >-
            대화 메시지. 여러 턴의 대화에서는 이전 메시지를 순서대로 포함하세요. 추론과 도구 호출 기록을 다시 보내는 방법은 전체
            참조를 확인하세요.
          items:
            $ref: '#/components/schemas/MessageSimple'
        system:
          type: string
          description: system 프롬프트입니다. Messages 프로토콜은 system 역할 대신 최상위 system 필드를 사용합니다.
        output_config:
          type: object
          description: 출력 설정.
          properties:
            effort:
              type: string
              enum:
                - low
                - high
                - max
              default: max
              description: >-
                추론 강도. 기본값은 `max`입니다. `kimi-k3`는 `max`만 지원하며 다른 호환 값은 전체 참조를
                확인하세요.
        stream:
          type: boolean
          default: false
          description: Anthropic SSE 이벤트 스트림 반환 여부입니다.
    MessageResponse:
      type: object
      properties:
        id:
          type: string
          description: 응답 ID.
          example: chatcmpl-6adc72c2b5847b4b2ccb39fd
        type:
          type: string
          enum:
            - message
          example: message
        role:
          type: string
          enum:
            - assistant
          example: assistant
        model:
          type: string
          description: 이번 호출에 사용한 모델.
          example: kimi-k3.1-pro
        content:
          type: array
          description: 출력 콘텐츠 블록. 보통 thinking 다음에 text가 옵니다.
          items:
            $ref: '#/components/schemas/OutputContentBlock'
        stop_reason:
          type:
            - string
            - 'null'
          enum:
            - end_turn
            - max_tokens
            - tool_use
            - null
          description: >-
            중지 사유: `end_turn`은 자연스러운 종료, `max_tokens`는 출력 한도 도달, `tool_use`는 모델의
            도구 호출 요청입니다.
          example: end_turn
        usage:
          $ref: '#/components/schemas/MessageUsage'
    MessageSimple:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - user
            - assistant
          description: 메시지 역할입니다. user와 assistant만 지원합니다.
        content:
          type: string
          description: 메시지 내용(일반 텍스트).
          example: 컨텍스트 캐시를 한 문장으로 설명해 주세요.
    OutputContentBlock:
      type: object
      properties:
        type:
          type: string
          enum:
            - thinking
            - text
          example: text
        thinking:
          type: string
          description: '`type=thinking`일 때의 추론 내용. 여러 턴의 대화에서는 signature와 함께 변경 없이 다시 전송하세요.'
        signature:
          type: string
          description: '`type=thinking`일 때의 서명. 여러 턴의 대화에서 변경 없이 다시 전송하세요.'
        text:
          type: string
          description: '`type=text`일 때의 답변 텍스트.'
          example: >-
            컨텍스트 캐시는 요청에서 반복되는 접두사 내용을 저장하여 이후 요청이 캐시에 적중하면 더 빠르고 저렴하게 처리할 수 있게
            합니다.
    MessageUsage:
      type: object
      properties:
        input_tokens:
          type: integer
          description: 일반 입력 토큰. 캐시 읽기와 쓰기는 제외되어 있습니다.
          example: 24
        cache_read_input_tokens:
          type: integer
          description: 캐시에서 제공된 입력 tokens입니다.
          example: 0
        cache_creation_input_tokens:
          type: integer
          description: 캐시에 기록된 입력 tokens입니다.
          example: 0
        output_tokens:
          type: integer
          description: thinking tokens를 포함한 출력 tokens입니다.
          example: 96
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          enum:
            - error
        error:
          type: object
          properties:
            type:
              type: string
            message:
              type: string
        request_id:
          type: string
  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.