> ## 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.

# MiniMax-M3.1-Flash - OpenAI 호환 API

> - OpenAI Chat Completions 프로토콜로 MiniMax-M3.1-Flash 모델을 호출합니다
- **멀티턴 대화**: 컨텍스트를 활용한 단일 턴 및 멀티턴 대화를 지원합니다
- **시스템 프롬프트**: `role=system` 메시지로 AI의 역할과 동작을 설정합니다
- **멀티모달 입력**: `content`에 텍스트, 이미지, 비디오를 함께 전달할 수 있습니다
- **추론 모드**: 항상 활성화되며 `reasoning_effort`로 추론 깊이를 조절합니다. 추론 내용은 `reasoning_content`로 반환되고 `content`에는 최종 답변만 포함됩니다
- **스트리밍**: SSE 스트리밍 응답을 지원합니다
- **도구 호출**: Function Calling을 지원합니다

**스트리밍 응답**: `stream=true`이면 Server-Sent Events로 응답합니다. 각 메시지는 `data: {JSON}` 형식이며 `data: [DONE]`으로 종료됩니다. `choices[].delta`에서 먼저 `reasoning_content`를 증분 반환한 뒤 `content` / `tool_calls`를 증분 반환합니다. `stream_options.include_usage=true`이면 종료 전에 `usage`가 포함된 청크를 추가로 반환합니다.

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


## OpenAPI

````yaml ko/api-manual/language-series/minimax-m3.1-flash/minimax-m3.1-flash-chat.json POST /v1/chat/completions
openapi: 3.1.0
info:
  title: MiniMax-M3.1-Flash 전체 파라미터 참조 (OpenAI 호환)
  description: >-
    MiniMax-M3.1-Flash 대화 API의 전체 참조 문서입니다.


    **모델 기능**:

    - 컨텍스트 길이: **1,000,000 tokens** (1M)

    - 최대 출력: **524,288 tokens** (512K), 권장 출력: **131,072 tokens** (128K). 추론 토큰이
    포함됩니다

    - 추론 모드: 항상 활성화되며 `reasoning_effort`로 추론 깊이를 조절합니다. 기본값은 `max`입니다

    - 멀티모달 입력: 텍스트, 이미지, 비디오 지원

    - 도구 호출: Function Calling 지원

    - 컨텍스트 캐시: 동일한 접두사를 자동으로 재사용하며, 캐시 적중 토큰 수는
    `usage.prompt_tokens_details.cached_tokens`에 표시됩니다

    - 스트리밍: SSE 스트리밍 응답 지원


    멀티턴 대화에서는 이전 턴의 전체 assistant 메시지를 수정하지 않고 `messages`에 포함하세요.
    `reasoning_content`와 `tool_calls`도 함께 전달해야 합니다.
  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: 대화 생성
    description: AI 대화 생성 관련 인터페이스
