> ## Documentation Index
> Fetch the complete documentation index at: https://docs.evolink.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MiniMax-M3 - Anthropic 호환 API

> - Anthropic Messages 프로토콜을 사용하여 MiniMax-M3 모델을 호출합니다
- 요청 / 응답 구조가 Anthropic API와 정렬됨
- **멀티모달 대화**: `content`는 텍스트와 이미지 콘텐츠 블록을 지원
- **시스템 프롬프트**: 최상위 `system` 필드를 통해 전달
- **사고 모드**: `thinking` 객체로 제어; 사고 내용은 `content[type=thinking]` block을 통해 반환
- **스트리밍 출력**: SSE 이벤트 스트림
- **도구 호출**: Anthropic `tool_use` / `tool_result` 흐름과 호환

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


## OpenAPI

````yaml ko/api-manual/language-series/minimax-m3/minimax-m3-messages.json POST /v1/messages
openapi: 3.1.0
info:
  title: MiniMax-M3 Anthropic 호환 인터페이스
  description: >-
    MiniMax-M3를 Anthropic Messages 프로토콜로 호출하는 전체 API 레퍼런스입니다.


    **호환 설명**:

    - 경로: `/v1/messages`(Anthropic 표준 경로)

    - 요청 / 응답 구조가 Anthropic Messages API와 일치

    - 지원 필드: `model` `messages`(필수) `system` `max_tokens` `temperature` `top_p`
    `stream` `thinking` `tools` `tool_choice` `metadata`


    **모델 능력**:

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

    - 사고 모드: `thinking` 기본값은 `adaptive`, 사고 내용은 `content[type=thinking]` block을
    통해 반환

    - 멀티모달 입력: 텍스트와 이미지 콘텐츠 블록 지원
  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 프로토콜 인터페이스
