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

> `model`과 `input`으로 Kimi를 호출합니다. `kimi-k3.1-pro`, `kimi-k3.1-pro-highspeed`, `kimi-k3`를 지원합니다. `max_output_tokens`는 1024부터 설정하여 추론과 답변 공간을 확보하는 것이 좋습니다.

더 많은 예제와 모델별 차이는 [전체 참조](/ko/api-manual/language-series/kimi/responses/responses-reference)를 확인하세요.

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

`POST /v1/responses`를 사용하고 `model`로 `kimi-k3.1-pro`, `kimi-k3.1-pro-highspeed`, `kimi-k3`를 선택합니다. `model`과 `input`만 필요합니다.

> [!WARNING]
>
> **매개변수 이름은 Chat Completions와 다릅니다**. 입력은 `input`, 출력 한도는 `max_output_tokens`, 추론 강도는 `reasoning.effort`를 사용합니다.

## 답변 본문 읽기

응답의 `output`에는 추론, 본문, 도구 호출이 함께 포함될 수 있습니다. `type="message"` 항목의 `output_text` 콘텐츠 블록을 순회하세요. 첫 항목이 본문이라고 가정하지 마세요.

응답 JSON을 `response`로 파싱했다면 다음과 같이 텍스트를 추출할 수 있습니다.

```python theme={null}
text = "".join(
    part["text"]
    for item in response.get("output", [])
    if item.get("type") == "message"
    for part in item.get("content", [])
    if part.get("type") == "output_text"
)
print(text)
```

> [!NOTE]
>
> **추론을 위한 출력 예산을 확보하세요**. `max_output_tokens`는 추론과 본문을 모두 포함합니다. `status="incomplete"`이고 `incomplete_details.reason="max_output_tokens"`라면 한도를 높이세요. 예산이 소진되면 추론 항목만 있고 본문은 없을 수 있습니다.

