> ## 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 K3.1 Pro / Highspeed - OpenAI 호환 API

> OpenAI Chat Completions 형식으로 두 모델을 호출하며 JSON 또는 SSE 스트리밍 응답을 지원합니다. 멀티턴에서는 assistant 메시지의 reasoning_content와 tool_calls를 완전히 보존하세요.

웹 검색이 tool_calls를 반환하면 각 호출의 function.arguments를 해당 tool_call_id를 가진 tool 메시지의 내용으로 전달하고 최종 답변을 요청하세요.

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


## OpenAPI

````yaml ko/api-manual/language-series/kimi-k3.1-pro/kimi-k3.1-pro-chat.json POST /v1/chat/completions
openapi: 3.1.0
info:
  title: Kimi K3.1 Pro / Highspeed - OpenAI 호환 API
  description: >-
    OpenAI Chat Completions로 Kimi K3.1 Pro / Highspeed를 호출합니다. 모델 ID는
    `kimi-k3.1-pro` / `kimi-k3.1-pro-highspeed`입니다. 두 모델은 1,048,576 tokens 컨텍스트,
    멀티턴 대화, 스트리밍, 도구 호출, 웹 검색, 구조화 출력 및 컨텍스트 캐싱을 지원합니다.


    추론은 항상 활성화됩니다. `reasoning_effort`는 `low` / `high` / `max`를 지원하며 기본값은
    `max`입니다. 멀티턴에서는 추론 및 도구 호출 기록을 완전히 보존하세요.
  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 K3.1 Pro / Highspeed 채팅 API (OpenAI 호환)
      description: >-
        OpenAI Chat Completions 형식으로 두 모델을 호출하며 JSON 또는 SSE 스트리밍 응답을 지원합니다.
        멀티턴에서는 assistant 메시지의 reasoning_content와 tool_calls를 완전히 보존하세요.


        웹 검색이 tool_calls를 반환하면 각 호출의 function.arguments를 해당 tool_call_id를 가진
        tool 메시지의 내용으로 전달하고 최종 답변을 요청하세요.
      operationId: createChatCompletionKimiK31Pro
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
            examples:
              simple:
                summary: Pro 최소 요청
                value:
                  model: kimi-k3.1-pro
                  messages:
                    - role: user
                      content: Reply with OK.
                  reasoning_effort: low
                  max_completion_tokens: 1024
              highspeed:
                summary: Highspeed 최소 요청
                value:
                  model: kimi-k3.1-pro-highspeed
                  messages:
                    - role: user
                      content: Reply with OK.
                  reasoning_effort: low
                  max_completion_tokens: 1024
              streaming:
                summary: SSE 스트리밍
                value:
                  model: kimi-k3.1-pro
                  messages:
                    - role: user
                      content: Reply with OK.
                  reasoning_effort: low
                  max_completion_tokens: 1024
                  stream: true
              cache_1h:
                summary: 1h 캐시 자동 쓰기
                value:
                  model: kimi-k3.1-pro
                  messages:
                    - role: user
                      content: Reply with OK.
                  reasoning_effort: low
                  max_completion_tokens: 1024
                  prompt_cache_options:
                    mode: implicit
                    ttl: 1h
              web_search:
                summary: 웹 검색 (통합 형식)
                value:
                  model: kimi-k3.1-pro
                  messages:
                    - role: user
                      content: Use web search to find the official Kimi homepage URL.
                  reasoning_effort: low
                  max_completion_tokens: 1024
                  tools:
                    - type: web_search
              structured_output:
                summary: 엄격한 JSON Schema
                value:
                  model: kimi-k3.1-pro
                  messages:
                    - role: user
                      content: Return a JSON object with result equal to OK.
                  reasoning_effort: low
                  max_completion_tokens: 1024
                  response_format:
                    type: json_schema
                    json_schema:
                      name: result
                      strict: true
                      schema:
                        type: object
                        properties:
                          result:
                            type: string
                        required:
                          - result
                        additionalProperties: false
              function_calling:
                summary: Function Calling
                value:
                  model: kimi-k3.1-pro
                  messages:
                    - role: user
                      content: 오늘 베이징 날씨를 확인해 주세요.
                  tools:
                    - type: function
                      function:
                        name: get_weather
                        description: 지정된 도시의 날씨를 조회합니다
                        parameters:
                          type: object
                          properties:
                            city:
                              type: string
                              description: 도시 이름
                          required:
                            - city
                  tool_choice: auto
      responses:
        '200':
          description: Chat completion 응답입니다. 스트리밍 요청은 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:
    ChatCompletionRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          type: string
          enum:
            - kimi-k3.1-pro
            - kimi-k3.1-pro-highspeed
          default: kimi-k3.1-pro
          description: >-
            `kimi-k3.1-pro` 또는 `kimi-k3.1-pro-highspeed`를 사용하세요. Highspeed는 생성
            속도가 더 빠릅니다.
        messages:
          type: array
          minItems: 1
          description: 대화 메시지입니다. 여러 턴 대화에서는 과거 assistant 메시지 전체를 포함하세요.
          items:
            $ref: '#/components/schemas/ChatMessage'
        max_completion_tokens:
          type: integer
          minimum: 1
          maximum: 1048576
          default: 131072
          description: >-
            추론과 최종 답변을 포함한 최대 생성 토큰 수입니다. 기본값은 131072, 최대값은 1048576이며 남은 컨텍스트의
            제한도 받습니다.
        reasoning_effort:
          type: string
          enum:
            - low
            - high
            - max
            - medium
            - xhigh
            - minimal
            - none
          default: max
          description: >-
            추론 강도입니다. low / high / max를 권장하며 기본값은 max입니다. 추론은 항상 활성화됩니다. 호환용 값
            medium은 high, xhigh는 max, minimal / none은 low로 처리됩니다. none도 추론을 끄지
            않습니다. 강도가 높으면 보통 추론 토큰과 지연 시간이 늘어납니다. 추론 토큰은 출력에 포함됩니다.
        stream:
          type: boolean
          default: false
          description: 응답을 SSE 스트림으로 반환할지 여부입니다.
        tools:
          type: array
          maxItems: 128
          description: 함수 도구 또는 웹 검색입니다. 검색은 {"type":"web_search"}로 선언합니다.
          items:
            oneOf:
              - $ref: '#/components/schemas/FunctionTool'
              - $ref: '#/components/schemas/WebSearchTool'
        tool_choice:
          oneOf:
            - type: string
              enum:
                - auto
                - none
                - required
            - $ref: '#/components/schemas/NamedToolChoice'
          description: 모델이 도구를 호출할지 또는 특정 함수를 강제로 호출할지 제어합니다.
        prompt_cache_options:
          type: object
          description: 컨텍스트 캐시 쓰기 옵션입니다. 생략하면 5m 캐시에 자동으로 기록합니다. 쓰기와 읽기는 별도로 과금됩니다.
          properties:
            mode:
              type: string
              enum:
                - implicit
              default: implicit
            ttl:
              type: string
              enum:
                - 5m
                - 1h
              default: 5m
              description: 캐시 유효 기간은 5m 또는 1h이며 기본값은 5m입니다.
        response_format:
          type: object
          description: >-
            출력 형식입니다. text는 일반 텍스트, json_object는 JSON 객체, json_schema는 지정한 JSON
            Schema를 따르는 구조화 출력입니다.
          properties:
            type:
              type: string
              enum:
                - text
                - json_object
                - json_schema
              description: >-
                출력 형식입니다. text: 기본 일반 텍스트. json_object: 유효한 JSON 객체.
                json_schema: 지정한 스키마를 따르는 출력(권장, json_schema도 지정).
            json_schema:
              type: object
              description: type이 json_schema일 때 출력이 따라야 하는 JSON Schema입니다.
              properties:
                name:
                  type: string
                  description: 식별에 사용하는 스키마 이름입니다.
                strict:
                  type: boolean
                  default: true
                  description: 지정한 JSON Schema를 엄격히 따를지 여부이며 기본값은 true입니다.
                schema:
                  type: object
                  description: 출력 구조를 정의하는 JSON Schema입니다.
                  additionalProperties: true
              required:
                - name
                - schema
        max_tokens:
          type: integer
          minimum: 1
          maximum: 1048576
          deprecated: true
          description: >-
            이전 클라이언트용 출력 제한 별칭입니다. 새 요청에는 max_completion_tokens를 사용하고 둘을 동시에
            지정하지 마세요.
    ChatCompletionResponse:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          example: chat.completion
        created:
          type: integer
        model:
          type: string
          example: kimi-k3.1-pro
        choices:
          type: array
          items:
            type: object
            properties:
              index:
                type: integer
              message:
                $ref: '#/components/schemas/ChatMessage'
              finish_reason:
                type: string
                enum:
                  - stop
                  - length
                  - tool_calls
        usage:
          $ref: '#/components/schemas/ChatUsage'
    ChatMessage:
      type: object
      required:
        - role
      properties:
        role:
          type: string
          description: '메시지 역할: system, user, assistant 또는 tool.'
          enum:
            - system
            - user
            - assistant
            - tool
        content:
          description: >-
            메시지 내용입니다. 순수 텍스트는 문자열로 전달하며, 멀티모달 입력은 콘텐츠 블록 배열(텍스트 + 이미지 + 비디오)로
            전달합니다. 도구 호출 시 assistant content는 null일 수 있습니다.
          oneOf:
            - type: string
              description: 순수 텍스트 메시지 내용입니다.
            - type: array
              description: 멀티모달 콘텐츠 블록 배열입니다.
              items:
                $ref: '#/components/schemas/ContentPart'
            - type: 'null'
        reasoning_content:
          type: string
          description: >-
            assistant의 추론 내용입니다. 여러 턴 대화에서는 전체 assistant 메시지의 일부로 변경하지 말고 다시
            전달하세요.
        tool_calls:
          type: array
          description: assistant가 반환한 도구 호출입니다. 이후 도구 사용 턴에서 변경하지 말고 다시 전달하세요.
          items:
            $ref: '#/components/schemas/ToolCall'
        tool_call_id:
          type: string
          description: '`role=tool`일 때 대응하는 도구 호출 ID입니다.'
    FunctionTool:
      type: object
      required:
        - type
        - function
      properties:
        type:
          type: string
          description: 도구 유형입니다. 현재 function으로 고정됩니다.
          enum:
            - function
        function:
          type: object
          description: 모델이 사용할 수 있는 함수 정의입니다.
          required:
            - name
            - parameters
          properties:
            name:
              type: string
              description: 함수 이름입니다.
            description:
              type: string
              description: 모델이 함수를 언제 호출할지 판단하는 데 도움이 되는 설명입니다.
            parameters:
              type: object
              additionalProperties: true
              description: JSON Schema 형식의 함수 매개변수 정의입니다.
            strict:
              type: boolean
              description: 함수 인수가 parameters의 JSON Schema를 엄격히 따라야 하는지 여부입니다.
    WebSearchTool:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - web_search
          description: 웹 검색 도구입니다.
    NamedToolChoice:
      type: object
      required:
        - type
        - function
      properties:
        type:
          type: string
          description: 이름으로 지정한 도구 선택 유형입니다. function으로 고정됩니다.
          enum:
            - function
        function:
          type: object
          description: 모델이 반드시 호출해야 하는 함수입니다.
          required:
            - name
          properties:
            name:
              type: string
              description: 모델이 반드시 호출해야 하는 함수 이름입니다.
    ChatUsage:
      type: object
      properties:
        prompt_tokens:
          type: integer
          description: >-
            일반 입력, 캐시 읽기, 캐시 쓰기를 포함한 총 입력 토큰 수입니다. 일반 입력 = prompt_tokens -
            cached_tokens - cache_write_tokens.
        completion_tokens:
          type: integer
          description: 추론 tokens를 포함합니다.
        total_tokens:
          type: integer
          description: 입력과 출력 tokens의 합계입니다.
        prompt_tokens_details:
          type: object
          properties:
            cached_tokens:
              type: integer
              description: 캐시에서 제공된 입력 tokens입니다.
            cache_write_tokens:
              type: integer
              minimum: 0
              description: 5m / 1h 쓰기를 포함한 이번 캐시 쓰기 총 토큰 수입니다. 일반 입력으로 중복 과금하지 않습니다.
        completion_tokens_details:
          type: object
          properties:
            reasoning_tokens:
              type: integer
              description: 추론 tokens이며 completion_tokens에 이미 포함되어 있습니다.
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type:
                - string
                - 'null'
    ContentPart:
      description: 멀티모달 콘텐츠 블록입니다. `type`이 사용할 필드를 결정합니다.
      oneOf:
        - type: object
          required:
            - type
            - text
          properties:
            type:
              type: string
              enum:
                - text
            text:
              type: string
              description: '`type=text`일 때의 텍스트 내용입니다.'
        - type: object
          required:
            - type
            - image_url
          properties:
            type:
              type: string
              enum:
                - image_url
            image_url:
              description: '`type=image_url`일 때의 이미지입니다. URL 문자열을 직접 전달할 수도 있습니다.'
              oneOf:
                - type: string
                - type: object
                  required:
                    - url
                  properties:
                    url:
                      type: string
                      description: >-
                        Base64 Data URL 형식의 이미지
                        콘텐츠(data:image/png;base64,...)입니다.
        - type: object
          required:
            - type
            - video_url
          properties:
            type:
              type: string
              enum:
                - video_url
            video_url:
              description: '`type=video_url`일 때의 비디오입니다. URL 문자열을 직접 전달할 수도 있습니다.'
              oneOf:
                - type: string
                - type: object
                  required:
                    - url
                  properties:
                    url:
                      type: string
                      description: >-
                        Base64 Data URL 형식의 비디오
                        콘텐츠(data:video/mp4;base64,...)입니다.
    ToolCall:
      type: object
      required:
        - id
        - type
        - function
      properties:
        id:
          type: string
          description: 이후 tool 메시지를 tool_call_id로 연결하는 도구 호출 ID입니다.
        type:
          type: string
          description: >-
            도구 호출 유형: 클라이언트 함수는 `function`, 내장 `$web_search` 도구는
            `builtin_function`입니다.
          enum:
            - function
            - builtin_function
        function:
          type: object
          description: 모델이 요청한 함수와 인수입니다.
          properties:
            name:
              type: string
              description: 함수 이름입니다.
            arguments:
              type: string
              description: JSON 문자열로 인코딩된 함수 인수입니다.
      description: 멀티턴에서는 ID, 유형, 함수 이름, 인수 및 추론을 포함한 도구 호출 전체를 보존하세요.
  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: |-
        ##모든 인터페이스는 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.