> ## 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-M2.5 - 전체 API 레퍼런스

> - OpenAI SDK 형식으로 MiniMax-M2.5 모델 호출
- 동기 처리 모드, 실시간 응답
- **텍스트 대화**: 단일 또는 다중 턴 컨텍스트 대화
- **시스템 프롬프트**: AI 역할 및 동작 사용자 정의

<Note>
  **BaseURL**: 기본 BaseURL은 `https://direct.evolink.ai`이며, 텍스트 모델 지원이 더 우수하고 장시간 연결을 지원합니다. `https://api.evolink.ai`는 멀티모달 서비스의 주력 엔드포인트이며, 텍스트 모델에 대해서는 대체 주소로 사용됩니다.
</Note>


## OpenAPI

````yaml ko/api-manual/language-series/minimax-m2.5/minimax-m2.5-api.json POST /v1/chat/completions
openapi: 3.1.0
info:
  title: MiniMax-M2.5 전체 API 레퍼런스
  description: MiniMax-M2.5 채팅 인터페이스의 전체 API 레퍼런스
  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-M2.5 채팅 인터페이스
      description: |-
        - OpenAI SDK 형식으로 MiniMax-M2.5 모델 호출
        - 동기 처리 모드, 실시간 응답
        - **텍스트 대화**: 단일 또는 다중 턴 컨텍스트 대화
        - **시스템 프롬프트**: AI 역할 및 동작 사용자 정의
      operationId: createChatCompletion
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
            examples:
              simple_text:
                summary: 단일 턴 텍스트 대화
                value:
                  model: MiniMax-M2.5
                  messages:
                    - role: user
                      content: 자기소개를 해주세요
              multi_turn:
                summary: 다중 턴 대화 (컨텍스트 이해)
                value:
                  model: MiniMax-M2.5
                  messages:
                    - role: user
                      content: Python이 무엇인가요?
                    - role: assistant
                      content: Python은 고급 프로그래밍 언어입니다...
                    - role: user
                      content: 장점은 무엇인가요?
              system_prompt:
                summary: 시스템 프롬프트 사용
                value:
                  model: MiniMax-M2.5
                  messages:
                    - role: system
                      content: 당신은 전문 Python 프로그래밍 어시스턴트입니다. 질문에 간결하게 답변하세요.
                    - role: user
                      content: 파일을 어떻게 읽나요?
      responses:
        '200':
          description: 채팅 완성 성공
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponse'
        '400':
          description: 잘못된 요청 매개변수
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 400
                  message: Invalid request parameters
                  type: invalid_request_error
        '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
                  fallback_suggestion: https://evolink.ai/dashboard/billing
        '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
                  fallback_suggestion: MiniMax-M2.5
        '429':
          description: 요청 속도 제한 초과
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 429
                  message: Rate limit exceeded
                  type: rate_limit_error
                  fallback_suggestion: retry after 60 seconds
        '500':
          description: 내부 서버 오류
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 500
                  message: Internal server error
                  type: internal_server_error
                  fallback_suggestion: try again later
        '502':
          description: 업스트림 서비스 오류
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 502
                  message: Upstream AI service unavailable
                  type: upstream_error
                  fallback_suggestion: try different model
        '503':
          description: 서비스 일시적으로 사용 불가
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 503
                  message: Service temporarily unavailable
                  type: service_unavailable_error
                  fallback_suggestion: retry after 30 seconds