도구 호출, 웹 검색, 이미지 입력, 구조화된 출력은 [전체 참조](https://evolink.ai/docs/ko/api-manual/language-series/kimi/responses/responses-reference.md)를 확인하세요.


## OpenAPI

````yaml ko/api-manual/language-series/kimi/responses/responses-quickstart.json POST /v1/responses
openapi: 3.1.0
info:
  title: Kimi API(모든 모델) - Responses 빠른 시작
  description: >-
    OpenAI Responses 프로토콜로 Kimi 텍스트 모델을 호출하는 빠른 시작 예제입니다. `model` 및 `input`만으로
    대화를 시작할 수 있습니다. 도구 호출, 웹 검색, 구조화된 출력, 이미지 입력 등은 「전체 참조」 페이지를 확인하세요.
  version: 1.0.0
servers:
  - url: https://direct.evolink.ai
    description: 프로덕션(권장)
  - url: https://api.evolink.ai
    description: 대체 URL
security:
  - bearerAuth: []
paths:
  /v1/responses:
    post:
      tags:
        - Responses
      summary: Kimi Responses 빠른 호출
      description: >-
        `model`과 `input`으로 Kimi를 호출합니다. `kimi-k3.1-pro`,
        `kimi-k3.1-pro-highspeed`, `kimi-k3`를 지원합니다. `max_output_tokens`는 1024부터
        설정하여 추론과 답변 공간을 확보하는 것이 좋습니다.


        더 많은 예제와 모델별 차이는 [전체
        참조](/ko/api-manual/language-series/kimi/responses/responses-reference)를
        확인하세요.
      operationId: kimiResponsesQuick
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponsesQuickRequest'
            examples:
              simple:
                summary: Pro 최소 요청
                value:
                  model: kimi-k3.1-pro
                  input: 컨텍스트 캐시를 한 문장으로 설명해 주세요.
              highspeed:
                summary: 낮은 추론 강도의 Highspeed
                value:
                  model: kimi-k3.1-pro-highspeed
                  input: 컨텍스트 캐시를 한 문장으로 설명해 주세요.
                  reasoning:
                    effort: low
                  max_output_tokens: 1024
              k3:
                summary: Kimi K3 최소 요청
                value:
                  model: kimi-k3
                  input: 컨텍스트 캐시를 한 문장으로 설명해 주세요.
              multi_turn:
                summary: 시스템 프롬프트와 여러 턴의 대화
                value:
                  model: kimi-k3.1-pro
                  input:
                    - role: developer
                      content: 당신은 꼼꼼한 기술 편집자입니다. 간결하게 답하세요.
                    - role: user
                      content: 컨텍스트 캐시란 무엇인가요?
                    - role: assistant
                      content: >-
                        컨텍스트 캐시는 요청에서 반복되는 접두사 내용을 저장하여 이후 요청이 캐시에 적중하면 더 빠르고
                        저렴하게 처리할 수 있게 합니다.
                    - role: user
                      content: 어떤 용도에 적합한가요?
                  reasoning:
                    effort: low
                  max_output_tokens: 2048
              streaming:
                summary: SSE 스트리밍 출력
                value:
                  model: kimi-k3.1-pro
                  input: 여름밤에 관한 네 줄의 짧은 시를 써 주세요.
                  reasoning:
                    effort: low
                  max_output_tokens: 2048
                  stream: true
      responses:
        '200':
          description: 응답 생성 성공. 스트리밍 요청은 SSE 이벤트 스트림을 반환합니다
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsesResponse'
            text/event-stream:
              schema:
                type: string
                description: >-
                  Responses 형식의 SSE 이벤트 스트림. `response.completed`,
                  `response.incomplete`, `response.failed` 중 하나로 종료됩니다.
        '400':
          description: '잘못된 요청: 유효하지 않은 매개변수'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: '인증 실패: API 키가 유효하지 않거나 누락됨'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: 요청 한도 초과 또는 할당량 부족
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: 서버 오류
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ResponsesQuickRequest:
      type: object
      required:
        - model
        - input
      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이며 추론이 항상 활성화됩니다.
        input:
          description: 이번 요청의 입력. 문자열은 하나의 user 메시지와 같고 배열은 이전 메시지를 순서대로 제공합니다.
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/InputMessage'
        max_output_tokens:
          type: integer
          minimum: 1
          maximum: 1048576
          default: 131072
          description: 추론과 최종 답변을 포함한 최대 생성 토큰 수. 기본값 131072, 최댓값 1048576.
        reasoning:
          type: object
          description: 추론 관련 설정입니다.
          properties:
            effort:
              type: string
              enum:
                - low
                - high
                - max
              default: max
              description: >-
                추론 강도. 기본값은 `max`입니다. `kimi-k3`는 `max`만 지원하며 다른 호환 값은 전체 참조를
                확인하세요.
        stream:
          type: boolean
          default: false
          description: true이면 SSE 이벤트 스트림으로 응답합니다.
    ResponsesResponse:
      type: object
      properties:
        id:
          type: string
          description: 응답 ID.
          example: resp_6adc72aab1f2eaaebe6b869e
        object:
          type: string
          enum:
            - response
          example: response
        created_at:
          type: integer
          description: 생성 시각. Unix 타임스탬프(초).
          example: 1792832171
        status:
          type: string
          enum:
            - completed
            - incomplete
            - failed
          description: 응답 상태. `incomplete`는 일반적으로 `max_output_tokens` 한도에 도달했음을 의미합니다.
          example: completed
        incomplete_details:
          type:
            - object
            - 'null'
          description: '`status`가 `incomplete`일 때 제공되는 이유입니다.'
          properties:
            reason:
              type: string
              enum:
                - max_output_tokens
                - content_filter
        model:
          type: string
          description: 이번 호출에 사용한 모델.
          example: kimi-k3.1-pro
        output:
          type: array
          description: 출력 항목 배열. 보통 reasoning 다음에 message가 옵니다.
          items:
            $ref: '#/components/schemas/OutputItem'
        usage:
          $ref: '#/components/schemas/Usage'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: 오류 원인을 설명하는 메시지입니다.
            type:
              type: string
              description: 오류 유형
            code:
              type: string
              description: 오류 코드
          required:
            - message
      required:
        - error
    InputMessage:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - user
            - assistant
            - developer
          description: 메시지 역할입니다. `developer`는 시스템 지시로 처리됩니다.
        content:
          type: string
          description: 메시지 내용(일반 텍스트).
          example: 컨텍스트 캐시를 한 문장으로 설명해 주세요.
    OutputItem:
      type: object
      properties:
        type:
          type: string
          enum:
            - reasoning
            - message
          description: '`reasoning`은 추론 내용이며 `message`는 최종 답변입니다.'
          example: message
        id:
          type: string
          example: msg_6adc72aab1f2eaaebe6b869f
        summary:
          type: array
          description: '`type=reasoning`일 때의 추론 내용.'
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                  - summary_text
              text:
                type: string
        role:
          type: string
          enum:
            - assistant
          description: '`type=message`일 때 반환됩니다.'
        content:
          type: array
          description: '`type=message`일 때의 답변 내용.'
          items:
            $ref: '#/components/schemas/OutputText'
        status:
          type: string
          enum:
            - completed
          example: completed
    Usage:
      type: object
      properties:
        input_tokens:
          type: integer
          description: 캐시 적중분을 포함한 입력 토큰.
          example: 24
        input_tokens_details:
          type: object
          properties:
            cached_tokens:
              type: integer
              description: 캐시에서 제공된 입력 tokens입니다.
              example: 0
        output_tokens:
          type: integer
          description: 추론 토큰을 포함한 출력 토큰.
          example: 96
        output_tokens_details:
          type: object
          properties:
            reasoning_tokens:
              type: integer
              description: 추론 토큰. output_tokens에 이미 포함되어 있습니다.
              example: 62
        total_tokens:
          type: integer
          description: 입력과 출력 tokens의 합계입니다.
          example: 120
    OutputText:
      type: object
      properties:
        type:
          type: string
          enum:
            - output_text
          example: output_text
        text:
          type: string
          example: >-
            컨텍스트 캐시는 요청에서 반복되는 접두사 내용을 저장하여 이후 요청이 캐시에 적중하면 더 빠르고 저렴하게 처리할 수 있게
            합니다.
  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.