paths:
  /v1/messages:
    post:
      tags:
        - Messages
      summary: MiniMax-M3 Messages 인터페이스(Anthropic 호환)
      description: >-
        - Anthropic Messages 프로토콜을 사용하여 MiniMax-M3 모델을 호출합니다

        - 요청 / 응답 구조가 Anthropic API와 정렬됨

        - **멀티모달 대화**: `content`는 텍스트와 이미지 콘텐츠 블록을 지원

        - **시스템 프롬프트**: 최상위 `system` 필드를 통해 전달

        - **사고 모드**: `thinking` 객체로 제어; 사고 내용은 `content[type=thinking]` block을
        통해 반환

        - **스트리밍 출력**: SSE 이벤트 스트림

        - **도구 호출**: Anthropic `tool_use` / `tool_result` 흐름과 호환
      operationId: createMessageMiniMaxM3
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMessageRequest'
            examples:
              simple:
                summary: 최소 실행 가능 요청
                value:
                  model: MiniMax-M3
                  max_tokens: 1024
                  messages:
                    - role: user
                      content: 안녕하세요, 세계
              system_prompt:
                summary: system 프롬프트 + 멀티턴 포함
                value:
                  model: MiniMax-M3
                  max_tokens: 2048
                  system: 당신은 경험이 풍부한 기술 편집자입니다.
                  messages:
                    - role: user
                      content: MiniMax-M3를 세 문장으로 설명하세요.
              image_understanding:
                summary: 이미지 이해(멀티모달 콘텐츠 블록)
                value:
                  model: MiniMax-M3
                  max_tokens: 500
                  messages:
                    - role: user
                      content:
                        - type: text
                          text: 이 이미지에는 무엇이 있나요?
                        - type: image
                          source:
                            type: url
                            url: https://example.com/image.jpeg
              disable_thinking:
                summary: 사고 모드 비활성화
                value:
                  model: MiniMax-M3
                  max_tokens: 512
                  thinking:
                    type: disabled
                  messages:
                    - role: user
                      content: '한 문장으로: 일본의 수도는?'
              tool_use:
                summary: 도구 호출(Anthropic tool_use 스타일)
                value:
                  model: MiniMax-M3
                  max_tokens: 2048
                  messages:
                    - role: user
                      content: 샌프란시스코의 날씨를 조회하여 알려 주세요
                  tools:
                    - name: get_weather
                      description: 지정한 위치의 현재 날씨를 조회합니다
                      input_schema:
                        type: object
                        properties:
                          location:
                            type: string
                            description: '도시와 주 / 국가, 예: San Francisco, US'
                        required:
                          - location
                  tool_choice:
                    type: auto
              streaming:
                summary: 스트리밍 출력(SSE)
                value:
                  model: MiniMax-M3
                  max_tokens: 1024
                  stream: true
                  messages:
                    - role: user
                      content: 봄에 관한 짧은 시를 써 주세요
      responses:
        '200':
          description: 메시지 객체
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                thinking_adaptive:
                  summary: thinking 자율 결정(thinking content block 포함)
                  value:
                    id: 066a381bdc3c0ded310e27c9a46d16e7
                    type: message
                    role: assistant
                    model: MiniMax-M3
                    content:
                      - type: thinking
                        thinking: >-
                          사용자가 묻는 것은 일본의 수도로, 이는 기초 지리 지식 질문입니다. 답은 도쿄이므로 바로
                          제시하면 됩니다.
                        signature: 066a381bdc3c0ded310e27c9a46d16e7
                      - type: text
                        text: 일본의 수도는 **도쿄**입니다.
                    stop_reason: end_turn
                    usage:
                      input_tokens: 7
                      output_tokens: 77
                      cache_creation_input_tokens: 0
                      cache_read_input_tokens: 0
                tool_use:
                  summary: 도구 호출 트리거(stop_reason=tool_use)
                  value:
                    id: 066a381bdc3c0ded310e27c9a46d16e8
                    type: message
                    role: assistant
                    model: MiniMax-M3
                    content:
                      - type: text
                        text: 네, 샌프란시스코의 날씨 상황을 조회해 드리겠습니다.
                      - type: tool_use
                        id: toolu_01abc123xyz
                        name: get_weather
                        input:
                          location: San Francisco, US
                    stop_reason: tool_use
                    usage:
                      input_tokens: 35
                      output_tokens: 68
                      cache_creation_input_tokens: 0
                      cache_read_input_tokens: 0
        '400':
          description: 잘못된 요청 파라미터
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                type: error
                request_id: req_xxx
                error:
                  type: invalid_request_error
                  message: Invalid request
        '401':
          description: 인증 오류
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                type: error
                error:
                  type: authentication_error
                  message: Authentication error
        '402':
          description: 할당량 부족
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                type: error
                error:
                  type: billing_error
                  message: Insufficient quota
        '403':
          description: 권한 오류
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                type: error
                error:
                  type: permission_error
                  message: Permission denied
        '404':
          description: 모델 또는 리소스를 찾을 수 없음
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                type: error
                error:
                  type: not_found_error
                  message: Model not found
        '429':
          description: 속도 제한 초과
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                type: error
                error:
                  type: rate_limit_error
                  message: Rate limited
        '500':
          description: 서버 내부 오류
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: 게이트웨이 오류
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: 서비스를 일시적으로 사용할 수 없음
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CreateMessageRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          type: string
          description: 호출할 모델
          enum:
            - MiniMax-M3
          example: MiniMax-M3
        max_tokens:
          type: integer
          description: |-
            생성 내용 길이의 상한 지정(Token 수)

            **설명**:
            - MiniMax-M3 권장 **131,072**(128K), 상한 **524,288**(512K)
            - thinking으로 생성된 token도 이 상한에 포함됩니다
            - 상한을 초과하는 내용은 잘립니다; 생성이 `length` 사유로 중단되면 이 값을 높여 보세요
          minimum: 1
          maximum: 524288
          example: 1024
        messages:
          type: array
          description: |-
            대화 메시지 목록, 턴마다 user / assistant 교대

            **설명**:
            - 최소 1개의 메시지를 포함해야 함
            - 마지막 메시지는 일반적으로 `role=user`
          items:
            $ref: '#/components/schemas/InputMessage'
          minItems: 1
        system:
          description: |-
            시스템 프롬프트, AI 역할과 동작을 설정하는 데 사용

            **설명**:
            - 문자열 또는 문자열 배열 지원
            - 최상위 `system` 필드로 전달
          oneOf:
            - type: string
              example: You are a helpful assistant.
            - type: array
              description: 콘텐츠 블록 배열 형식의 시스템 프롬프트. text 블록은 cache_control을 가질 수 있음
              items:
                type: object
                required:
                  - type
                  - text
                properties:
                  type:
                    type: string
                    enum:
                      - text
                  text:
                    type: string
                  cache_control:
                    $ref: '#/components/schemas/CacheControl'
        temperature:
          type: number
          description: |-
            샘플링 온도

            **설명**:
            - 범위 `[0, 2]`
            - 기본값 1; 값이 높을수록 발산적이고, 낮을수록 확정적
          minimum: 0
          maximum: 2
          default: 1
          example: 1
        top_p:
          type: number
          description: |-
            핵 샘플링 임계값

            **설명**:
            - 범위 `[0, 1]`, MiniMax-M3 기본값 0.95
            - temperature와 top_p를 동시에 조정하지 않는 것을 권장
          minimum: 0
          maximum: 1
          default: 0.95
          example: 0.95
        stream:
          type: boolean
          description: |-
            SSE 스트리밍으로 반환할지 여부

            - `true`: Server-Sent Events 스트리밍 반환
            - `false`: 완전한 응답 후 한 번에 반환(기본값)
          default: false
          example: false
        thinking:
          type: object
          description: >-
            심층 사고 제어. thinking을 활성화한 후에는 멀티턴 대화에서 thinking 블록을 원본 그대로 되돌려 보내야
            합니다


            **설명**:

            - **기본값 `adaptive`**: 모델이 문제 난이도에 따라 심층 사고 여부를 자율적으로 결정

            - 활성화 시 응답 `content` 배열에 `type="thinking"`의 추론 과정 block이 나타납니다(출력
            token으로 계산)
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - disabled
                - adaptive
              description: |-
                - `adaptive`: 모델이 사고가 필요한지 자율적으로 판단(권장 기본값)
                - `disabled`: 사고를 비활성화하고 직접 답변
              default: adaptive
        tools:
          type: array
          description: |-
            도구 정의 목록

            **설명**:
            - Anthropic tool 정의 규범을 따름
            - `input_schema`는 JSON Schema 객체를 사용
          items:
            $ref: '#/components/schemas/Tool'
        tool_choice:
          type: object
          description: 도구 선택 전략. auto와 none만 지원
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - auto
                - none
              description: |-
                - `auto`: 모델이 도구 호출 여부를 자동으로 결정(tools 제공 시 기본값)
                - `none`: 도구 호출 금지
        metadata:
          type: object
          description: 요청 메타데이터
          properties:
            user_id:
              type: string
              description: >-
                종단 사용자를 나타내는 고유 식별자로, 사용자 단위 모니터링 및 남용 탐지에 사용할 수 있습니다(해시 처리된 ID
                사용 권장)
    MessageResponse:
      type: object
      description: Anthropic 스타일의 메시지 응답
      properties:
        id:
          type: string
          description: 메시지 고유 ID
        type:
          type: string
          enum:
            - message
          description: 응답 객체 유형
        role:
          type: string
          enum:
            - assistant
        model:
          type: string
          description: 실제 사용된 모델
          example: MiniMax-M3
        content:
          type: array
          description: |-
            응답 콘텐츠 블록 목록

            **포함될 수 있는 block type**:
            - `thinking`: 추론 과정(thinking이 적용될 때만)
            - `text`: 최종 답변 텍스트
            - `tool_use`: 모델이 시작한 도구 호출
          items:
            $ref: '#/components/schemas/OutputContentBlock'
        stop_reason:
          type: string
          description: |-
            정지 사유

            - `end_turn`: 자연스러운 종료
            - `max_tokens`: max_tokens 상한 도달
            - `tool_use`: 모델이 도구 호출을 트리거
          enum:
            - end_turn
            - max_tokens
            - tool_use
        usage:
          $ref: '#/components/schemas/AnthropicUsage'
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          enum:
            - error
        error:
          type: object
          properties:
            type:
              type: string
              description: >-
                오류 유형(예: invalid_request_error / authentication_error /
                billing_error 등)
            message:
              type: string
              description: 오류 설명
        request_id:
          type: string
          description: 요청 추적 ID
    InputMessage:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - user
            - assistant
            - user_system
            - group
            - sample_message_user
            - sample_message_ai
          description: >-
            메시지 발신 측 역할. MiniMax-M3는 user / assistant 교대 메시지를 사용


            - `user`: 사용자 메시지(`tool_result` block을 되돌려 보내는 데에도 사용)

            - `assistant`: 어시스턴트 과거 응답(`text` / `thinking` / `tool_use` blocks
            포함 가능)


            ⚠️ **`system`은 허용되지 않음**: 시스템 프롬프트는 최상위 `system` 필드를 사용하세요.
        content:
          description: >-
            메시지 내용


            **설명**:

            - 순수 텍스트일 경우 문자열을 직접 전달

            - 구조화된 경우 content block 배열을 전달(`text` / `image` / `video` /
            `tool_use` / `tool_result` / `thinking`)
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/ContentBlock'
    CacheControl:
      type: object
      description: 프롬프트 캐싱 마커
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - ephemeral
          description: 캐시 마커 유형
    Tool:
      type: object
      required:
        - name
        - input_schema
      properties:
        name:
          type: string
          description: |-
            도구 이름

            **설명**:
            - `a-zA-Z0-9_-`만 허용
            - 최대 64자
        description:
          type: string
          description: 도구 기능 설명, 모델이 언제 호출할지 판단하도록 도움
        input_schema:
          type: object
          description: |-
            도구 입력 파라미터의 JSON Schema 객체

            **설명**:
            - `type`은 반드시 `object`여야 함
            - `properties`와 `required`를 선언해야 함
        cache_control:
          $ref: '#/components/schemas/CacheControl'
    OutputContentBlock:
      type: object
      description: 응답 내의 콘텐츠 블록
      properties:
        type:
          type: string
          enum:
            - text
            - thinking
            - tool_use
        text:
          type: string
          description: type=`text`일 때의 텍스트
        thinking:
          type: string
          description: type=`thinking`일 때의 추론 과정 텍스트
        signature:
          type: string
          description: type=`thinking`일 때의 무결성 서명, 멀티턴 컨텍스트 검증에 사용
        id:
          type: string
          description: type=`tool_use`일 때의 도구 호출 ID
        name:
          type: string
          description: type=`tool_use`일 때의 도구 이름
        input:
          type: object
          description: type=`tool_use`일 때 모델이 생성한 JSON 입력 파라미터
    AnthropicUsage:
      type: object
      description: Token 사용 통계(Anthropic 규범)
      properties:
        input_tokens:
          type: integer
          description: 입력 token 수(캐시 미적중 부분)
          example: 7
        output_tokens:
          type: integer
          description: 출력 token 수(thinking 포함)
          example: 77
        cache_creation_input_tokens:
          type: integer
          description: 캐시 생성된 입력 token 수
          example: 0
        cache_read_input_tokens:
          type: integer
          description: 캐시에 적중한 입력 token 수
          example: 0
    ContentBlock:
      type: object
      description: |-
        메시지 콘텐츠 블록

        **지원 type**:
        - `text`: 텍스트 내용
        - `image`: 이미지 입력(MiniMax-M3 전용)
        - `video`: 비디오 입력(MiniMax-M3 전용)
        - `tool_use`: 이전 턴 assistant 도구 호출을 되돌려 보냄
        - `tool_result`: 도구 실행 결과
        - `thinking`: 이전 턴 assistant 사고 내용을 되돌려 보냄
        - `mid_conv_system`: 대화 중간에 삽입하는 시스템 지시
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - text
            - image
            - video
            - tool_use
            - tool_result
            - thinking
            - mid_conv_system
        text:
          type: string
          description: type=`text`일 때의 텍스트 내용
        source:
          $ref: '#/components/schemas/MediaSource'
          description: 이미지 또는 비디오 소스, type=`image` 또는 type=`video`일 때 사용(MiniMax-M3 전용)
        id:
          type: string
          description: 도구 호출 ID(tool_use 시 필수)
        name:
          type: string
          description: 도구 이름(tool_use 시 필수)
        input:
          type: object
          description: 도구 입력 파라미터(tool_use 시, JSON 객체)
        tool_use_id:
          type: string
          description: 대응하는 도구 호출 ID(tool_result 시 필수, tool_use.id에 매핑)
        content:
          description: 도구 실행 결과(tool_result), 문자열 또는 content block 배열
          oneOf:
            - type: string
            - type: array
              items:
                type: object
        thinking:
          type: string
          description: 되돌려 보내는 assistant 사고 과정 내용(type=`thinking`일 때 사용)
        signature:
          type: string
          description: 되돌려 보내는 thinking 내용 서명, 멀티턴 이어쓰기 시 원본 그대로 되돌려 보내야 함
        cache_control:
          $ref: '#/components/schemas/CacheControl'
    MediaSource:
      type: object
      description: |-
        이미지 또는 비디오 콘텐츠 블록의 미디어 소스

        - 이미지는 JPEG / PNG / GIF / WEBP 지원, 한 장당 최대 10 MB
        - 비디오는 MP4 / AVI / MOV / MKV 지원, URL / Base64 최대 50 MB
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - base64
            - url
          description: 미디어 소스 유형
        media_type:
          type: string
          description: 'base64 입력 시 필수, 예: `image/png` 또는 `video/mp4`'
        data:
          type: string
          description: base64로 인코딩된 미디어 바이트
        url:
          type: string
          description: 공개 URL; 비디오는 `mm_file://{file_id}` 형식의 파일 참조도 사용 가능
        detail:
          type: string
          enum:
            - low
            - default
            - high
          default: default
          description: 이해 정밀도, 기본값 default. 해상도가 높을수록 token 소비가 많아짐
        fps:
          type: number
          minimum: 0.2
          maximum: 5
          default: 1
          description: >-
            비디오 프레임 추출 빈도, 기본값 1, 범위 [0.2, 5]. 값이 높을수록 화면 변화에 더 민감하고 token 소비가
            많아짐
        max_long_side_pixel:
          type: integer
          minimum: 1
          description: 이미지 또는 비디오 프레임 최장변 픽셀 제약
  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

        ```


        **참고**: EvoLink는 `/v1/messages`에 대해 Bearer Token 인증을 통일적으로 사용합니다.

````