components:
  schemas:
    ChatCompletionRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          type: string
          description: 채팅 모델 이름
          enum:
            - MiniMax-M2.5
          example: MiniMax-M2.5
        messages:
          type: array
          description: 대화 메시지 목록, 다중 턴 대화 지원
          items:
            $ref: '#/components/schemas/Message'
          minItems: 1
        max_tokens:
          type: integer
          description: |-
            생성 콘텐츠의 최대 토큰 수, 상한은 2048

            **참고**:
            - 상한을 초과하는 콘텐츠는 잘립니다
            - `length` 이유로 생성이 중단된 경우 이 값을 높여보세요
          minimum: 1
          maximum: 2048
          example: 2048
        stream:
          type: boolean
          description: |-
            스트리밍 모드로 응답을 반환할지 여부

            - `true`: 스트리밍 응답, 실시간으로 청크 단위로 콘텐츠 반환
            - `false`: 완전한 응답을 기다린 후 반환
          example: false
        temperature:
          type: number
          description: |-
            샘플링 온도, 출력의 무작위성 제어

            **참고**:
            - 낮은 값(예: 0.1): 더 확정적이고 집중된 출력
            - 높은 값(예: 0.9): 더 무작위적이고 창의적인 출력
            - 범위: (0, 1], 0 제외
          exclusiveMinimum: 0
          maximum: 1
          example: 0.7
        top_p:
          type: number
          description: |-
            Nucleus Sampling 매개변수

            **참고**:
            - 누적 확률에서 토큰 샘플링 제어
            - 예: 0.9는 누적 확률 90%에 도달하는 토큰에서 선택을 의미
            - 범위: (0, 1], 0 제외

            **권장**: temperature와 top_p를 동시에 조정하지 마세요
          exclusiveMinimum: 0
          maximum: 1
          example: 0.9
        enable_search:
          type: boolean
          description: |-
            웹 검색 활성화 여부

            - `true`: 웹 검색 활성화, 모델이 필요에 따라 인터넷에서 최신 정보를 검색합니다
            - `false`: 웹 검색 비활성화
          example: true
        search_options:
          type: object
          description: '웹 검색 옵션, `enable_search: true` 필요'
          properties:
            search_strategy:
              type: string
              description: |-
                검색 전략

                - `turbo`: 빠른 검색, 더 빠른 속도
                - `max`: 심층 검색, 더 포괄적인 결과
              enum:
                - turbo
                - max
              example: max
    ChatCompletionResponse:
      type: object
      properties:
        id:
          type: string
          description: 채팅 완성의 고유 식별자
          example: cmpl-04ea926191a14749b7f2c7a48a68abc6
        model:
          type: string
          description: 실제 사용된 모델 이름
          example: MiniMax-M2.5
        object:
          type: string
          enum:
            - chat.completion
          description: 응답 유형
          example: chat.completion
        created:
          type: integer
          description: 생성 타임스탬프
          example: 1698999496
        choices:
          type: array
          description: 채팅 완성 선택 목록
          items:
            $ref: '#/components/schemas/Choice'
        usage:
          $ref: '#/components/schemas/Usage'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
              description: HTTP 상태 오류 코드
            message:
              type: string
              description: 오류 설명
            type:
              type: string
              description: 오류 유형
            param:
              type: string
              description: 관련 매개변수 이름
            fallback_suggestion:
              type: string
              description: 오류 시 제안
    Message:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          description: |-
            메시지 역할

            - `user`: 사용자 메시지
            - `assistant`: AI 어시스턴트 메시지 (다중 턴 대화용)
            - `system`: 시스템 프롬프트 (AI 역할 및 동작 정의)
          enum:
            - user
            - assistant
            - system
          example: user
        content:
          type: string
          description: 메시지 내용
          example: 자기소개를 해주세요
    Choice:
      type: object
      properties:
        index:
          type: integer
          description: 선택 인덱스
          example: 0
        message:
          $ref: '#/components/schemas/AssistantMessage'
        finish_reason:
          type: string
          description: |-
            완료 이유

            - `stop`: 정상 완료
            - `length`: 최대 토큰 제한 도달
            - `content_filter`: 콘텐츠 필터링됨
          enum:
            - stop
            - length
            - content_filter
          example: stop
    Usage:
      type: object
      description: 토큰 사용 통계
      properties:
        prompt_tokens:
          type: integer
          description: 입력 토큰 수
          example: 8
        completion_tokens:
          type: integer
          description: 출력 토큰 수
          example: 292
        total_tokens:
          type: integer
          description: 총 토큰 수
          example: 300
    AssistantMessage:
      type: object
      properties:
        role:
          type: string
          description: 메시지 발신자의 역할
          enum:
            - assistant
          example: assistant
        content:
          type: string
          description: AI 응답 메시지 내용
          example: 안녕하세요! 무엇을 도와드릴까요?
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##모든 API는 Bearer Token 인증이 필요합니다##

        **API 키 받기:**

        [API 키 관리 페이지](https://evolink.ai/dashboard/keys)를 방문하여 API 키를 받으세요

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

````