paths:
  /v1/chat/completions:
    post:
      tags:
        - 대화 생성
      summary: MiniMax-M3.1-Flash 대화 API (OpenAI 호환)
      description: >-
        - OpenAI Chat Completions 프로토콜로 MiniMax-M3.1-Flash 모델을 호출합니다

        - **멀티턴 대화**: 컨텍스트를 활용한 단일 턴 및 멀티턴 대화를 지원합니다

        - **시스템 프롬프트**: `role=system` 메시지로 AI의 역할과 동작을 설정합니다

        - **멀티모달 입력**: `content`에 텍스트, 이미지, 비디오를 함께 전달할 수 있습니다

        - **추론 모드**: 항상 활성화되며 `reasoning_effort`로 추론 깊이를 조절합니다. 추론 내용은
        `reasoning_content`로 반환되고 `content`에는 최종 답변만 포함됩니다

        - **스트리밍**: SSE 스트리밍 응답을 지원합니다

        - **도구 호출**: Function Calling을 지원합니다


        **스트리밍 응답**: `stream=true`이면 Server-Sent Events로 응답합니다. 각 메시지는 `data:
        {JSON}` 형식이며 `data: [DONE]`으로 종료됩니다. `choices[].delta`에서 먼저
        `reasoning_content`를 증분 반환한 뒤 `content` / `tool_calls`를 증분 반환합니다.
        `stream_options.include_usage=true`이면 종료 전에 `usage`가 포함된 청크를 추가로 반환합니다.
      operationId: createChatCompletionMiniMaxM31Flash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
            examples:
              simple_text:
                summary: 단일 턴 텍스트 대화
                value:
                  model: MiniMax-M3.1-Flash
                  messages:
                    - role: user
                      content: Please introduce yourself.
                  max_completion_tokens: 131072
              multi_turn:
                summary: 멀티턴 대화(컨텍스트 이해)
                value:
                  model: MiniMax-M3.1-Flash
                  messages:
                    - role: user
                      content: What is Python?
                    - role: assistant
                      content: Python is a high-level programming language.
                    - role: user
                      content: What are its main advantages?
                  max_completion_tokens: 131072
              system_prompt:
                summary: 시스템 프롬프트 사용
                value:
                  model: MiniMax-M3.1-Flash
                  messages:
                    - role: system
                      content: >-
                        You are a Python programming assistant. Keep your
                        answers concise.
                    - role: user
                      content: How do I read a file?
                  max_completion_tokens: 131072
              reasoning_effort:
                summary: 추론 깊이 조절
                value:
                  model: MiniMax-M3.1-Flash
                  reasoning_effort: high
                  messages:
                    - role: user
                      content: >-
                        A bat and a ball cost 1.10 in total. The bat costs 1.00
                        more than the ball. How much does the ball cost?
                  max_completion_tokens: 131072
              image_understanding:
                summary: 이미지 이해(멀티모달 입력)
                value:
                  model: MiniMax-M3.1-Flash
                  messages:
                    - role: user
                      content:
                        - type: text
                          text: What is shown in this image?
                        - type: image_url
                          image_url:
                            url: https://example.com/image.jpeg
                            detail: default
                  max_completion_tokens: 131072
              video_understanding:
                summary: 비디오 이해 (멀티모달 입력)
                value:
                  model: MiniMax-M3.1-Flash
                  messages:
                    - role: user
                      content:
                        - type: text
                          text: Summarize this video.
                        - type: video_url
                          video_url:
                            url: https://example.com/video.mp4
                            fps: 1
                            detail: default
                  max_completion_tokens: 131072
              tool_calling:
                summary: Function Calling 도구 호출
                value:
                  model: MiniMax-M3.1-Flash
                  messages:
                    - role: user
                      content: Check the stock for product demo-item-001.
                  tools:
                    - type: function
                      function:
                        name: get_product_stock
                        description: Get the current stock level for a product.
                        parameters:
                          type: object
                          properties:
                            product_id:
                              type: string
                              description: Product identifier.
                          required:
                            - product_id
                  max_completion_tokens: 131072
              streaming:
                summary: 스트리밍 출력
                value:
                  model: MiniMax-M3.1-Flash
                  stream: true
                  stream_options:
                    include_usage: true
                  messages:
                    - role: user
                      content: Write a short poem about spring.
                  max_completion_tokens: 131072
      responses:
        '200':
          description: 대화 생성 성공
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponse'
              examples:
                with_thinking:
                  summary: 추론 내용이 포함된 응답
                  value:
                    id: 072514edea627212c7e226a55bcf4e2e
                    choices:
                      - finish_reason: stop
                        index: 0
                        message:
                          content: '0.05'
                          role: assistant
                          name: MiniMax AI
                          audio_content: ''
                          reasoning_content: >-
                            Let the ball cost x. Then 2x + 1 = 1.10, so x =
                            0.05.
                    created: 1792401901
                    model: MiniMax-M3.1-Flash
                    object: chat.completion
                    usage:
                      total_tokens: 281
                      total_characters: 0
                      prompt_tokens: 229
                      completion_tokens: 52
                      completion_tokens_details:
                        reasoning_tokens: 49
                      prompt_tokens_details:
                        cached_tokens: 187
                    input_sensitive: false
                    output_sensitive: false
                    input_sensitive_type: 0
                    output_sensitive_type: 0
                    output_sensitive_int: 0
                    base_resp:
                      status_code: 0
                      status_msg: ''
                direct_answer:
                  summary: 직접 답변 (추론 내용 없음)
                  value:
                    id: 072514cc3cee91b3222f36a2a386128f
                    choices:
                      - finish_reason: stop
                        index: 0
                        message:
                          content: >-
                            Recursion is a technique in which a function calls
                            itself to solve smaller instances of a problem.
                          role: assistant
                          name: MiniMax AI
                          audio_content: ''
                    created: 1792401868
                    model: MiniMax-M3.1-Flash
                    object: chat.completion
                    usage:
                      total_tokens: 219
                      total_characters: 0
                      prompt_tokens: 208
                      completion_tokens: 11
                      prompt_tokens_details:
                        cached_tokens: 58
                    input_sensitive: false
                    output_sensitive: false
                    input_sensitive_type: 0
                    output_sensitive_type: 0
                    output_sensitive_int: 0
                    base_resp:
                      status_code: 0
                      status_msg: ''
                tool_calls:
                  summary: 도구 호출 트리거(finish_reason=tool_calls)
                  value:
                    id: 072514ce0ad459c5ac53494746f66488
                    choices:
                      - finish_reason: tool_calls
                        index: 0
                        message:
                          content: I'll check the stock for product demo-item-001.
                          role: assistant
                          name: MiniMax AI
                          tool_calls:
                            - id: call_function_fr79bzcw7n6k_1
                              type: function
                              function:
                                name: get_product_stock
                                arguments: '{"product_id": "demo-item-001"}'
                              index: 0
                          audio_content: ''
                    created: 1792401870
                    model: MiniMax-M3.1-Flash
                    object: chat.completion
                    usage:
                      total_tokens: 483
                      total_characters: 0
                      prompt_tokens: 446
                      completion_tokens: 37
                      prompt_tokens_details:
                        cached_tokens: 227
                    input_sensitive: false
                    output_sensitive: false
                    input_sensitive_type: 0
                    output_sensitive_type: 0
                    output_sensitive_int: 0
                    base_resp:
                      status_code: 0
                      status_msg: ''
                length:
                  summary: 출력 한도 도달 (finish_reason=length)
                  value:
                    id: 072513cf5d12aa74e53c700e4e1edf9e
                    choices:
                      - finish_reason: length
                        index: 0
                        message:
                          content: ''
                          role: assistant
                          name: MiniMax AI
                          audio_content: ''
                          reasoning_content: I need to explain the process step by step.
                    created: 1792401615
                    model: MiniMax-M3.1-Flash
                    object: chat.completion
                    usage:
                      total_tokens: 219
                      total_characters: 0
                      prompt_tokens: 211
                      completion_tokens: 8
                      completion_tokens_details:
                        reasoning_tokens: 8
                      prompt_tokens_details:
                        cached_tokens: 184
                    input_sensitive: false
                    output_sensitive: false
                    input_sensitive_type: 0
                    output_sensitive_type: 0
                    output_sensitive_int: 0
                    base_resp:
                      status_code: 0
                      status_msg: ''
        '400':
          description: 요청 매개변수 오류
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: Invalid request parameters
                  type: invalid_request_error
                  param: ''
                  code: null
        '401':
          description: 인증되지 않았거나 토큰이 유효하지 않거나 만료됨
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 401
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: 할당량 부족, 충전 필요
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 402
                  message: Insufficient quota
                  type: insufficient_quota_error
        '403':
          description: 해당 모델에 접근 권한 없음
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 403
                  message: Access denied for this model
                  type: permission_error
                  param: model
        '404':
          description: 리소스를 찾을 수 없음
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 404
                  message: Specified model not found
                  type: not_found_error
                  param: model
        '413':
          description: 요청 본문이 너무 큼
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 413
                  message: Request body too large
                  type: request_too_large_error
                  param: messages
        '429':
          description: 요청 빈도 초과
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 429
                  message: Rate limit exceeded
                  type: rate_limit_error
        '500':
          description: 서버 내부 오류
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 500
                  message: Internal server error
                  type: internal_server_error
        '502':
          description: 게이트웨이 오류
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 502
                  message: Bad gateway
                  type: bad_gateway_error
        '503':
          description: 서비스를 일시적으로 사용할 수 없음
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 503
                  message: Service temporarily unavailable
                  type: service_unavailable_error
