> ## 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 Chat Completions API リファレンス

> - OpenAI Chat Completions. `model` でモデルを選択します。
- **マルチターン対話**：単一ターンまたは複数ターンの文脈を含む対話に対応します
- **システムプロンプト**：`role=system` メッセージで AI の役割と振る舞いを設定します
- `MiniMax-M4`、`MiniMax-M3.1-Flash`、`MiniMax-M3` は画像と動画に対応しています。`MiniMax-M2.5` はテキストのみです。
- **推論**: 推論は `reasoning_content` に返り、`content` には最終回答だけが入ります。`MiniMax-M3` は既定で `content` の先頭に `<think>...</think>` を含めます。`reasoning_split: true` にすると推論は `reasoning_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]
>
> `MiniMax-M4` と `MiniMax-M3.1-Flash` は常に推論します。`reasoning_effort` は `low`、`medium`、`high`、`xhigh`、`max`（既定値）から選べます。推論を無効にするか `none` を指定すると HTTP 400 になります。`MiniMax-M3` の推論は既定で有効ですが、`thinking.type: "disabled"` で無効にできます。`MiniMax-M2.5` は常に推論します。`MiniMax-M3` と `MiniMax-M2.5` は深さの変更に対応していません。

> [!NOTE]
>
> **最大出力（推論トークンを含む）** — `MiniMax-M4` 262,144, `MiniMax-M3.1-Flash` 524,288, `MiniMax-M3` 524,288, `MiniMax-M2.5` 32,768. `MiniMax-M4` に切り替えるときは `max_completion_tokens` を 262,144 以下にしてください。

> [!NOTE]
>
> `MiniMax-M4`、`MiniMax-M3.1-Flash`、`MiniMax-M3` は画像と動画に対応しています。`MiniMax-M2.5` はテキストのみです。画像と動画は `messages[].content[]` の `image_url`・`video_url` ブロックで渡します。


## OpenAPI

````yaml ja/api-manual/language-series/minimax/chat-completions/chat-completions-reference.json POST /v1/chat/completions
openapi: 3.1.0
info:
  title: MiniMax Chat Completions API リファレンス
  description: >-
    MiniMax Chat Completions API リファレンス。`model`
    でモデルを選択します。`MiniMax-M4`、`MiniMax-M3.1-Flash`、`MiniMax-M3`
    は画像と動画に対応しています。`MiniMax-M2.5` はテキストのみです。


    - **ストリーミング出力**：SSE ストリーミングに対応

    - **ツール呼び出し**：Function Calling に対応


    共通のプレフィックスは自動的にキャッシュされます。ヒットしたトークンは
    `usage.prompt_tokens_details.cached_tokens`
    に記録され、キャッシュヒット料金が適用されます。推論トークンも出力上限に含まれ、出力料金が適用されます。複数ターンでは
    `reasoning_content` と `tool_calls` を含む直前のアシスタントメッセージ全体を `messages` に追加します。


    モデルごとの上限と推論設定は `model`、`thinking`、`reasoning_effort`、`max_completion_tokens`
    の説明を参照してください。
  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 Chat Completions API リファレンス (OpenAI 互換)
      description: >-
        - OpenAI Chat Completions. `model` でモデルを選択します。

        - **マルチターン対話**：単一ターンまたは複数ターンの文脈を含む対話に対応します

        - **システムプロンプト**：`role=system` メッセージで AI の役割と振る舞いを設定します

        - `MiniMax-M4`、`MiniMax-M3.1-Flash`、`MiniMax-M3`
        は画像と動画に対応しています。`MiniMax-M2.5` はテキストのみです。

        - **推論**: 推論は `reasoning_content` に返り、`content`
        には最終回答だけが入ります。`MiniMax-M3` は既定で `content` の先頭に `<think>...</think>`
        を含めます。`reasoning_split: true` にすると推論は `reasoning_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: createChatCompletionMiniMax
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
            examples:
              simple_text:
                summary: シングルターンのテキスト対話
                value:
                  model: MiniMax-M4
                  messages:
                    - role: user
                      content: Please introduce yourself.
                  max_completion_tokens: 131072
              multi_turn:
                summary: マルチターン対話（文脈理解）
                value:
                  model: MiniMax-M4
                  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-M4
                  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-M4
                  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-M4
                  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-M4
                  messages:
                    - role: user
                      content:
                        - type: text
                          text: Summarize this video.
                        - type: video_url
                          video_url:
                            url: https://example.com/video.mp4
                            fps: 2
                            detail: default
                  max_completion_tokens: 131072
              tool_calling:
                summary: Function Calling ツール呼び出し
                value:
                  model: MiniMax-M4
                  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-M4
                  stream: true
                  stream_options:
                    include_usage: true
                  messages:
                    - role: user
                      content: Write a short poem about spring.
                  max_completion_tokens: 131072
              flash:
                summary: MiniMax-M3.1-Flash を呼び出す
                value:
                  model: MiniMax-M3.1-Flash
                  messages:
                    - role: user
                      content: Please introduce yourself.
                  max_completion_tokens: 131072
              m3_disable_thinking:
                summary: '`MiniMax-M3` の推論を無効にする'
                description: >-
                  推論を無効化できるのは `MiniMax-M3` のみです。他のモデルに `disabled` を指定すると HTTP
                  400 が返ります。
                value:
                  model: MiniMax-M3
                  thinking:
                    type: disabled
                  messages:
                    - role: user
                      content: Explain recursion in one sentence.
                  max_completion_tokens: 131072
              m3_reasoning_split:
                summary: '`MiniMax-M3` の推論を本文と分けて取得する'
                description: >-
                  `MiniMax-M3` は既定で `content` の先頭に `<think>...</think>`
                  を含めます。`reasoning_split: true` にすると推論は `reasoning_content`
                  に分かれます。
                value:
                  model: MiniMax-M3
                  reasoning_split: true
                  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
              m25_text:
                summary: MiniMax-M2.5 を呼び出す (テキストのみ)
                description: '`MiniMax-M2.5` はテキスト入力のみ対応し、最大出力は 32,768 トークンです。'
                value:
                  model: MiniMax-M2.5
                  messages:
                    - role: user
                      content: Explain recursion in one sentence.
                  max_completion_tokens: 4096
      responses:
        '200':
          description: 対話の生成に成功しました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponse'
              examples:
                with_thinking:
                  summary: 思考内容を含むレスポンス
                  value:
                    id: example_c425f5
                    choices:
                      - finish_reason: stop
                        index: 0
                        message:
                          content: '0.05'
                          role: assistant
                          name: MiniMax AI
                          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
                direct_answer:
                  summary: 直接の回答（思考内容なし）
                  value:
                    id: example_c7cb0e
                    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
                    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
                tool_calls:
                  summary: ツール呼び出しがトリガー（finish_reason=tool_calls）
                  value:
                    id: example_2d249e
                    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_example_1
                              type: function
                              function:
                                name: get_product_stock
                                arguments: '{"product_id": "demo-item-001"}'
                              index: 0
                    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
                length:
                  summary: 出力上限に到達（finish_reason=length）
                  value:
                    id: example_a5ad57
                    choices:
                      - finish_reason: length
                        index: 0
                        message:
                          content: ''
                          role: assistant
                          name: MiniMax AI
                          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
                m3_inline_thinking:
                  summary: '`MiniMax-M3` の既定の応答（`content` の先頭に推論を含む）'
                  value:
                    id: example_818ad0
                    choices:
                      - finish_reason: stop
                        index: 0
                        message:
                          content: >-
                            <think>Let the ball cost x. Then 2x + 1 = 1.10, so x
                            = 0.05.</think>


                            0.05
                          role: assistant
                    created: 1796307610
                    model: MiniMax-M3
                    object: chat.completion
                    usage:
                      total_tokens: 308
                      total_characters: 0
                      prompt_tokens: 224
                      completion_tokens: 84
                      completion_tokens_details:
                        reasoning_tokens: 78
                      prompt_tokens_details:
                        cached_tokens: 193
                m25_answer:
                  summary: '`MiniMax-M2.5` のレスポンス'
                  value:
                    id: chatcmpl-example
                    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.
                          reasoning_content: >-
                            The user wants a one-sentence definition of
                            recursion.
                          role: assistant
                    created: 1796307389
                    model: MiniMax-M2.5
                    object: chat.completion
                    usage:
                      prompt_tokens: 44
                      completion_tokens: 90
                      total_tokens: 134
                      completion_tokens_details:
                        reasoning_tokens: 84
                      prompt_tokens_details:
                        cached_tokens: 0
        '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: >-
            | モデル | コンテキスト（トークン） | 最大出力（トークン） |

            | --- | --- | --- |

            | `MiniMax-M4` | 1,000,000 | 262,144 |

            | `MiniMax-M3.1-Flash` | 1,000,000 | 524,288 |

            | `MiniMax-M3` | 1,000,000 | 524,288 |

            | `MiniMax-M2.5` | 204,800 | 32,768 |


            `MiniMax-M4` と `MiniMax-M3.1-Flash` では推論が常に有効です。推論の深さは
            `reasoning_effort` で設定します。`MiniMax-M3` は既定で推論します。`thinking.type` を
            `disabled` にすると直接回答します。`MiniMax-M3` と `MiniMax-M2.5`
            は推論の深さを調整できません。`MiniMax-M2.5`
            の推論は常に有効で深さは固定です。`MiniMax-M4`、`MiniMax-M3.1-Flash`、`MiniMax-M3`
            は画像と動画に対応しています。`MiniMax-M2.5` はテキストのみです。推論トークンも出力上限に含まれ、出力料金が適用されます。
          enum:
            - MiniMax-M4
            - MiniMax-M3.1-Flash
            - MiniMax-M3
            - MiniMax-M2.5
          example: MiniMax-M4
        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: >-
            - `MiniMax-M4`, `MiniMax-M3.1-Flash` — 推論の深さは
            `low`、`medium`、`high`、`xhigh`、`max`（既定値）です。`none` は HTTP 400
            になります。深くするほど通常は推論トークンと応答時間が増えます。

            - `MiniMax-M3` と `MiniMax-M2.5`
            は推論の深さを調整できません。これらのモデルではこのパラメーターを省略してください。
          enum:
            - low
            - medium
            - high
            - xhigh
            - max
          example: high
        thinking:
          type: object
          description: >-
            - `MiniMax-M4` と `MiniMax-M3.1-Flash` は `thinking` を省略するか、`type` に
            `adaptive` を指定します。`disabled` は HTTP 400 になります。

            - `MiniMax-M3` は既定で推論します。`thinking.type` を `disabled` にすると直接回答します。

            - `MiniMax-M2.5` の推論は常に有効で深さは固定です。この項目は省略してください。
          properties:
            type:
              type: string
              enum:
                - adaptive
                - disabled
              default: adaptive
        reasoning_split:
          type: boolean
          description: >-
            `MiniMax-M4` と `MiniMax-M3.1-Flash` の推論は `reasoning_content`
            に返ります。`reasoning_split` は省略するか `true` を指定してください。`false` は HTTP 400
            になります。`MiniMax-M2.5` では常に `reasoning_content` に返ります。`MiniMax-M3`
            は既定で `content` の先頭に `<think>...</think>` を含めます。`reasoning_split:
            true` にすると推論は `reasoning_content` に分かれます。
          example: true
        temperature:
          type: number
          description: >-
            `MiniMax-M4`, `MiniMax-M3.1-Flash`, `MiniMax-M3` — 温度は 1
            に固定され、他の値を指定しても変わりません。`MiniMax-M2.5` の既定値は 1
            で、変更できます。温度が低いほど出力は安定します。`temperature` と `top_p` は一度に片方だけ調整してください。
          default: 1
          example: 1
        top_p:
          type: number
          description: >-
            `MiniMax-M4`, `MiniMax-M3.1-Flash`, `MiniMax-M3` — 0.95 固定です。指定する場合は
            0 より大きく 1 以下の値を使用してください。`MiniMax-M2.5` の既定値は 0.95
            で、変更できます。`temperature` と `top_p` は一度に片方だけ調整してください。
          exclusiveMinimum: 0
          maximum: 1
          default: 0.95
          example: 0.95
        max_completion_tokens:
          type: integer
          description: >-
            最大出力（推論トークンを含む）


            | モデル | 推奨出力 | 最大出力 |

            | --- | --- | --- |

            | `MiniMax-M4` | 131,072 | 262,144 |

            | `MiniMax-M3.1-Flash` | 131,072 | 524,288 |

            | `MiniMax-M3` | 131,072 | 524,288 |

            | `MiniMax-M2.5` | 必要に応じて設定 | 32,768 |


            出力トークンはまず 1,024
            以上を目安にしてください。推論で使い切ると本文が返らないことがあります（`finish_reason=length`）。
          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
    ChatCompletionResponse:
      type: object
      properties:
        id:
          type: string
          description: 対話完了の一意の識別子
          example: chatcmpl-example
        model:
          type: string
          description: 実際に使用されたモデル名
          example: MiniMax-M4
        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'
    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: >-
            テキストは文字列で、画像・動画を含む入力は `text`、`image_url`、`video_url`
            のブロック配列で渡します。`MiniMax-M4`、`MiniMax-M3.1-Flash`、`MiniMax-M3`
            は画像と動画に対応しています。`MiniMax-M2.5` はテキストのみです。履歴を含む 1 リクエストあたり画像 200 枚、動画
            20 本まで、リクエスト本文は最大 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` の場合）。1 枚あたり最大 10 MB、JPEG / PNG / GIF / WEBP
            に対応
          required:
            - url
          properties:
            url:
              type: string
              description: 画像 URL、または `data:` で始まる base64 data URL
            detail:
              type: string
              description: |-
                画像の解析解像度を制御します

                - `low`：低精度、消費トークンが少ない
                - `default`：デフォルト精度
                - `high`：高精度、より細部を認識できるが消費トークンが多い
              enum:
                - low
                - default
                - high
              default: default
            max_long_side_pixel:
              type: integer
              description: 画像の最長辺のピクセル上限
              minimum: 1
        video_url:
          type: object
          description: '`type=video_url` — 動画形式は MP4、AVI、MOV、MKV に対応し、1 本あたり最大 50 MB、30 分です。'
          required:
            - url
          properties:
            url:
              type: string
              description: 動画の URL または Base64 データ URL (`data:`).
            detail:
              type: string
              description: 動画のフレーム抽出解像度を制御します
              enum:
                - low
                - default
                - high
              default: default
            fps:
              type: number
              description: >-
                動画のサンプリング頻度（フレーム/秒）。既定値は 2、範囲は 0.2～5
                です。高いほど動きを細かく捉え、使用トークン数が増えます。
              minimum: 0.2
              maximum: 5
              default: 2
            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` の場合があります。`MiniMax-M3` は既定で `content` の先頭に
            `<think>...</think>` を含めます。`reasoning_split: true` にすると推論は
            `reasoning_content` に分かれます。
          example: '0.05'
        reasoning_content:
          type: string
          description: >-
            `MiniMax-M3` は既定で `content` の先頭に `<think>...</think>`
            を含めます。`reasoning_split: true` にすると推論は `reasoning_content`
            に分かれます。簡単な質問で推論が生成されなかった場合、このフィールドは省略されます。
          example: Let the ball cost x. Then 2x + 1 = 1.10, so x = 0.05.
        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 文字列）
              index:
                type: integer
                description: ツール呼び出しのインデックス
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        すべての API で Bearer Token 認証が必要です

        **API キーの取得：**

        [API キー管理ページ](https://evolink.ai/dashboard/keys)で API キーを取得してください

        **リクエストヘッダーに追加：**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.