components:
  schemas:
    ChatCompletionRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          type: string
          description: 대화 모델 이름
          enum:
            - MiniMax-M3.1-Flash
          example: MiniMax-M3.1-Flash
        messages:
          type: array
          description: |-
            대화 메시지 목록, 멀티턴 대화 지원

            역할마다 메시지의 필드 구조가 다르므로 해당 역할을 선택하여 확인하세요
          items:
            oneOf:
              - $ref: '#/components/schemas/SystemMessage'
              - $ref: '#/components/schemas/UserMessage'
              - $ref: '#/components/schemas/AssistantRequestMessage'
              - $ref: '#/components/schemas/ToolMessage'
            discriminator:
              propertyName: role
              mapping:
                system: '#/components/schemas/SystemMessage'
                user: '#/components/schemas/UserMessage'
                assistant: '#/components/schemas/AssistantRequestMessage'
                tool: '#/components/schemas/ToolMessage'
          minItems: 1
        reasoning_effort:
          type: string
          description: 추론 깊이입니다. 기본값은 `max`이며, 높은 단계일수록 일반적으로 추론 토큰 사용량과 응답 시간이 증가합니다.
          enum:
            - low
            - medium
            - high
            - xhigh
            - max
          default: max
          example: high
        thinking:
          type: object
          description: >-
            추론 모드입니다. MiniMax-M3.1-Flash는 항상 추론을 수행합니다. `adaptive`만 지원하며 생략할 수
            있습니다.
          properties:
            type:
              type: string
              enum:
                - adaptive
              default: adaptive
        reasoning_split:
          type: boolean
          description: >-
            추론 내용을 별도로 반환할지 여부입니다. `true`만 지원하며 추론 내용은 `reasoning_content`로
            반환됩니다. 생략할 수 있습니다.
          enum:
            - true
          default: true
        temperature:
          type: number
          description: |-
            출력의 무작위성을 제어하는 샘플링 온도입니다

            **설명**:
            - 범위: `[0, 2]`, 기본값: 1
            - 값이 낮을수록 출력이 더 결정적이고, 높을수록 더 다양해집니다

            **권장 사항**: temperature와 top_p를 동시에 조정하지 마세요
          minimum: 0
          maximum: 2
          default: 1
          example: 1
        top_p:
          type: number
          description: |-
            누적 확률 샘플링 (Nucleus Sampling) 파라미터입니다

            **설명**:
            - 지정한 누적 확률에 도달하는 토큰 집합에서 샘플링합니다
            - 예를 들어 0.95이면 누적 확률이 95%에 도달하는 토큰 집합에서 선택합니다
            - 범위: `[0, 1]`, 기본값: 0.95

            **권장 사항**: temperature와 top_p를 동시에 조정하지 마세요
          minimum: 0
          maximum: 1
          default: 0.95
          example: 0.95
        max_completion_tokens:
          type: integer
          description: >-
            생성할 토큰의 최대 수로, **추론과 답변을 모두 포함합니다**


            **설명**:

            - 권장: **131,072** (128K), 최대: **524,288** (512K)

            - 값이 너무 작으면 추론 단계에서 한도에 도달하여 `finish_reason=length`와 비어 있는
            `content`가 반환될 수 있습니다
          minimum: 1
          maximum: 524288
          example: 131072
        stream:
          type: boolean
          description: |-
            응답을 스트리밍 방식으로 반환할지 여부

            - `true`: 스트리밍 반환, SSE(Server-Sent Events)를 통해 내용을 청크 단위로 실시간 반환
            - `false`: 완전한 응답을 기다린 후 한 번에 반환(기본값)
          default: false
          example: false
        stream_options:
          type: object
          description: |-
            스트리밍 응답 옵션

            `stream=true`일 때만 유효합니다
          properties:
            include_usage:
              type: boolean
              description: 스트리밍 종료 전에 `usage` 통계만 포함된 청크를 추가로 반환할지 여부입니다.
        tools:
          type: array
          description: |-
            Function Calling을 위한 도구 정의 목록

            각 도구는 이름, 설명, 파라미터 schema를 정의해야 합니다
          items:
            $ref: '#/components/schemas/Tool'
        tool_choice:
          type: string
          description: 도구 선택 전략입니다. 모델이 도구 호출 여부를 결정하는 `auto`만 지원합니다.
          enum:
            - auto
          default: auto
        max_tokens:
          type: integer
          description: |-
            구버전 생성 길이 제한 파라미터

            **설명**: 더 이상 사용되지 않으므로 `max_completion_tokens`를 사용하세요
          deprecated: true
          minimum: 1
        'n':
          type: integer
          description: 생성할 응답 수입니다. `1`만 지원합니다.
          enum:
            - 1
          default: 1
    ChatCompletionResponse:
      type: object
      properties:
        id:
          type: string
          description: 대화 완료의 고유 식별자
          example: 0668a381bdc3c0ded310e27c9a46d16e7
        model:
          type: string
          description: 실제 사용된 모델 이름
          example: MiniMax-M3.1-Flash
        object:
          type: string
          enum:
            - chat.completion
          description: 응답 유형
          example: chat.completion
        created:
          type: integer
          description: 생성 타임스탬프(Unix 초)
          example: 1777026807
        choices:
          type: array
          description: 대화 생성 선택 목록
          items:
            $ref: '#/components/schemas/Choice'
        usage:
          $ref: '#/components/schemas/Usage'
        input_sensitive:
          type: boolean
          description: >-
            입력 내용이 민감어 필터에 걸렸는지 여부. 입력이 심각하게 위반될 경우 인터페이스는 콘텐츠 위반 오류를 반환하며 응답
            내용은 비어 있습니다
        input_sensitive_type:
          type: integer
          description: >-
            입력이 걸린 민감어 유형(`input_sensitive`가 true일 때 반환): 1 심각한 위반; 2 음란; 3 광고;
            4 금지; 5 욕설; 6 폭력·테러; 7 기타
        output_sensitive:
          type: boolean
          description: 출력 내용이 민감어 필터에 걸렸는지 여부
        output_sensitive_type:
          type: integer
          description: 출력이 걸린 민감어 유형
        base_resp:
          type: object
          description: 상태 코드 및 오류 상세
          properties:
            status_code:
              type: integer
              description: >-
                상태 코드, `0`은 성공을 의미; 그 외 `1002` 제한 트리거, `1008` 잔액 부족, `1039`
                Token 초과, `2013` 파라미터 오류 등
            status_msg:
              type: string
              description: 오류 상세
        output_sensitive_int:
          type: integer
          description: 출력에서 감지된 민감어 유형의 숫자 식별자입니다.
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type:
                - integer
                - string
                - 'null'
              description: HTTP 상태 오류 코드
            message:
              type: string
              description: 오류 설명 정보
            type:
              type: string
              description: 오류 유형
            param:
              type: string
              description: 관련 매개변수 이름
    SystemMessage:
      title: System Message
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - system
          description: 역할 식별자, `system`으로 고정
        content:
          type: string
          description: 시스템 프롬프트 내용, AI의 역할과 동작을 설정하는 데 사용
        name:
          type: string
          description: 참여자 이름, 서로 다른 시스템 프롬프트 출처를 구분하는 데 사용
    UserMessage:
      title: User Message
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - user
          description: 역할 식별자, `user`로 고정
        content:
          description: >-
            사용자 메시지 내용입니다


            **설명**:

            - 일반 텍스트는 문자열로 직접 전달합니다

            - 멀티모달 입력은 content part 배열로 전달하며 `text`, `image_url` (이미지),
            `video_url` (비디오)을 지원합니다

            - 요청 본문의 최대 크기는 64 MB입니다
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/ContentPart'
        name:
          type: string
          description: 참여자 이름, 서로 다른 사용자를 구분하는 데 사용
    AssistantRequestMessage:
      title: Assistant Message
      type: object
      required:
        - role
      properties:
        role:
          type: string
          enum:
            - assistant
          description: 역할 식별자, `assistant`로 고정
        content:
          type:
            - string
            - 'null'
          description: |-
            어시스턴트 메시지 내용

            **설명**:
            - 멀티턴 대화에서 과거 어시스턴트 응답을 전달하는 데 사용
            - `tool_calls`가 존재할 때 `null`일 수 있음
        reasoning_content:
          type: string
          description: 이전 턴에서 반환된 추론 내용입니다. 멀티턴 대화에서는 수정하지 않고 다시 전달하세요.
        name:
          type: string
          description: 참여자 이름
        tool_calls:
          type: array
          description: |-
            도구 호출 목록

            멀티턴 대화에서 과거 도구 호출 정보를 전달하는 데 사용
          items:
            type: object
            properties:
              id:
                type: string
                description: 도구 호출의 고유 식별자
              type:
                type: string
                enum:
                  - function
              function:
                type: object
                properties:
                  name:
                    type: string
                    description: 호출된 함수 이름
                  arguments:
                    type: string
                    description: 함수 인자(JSON 문자열)
    ToolMessage:
      title: Tool Message
      type: object
      required:
        - role
        - content
        - tool_call_id
      properties:
        role:
          type: string
          enum:
            - tool
          description: 역할 식별자, `tool`로 고정
        content:
          type: string
          description: 도구 호출 반환 결과 내용
        tool_call_id:
          type: string
          description: |-
            도구 호출 ID

            assistant 메시지의 `tool_calls`에서 반환된 `id` 필드에 대응
    Tool:
      type: object
      required:
        - type
        - function
      properties:
        type:
          type: string
          enum:
            - function
          description: 도구 유형, 현재 `function`만 지원
        function:
          type: object
          required:
            - name
            - parameters
          properties:
            name:
              type: string
              description: |-
                호출할 함수 이름

                **설명**:
                - a-z, A-Z, 0-9 문자로 구성하거나 밑줄과 하이픈을 포함해야 합니다
                - 최대 길이는 64자입니다
            description:
              type: string
              description: 함수 기능 설명, 모델이 언제 어떻게 이 함수를 호출할지 이해하도록 도움
            parameters:
              type: object
              description: 함수의 입력 파라미터, JSON Schema 객체로 기술
    Choice:
      type: object
      properties:
        index:
          type: integer
          description: 선택의 인덱스
          example: 0
        message:
          $ref: '#/components/schemas/AssistantMessage'
        finish_reason:
          type: string
          description: |-
            완료 사유

            - `stop`: 자연스러운 종료 또는 중지 시퀀스 트리거
            - `length`: 최대 token 한도 도달
            - `content_filter`: 콘텐츠가 안전 정책에 의해 필터링됨
            - `tool_calls`: 모델이 도구를 호출함
          enum:
            - stop
            - length
            - content_filter
            - tool_calls
          example: stop
    Usage:
      type: object
      description: Token 사용 통계 정보
      properties:
        total_tokens:
          type: integer
          description: 소비된 총 token 수
          example: 1604
        total_characters:
          type: integer
          description: 소비된 총 문자 수
          example: 0
        prompt_tokens:
          type: integer
          description: 캐시 적중 부분을 포함한 전체 입력 토큰 수입니다.
          example: 1365
        completion_tokens:
          type: integer
          description: 출력 토큰 수(사고 부분 포함)
          example: 239
        completion_tokens_details:
          type: object
          description: 출력 token 상세 내역
          properties:
            reasoning_tokens:
              type: integer
              description: 추론 과정에서 생성된 토큰 수입니다.
              example: 49
        prompt_tokens_details:
          type: object
          description: 입력 token 상세 내역
          properties:
            cached_tokens:
              type: integer
              description: >-
                캐시에 적중한 입력 토큰 수입니다


                캐시 적중 부분에는 캐시 적중 요금이 적용됩니다. 캐시 미적중 부분 = `prompt_tokens -
                cached_tokens`에는 표준 입력 요금이 적용됩니다.
              example: 114
    ContentPart:
      type: object
      description: 멀티모달 콘텐츠 조각, `type`으로 유형을 선언하고 해당 유형에 일치하는 필드만 채웁니다
      properties:
        type:
          type: string
          enum:
            - text
            - image_url
            - video_url
          description: |-
            콘텐츠 유형

            - `text`: 텍스트 블록
            - `image_url`: 이미지 입력
            - `video_url`: 비디오 입력
        text:
          type: string
          description: '`type=text`일 때의 텍스트 내용'
        image_url:
          type: object
          description: >-
            이미지 입력(`type=image_url`일 때), 이미지 한 장당 최대 10 MB, JPEG / PNG / GIF /
            WEBP 지원
          required:
            - url
          properties:
            url:
              type: string
              description: 이미지 URL, 또는 `data:`로 시작하는 base64 data URL
            detail:
              type: string
              description: |-
                이미지 파싱 해상도 제어

                - `low`: 저정밀도, token을 더 적게 소비
                - `default`: 기본 정밀도
                - `high`: 고정밀도, 더 세밀하게 인식하지만 token을 더 많이 소비
              enum:
                - low
                - default
                - high
              default: default
            max_long_side_pixel:
              type: integer
              description: 이미지 최장변 픽셀 제한
              minimum: 1
        video_url:
          type: object
          description: >-
            비디오 입력(`type=video_url`일 때), URL / Base64 비디오 최대 50 MB, MP4 / AVI /
            MOV / MKV 지원
          required:
            - url
          properties:
            url:
              type: string
              description: >-
                비디오 URL, `data:`로 시작하는 base64 data URL, 또는 `mm_file://{file_id}`
                형식의 파일 참조
            detail:
              type: string
              description: 비디오 프레임 추출 해상도 제어
              enum:
                - low
                - default
                - high
              default: default
            fps:
              type: number
              description: >-
                비디오 프레임 추출 빈도입니다. 기본값은 1이며 범위는 [0.2, 5]입니다. 빈도가 높을수록 화면 변화를 더 잘
                포착할 수 있지만 일반적으로 토큰 사용량도 증가합니다.
              minimum: 0.2
              maximum: 5
              default: 1
            max_long_side_pixel:
              type: integer
              description: 비디오 프레임 최장변 픽셀 제한
              minimum: 1
    AssistantMessage:
      type: object
      properties:
        role:
          type: string
          description: 메시지 발신자의 역할
          enum:
            - assistant
          example: assistant
        content:
          type:
            - string
            - 'null'
          description: 추론 과정을 제외한 최종 답변입니다. 도구 호출 시 `null`일 수 있습니다.
          example: '0.05'
        reasoning_content:
          type: string
          description: 추론 내용입니다. 간단한 질문은 추론 내용을 생성하지 않을 수 있으며, 이 경우 필드가 반환되지 않습니다.
          example: Let the ball cost x. Then 2x + 1 = 1.10, so x = 0.05.
        name:
          type: string
          description: 발신자 이름
        audio_content:
          type: string
          description: 오디오 내용(순수 텍스트 대화 시나리오에서는 빈 문자열)
        tool_calls:
          type: array
          description: 도구 호출 목록(모델이 도구를 호출하기로 결정했을 때 반환)
          items:
            type: object
            properties:
              id:
                type: string
                description: 도구 호출의 고유 식별자
              type:
                type: string
                enum:
                  - function
              function:
                type: object
                properties:
                  name:
                    type: string
                    description: 호출된 함수 이름
                  arguments:
                    type: string
                    description: 함수 인자(JSON 문자열)
              index:
                type: integer
                description: 도구 호출 인덱스
  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.