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

> - Anthropic Messages. `model` でモデルを選択します。
- リクエスト / レスポンスの構造は Anthropic API に準拠しています
- `MiniMax-M4`、`MiniMax-M3.1-Flash`、`MiniMax-M3` は画像と動画に対応しています。`MiniMax-M2.5` はテキストのみです。
- **システムプロンプト**：トップレベルの `system` で渡します
- `MiniMax-M4` と `MiniMax-M3.1-Flash` では推論が常に有効で、推論は `content[type=thinking]` ブロックとして返ります。`MiniMax-M3` は既定では推論しません。`thinking` に `{"type": "adaptive"}` を指定すると、推論が有効になり `thinking` ブロックが返ります。`MiniMax-M2.5` は推論しますが `thinking` ブロックは返しません。推論トークンは `output_tokens` に含まれます。
- **ストリーミング出力**：SSE イベントストリーム
- **ツール呼び出し**：Anthropic の `tool_use` / `tool_result` フローと互換性があります。このエンドポイントでは `MiniMax-M2.5` のツール呼び出しに対応していません。ツールを使う場合は [Chat Completions](/ja/api-manual/language-series/minimax/chat-completions/chat-completions-reference) を使用してください。

**ストリーミングイベント**：`message_start` → `content_block_start` → `content_block_delta`（`thinking_delta` / `signature_delta` / `text_delta` / `input_json_delta`）→ `content_block_stop` → `message_delta` → `message_stop`。途中で `ping` が送信される場合があります。最終的な使用量は `message_delta` イベントの `usage` を参照してください。

> [!NOTE]
>
> **BaseURL**：デフォルトの BaseURL は `https://direct.evolink.ai` で、テキストモデルへの対応が優れており、長時間接続をサポートします。`https://api.evolink.ai` はマルチモーダルサービスの主力エンドポイントで、テキストモデルに対しては代替アドレスとして使用されます。

> [!NOTE]
>
> `MiniMax-M4` と `MiniMax-M3.1-Flash` は常に推論します。`output_config.effort` は `low`、`medium`、`high`、`xhigh`、`max`（既定値）から選べます。`thinking.type` に `disabled`、または `effort` に `none` を指定すると HTTP 400 になります。`MiniMax-M3` は既定では推論しません。`thinking` に `{"type": "adaptive"}` を指定すると、推論が有効になり `thinking` ブロックが返ります。`MiniMax-M2.5` は推論しますが `thinking` ブロックは返しません。推論トークンは `output_tokens` に含まれます。

> [!NOTE]
>
> **最大出力（推論トークンを含む）** — `MiniMax-M4` 262,144, `MiniMax-M3.1-Flash` 524,288, `MiniMax-M3` 524,288, `MiniMax-M2.5` 32,768.

> [!NOTE]
>
> `MiniMax-M2.5` はテキスト入力のみ対応し、最大出力は 32,768 トークンです。このエンドポイントでは `MiniMax-M2.5` のツール呼び出しに対応していません。ツールを使う場合は [Chat Completions](https://evolink.ai/docs/ja/api-manual/language-series/minimax/chat-completions/chat-completions-reference.md) を使用してください。


## OpenAPI

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


    `system`、`temperature`、`top_p`、`stream`、`thinking`、`output_config`、`tools`、`tool_choice`
    は任意です。モデルごとの上限と推論設定は `model`、`thinking`、`output_config`、`max_tokens`
    を参照してください。


    このエンドポイントは `cache_control`
    に対応していないため省略してください。共通のプレフィックスは自動的にキャッシュされます。ヒットしたトークンは
    `usage.cache_read_input_tokens` に記録され、キャッシュヒット料金が適用されます。`signature` を含む
    `thinking` と `tool_use` を含め、直前のアシスタントのブロック全体を次の入力に渡します。
  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 Messages API リファレンス (Anthropic 互換)
      description: >-
        - Anthropic Messages. `model` でモデルを選択します。

        - リクエスト / レスポンスの構造は Anthropic API に準拠しています

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

        - **システムプロンプト**：トップレベルの `system` で渡します

        - `MiniMax-M4` と `MiniMax-M3.1-Flash` では推論が常に有効で、推論は
        `content[type=thinking]` ブロックとして返ります。`MiniMax-M3` は既定では推論しません。`thinking`
        に `{"type": "adaptive"}` を指定すると、推論が有効になり `thinking`
        ブロックが返ります。`MiniMax-M2.5` は推論しますが `thinking` ブロックは返しません。推論トークンは
        `output_tokens` に含まれます。

        - **ストリーミング出力**：SSE イベントストリーム

        - **ツール呼び出し**：Anthropic の `tool_use` / `tool_result`
        フローと互換性があります。このエンドポイントでは `MiniMax-M2.5` のツール呼び出しに対応していません。ツールを使う場合は
        [Chat
        Completions](/ja/api-manual/language-series/minimax/chat-completions/chat-completions-reference)
        を使用してください。


        **ストリーミングイベント**：`message_start` → `content_block_start` →
        `content_block_delta`（`thinking_delta` / `signature_delta` /
        `text_delta` / `input_json_delta`）→ `content_block_stop` →
        `message_delta` → `message_stop`。途中で `ping` が送信される場合があります。最終的な使用量は
        `message_delta` イベントの `usage` を参照してください。
      operationId: createMessageMiniMax
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMessageRequest'
            examples:
              simple:
                summary: 最小限の実行可能なリクエスト
                value:
                  model: MiniMax-M4
                  max_tokens: 131072
                  messages:
                    - role: user
                      content: Hello! How can you help me?
              system_prompt:
                summary: システムプロンプトの使用
                value:
                  model: MiniMax-M4
                  max_tokens: 131072
                  system: >-
                    You are a technical editor. Keep your answers clear and
                    concise.
                  messages:
                    - role: user
                      content: >-
                        Describe the benefits of clear technical documentation
                        in three sentences.
              effort:
                summary: 思考の深さの調整（output_config.effort）
                value:
                  model: MiniMax-M4
                  max_tokens: 131072
                  output_config:
                    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?
              image_understanding:
                summary: 画像理解（マルチモーダル content block）
                value:
                  model: MiniMax-M4
                  max_tokens: 131072
                  messages:
                    - role: user
                      content:
                        - type: text
                          text: What is shown in this image?
                        - type: image
                          source:
                            type: url
                            url: https://example.com/image.jpeg
              video_understanding:
                summary: 動画理解（マルチモーダルコンテンツブロック）
                value:
                  model: MiniMax-M4
                  max_tokens: 131072
                  messages:
                    - role: user
                      content:
                        - type: text
                          text: Summarize this video.
                        - type: video
                          source:
                            type: url
                            url: https://example.com/video.mp4
                            fps: 1
              tool_use:
                summary: ツール呼び出し（Anthropic tool_use スタイル）
                value:
                  model: MiniMax-M4
                  max_tokens: 131072
                  messages:
                    - role: user
                      content: Check the stock for product demo-item-001.
                  tools:
                    - name: get_product_stock
                      description: Get the current stock level for a product.
                      input_schema:
                        type: object
                        properties:
                          product_id:
                            type: string
                            description: Product identifier.
                        required:
                          - product_id
                  tool_choice:
                    type: auto
              streaming:
                summary: ストリーミング出力（SSE）
                value:
                  model: MiniMax-M4
                  max_tokens: 131072
                  stream: true
                  messages:
                    - role: user
                      content: Write a short poem about spring.
              m3_thinking:
                summary: '`MiniMax-M3` の推論を有効にする'
                description: >-
                  `MiniMax-M3` は既定では推論しません。`thinking` に `{"type": "adaptive"}`
                  を指定すると、推論が有効になり `thinking` ブロックが返ります。
                value:
                  model: MiniMax-M3
                  max_tokens: 131072
                  thinking:
                    type: adaptive
                  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?
              m25_text:
                summary: MiniMax-M2.5 を呼び出す (テキストのみ)
                description: >-
                  `MiniMax-M2.5` はテキスト入力のみ対応し、最大出力は 32,768 トークンです。このエンドポイントでは
                  `MiniMax-M2.5` のツール呼び出しに対応していません。ツールを使う場合は [Chat
                  Completions](/ja/api-manual/language-series/minimax/chat-completions/chat-completions-reference)
                  を使用してください。
                value:
                  model: MiniMax-M2.5
                  max_tokens: 4096
                  messages:
                    - role: user
                      content: Explain recursion in one sentence.
      responses:
        '200':
          description: メッセージオブジェクト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              examples:
                with_thinking:
                  summary: 思考内容を含むレスポンス（thinking ブロック）
                  value:
                    id: example_a9e449
                    type: message
                    role: assistant
                    model: MiniMax-M3.1-Flash
                    content:
                      - thinking: Let the ball cost x. Then 2x + 1 = 1.10, so x = 0.05.
                        signature: EXAMPLE_THINKING_SIGNATURE
                        type: thinking
                      - text: '0.05'
                        type: text
                    usage:
                      input_tokens: 55
                      output_tokens: 66
                      cache_creation_input_tokens: 0
                      cache_read_input_tokens: 174
                      output_tokens_details:
                        thinking_tokens: 63
                    stop_reason: end_turn
                direct_answer:
                  summary: 直接の回答（思考内容なし）
                  value:
                    id: example_ac2b01
                    type: message
                    role: assistant
                    model: MiniMax-M3.1-Flash
                    content:
                      - text: >-
                          Recursion is a technique in which a function calls
                          itself to solve smaller instances of a problem.
                        type: text
                    usage:
                      input_tokens: 23
                      output_tokens: 6
                      cache_creation_input_tokens: 0
                      cache_read_input_tokens: 184
                    stop_reason: end_turn
                tool_use:
                  summary: ツール呼び出しがトリガー（stop_reason=tool_use）
                  value:
                    id: example_99733d
                    type: message
                    role: assistant
                    model: MiniMax-M3.1-Flash
                    content:
                      - type: tool_use
                        id: call_example_1
                        name: get_product_stock
                        input:
                          product_id: demo-item-001
                    usage:
                      input_tokens: 283
                      output_tokens: 31
                      cache_creation_input_tokens: 0
                      cache_read_input_tokens: 174
                    stop_reason: tool_use
                m25_answer:
                  summary: '`MiniMax-M2.5` のレスポンス (`thinking` ブロックなし)'
                  value:
                    id: chatcmpl-example
                    type: message
                    role: assistant
                    content:
                      - type: text
                        text: >-
                          Recursion is a technique in which a function calls
                          itself to solve smaller instances of a problem.
                    stop_reason: end_turn
                    model: MiniMax-M2.5
                    usage:
                      input_tokens: 44
                      cache_creation_input_tokens: 0
                      cache_read_input_tokens: 0
                      output_tokens: 101
        '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
        - max_tokens
      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` では推論が常に有効です。推論の深さは
            `output_config.effort` で設定します。`MiniMax-M3` は既定では推論しません。`thinking` に
            `{"type": "adaptive"}` を指定すると、推論が有効になり `thinking`
            ブロックが返ります。`MiniMax-M3` と `MiniMax-M2.5`
            は推論の深さを調整できません。`MiniMax-M2.5` は推論しますが `thinking` ブロックは返しません。推論トークンは
            `output_tokens`
            に含まれます。`MiniMax-M4`、`MiniMax-M3.1-Flash`、`MiniMax-M3`
            は画像と動画に対応しています。`MiniMax-M2.5` はテキストのみです。このエンドポイントでは `MiniMax-M2.5`
            のツール呼び出しに対応していません。ツールを使う場合は [Chat
            Completions](/ja/api-manual/language-series/minimax/chat-completions/chat-completions-reference)
            を使用してください。推論トークンも出力上限に含まれ、出力料金が適用されます。
          enum:
            - MiniMax-M4
            - MiniMax-M3.1-Flash
            - MiniMax-M3
            - MiniMax-M2.5
          example: MiniMax-M4
        max_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
            以上を目安にしてください。推論で使い切ると本文が返らないことがあります（`stop_reason=max_tokens`）。
          minimum: 1
          maximum: 524288
          example: 131072
        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: コンテンツブロック配列形式のシステムプロンプト
              items:
                type: object
                required:
                  - type
                  - text
                properties:
                  type:
                    type: string
                    enum:
                      - text
                  text:
                    type: string
        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
        stream:
          type: boolean
          description: |-
            SSE ストリーミングで返すかどうか

            - `true`：Server-Sent Events のストリーミング返却
            - `false`：完全なレスポンスを待ってから一括で返します（デフォルト）
          default: false
          example: false
        thinking:
          type: object
          description: >-
            - `MiniMax-M4` と `MiniMax-M3.1-Flash` は `thinking` を省略するか、`type` に
            `adaptive` を指定します。`disabled` は HTTP 400 になります。

            - `MiniMax-M3` は既定では推論しません。`thinking` に `{"type": "adaptive"}`
            を指定すると、推論が有効になり `thinking` ブロックが返ります。`{"type": "disabled"}`
            を指定すると推論をオフにします。

            - `MiniMax-M2.5` は推論しますが `thinking` ブロックは返しません。推論トークンは
            `output_tokens` に含まれます。

            - 推論トークンも出力上限に含まれ、出力料金が適用されます。
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - adaptive
                - disabled
        output_config:
          type: object
          description: 出力設定
          properties:
            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
        tools:
          type: array
          description: >-
            ツールを Anthropic 形式で定義します。`input_schema` は JSON Schema
            オブジェクトです。このエンドポイントでは `MiniMax-M2.5` のツール呼び出しに対応していません。ツールを使う場合は
            [Chat
            Completions](/ja/api-manual/language-series/minimax/chat-completions/chat-completions-reference)
            を使用してください。
          items:
            $ref: '#/components/schemas/Tool'
        tool_choice:
          type: object
          description: ツールの選択方針。`auto` のみ対応しています（ツールを呼び出すかどうかをモデルが判断します）
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - auto
    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-M4
        content:
          type: array
          description: >-
            応答ブロックは `thinking`（推論。簡単な質問では省略される場合があり、`MiniMax-M2.5`
            では常に省略）、`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
          description: >-
            メッセージ送信者のロール。user / assistant を交互に並べます


            - `user`：ユーザーメッセージ（`tool_result` ブロックを返す場合にも使用します）

            - `assistant`：過去のアシスタントの返信（`text` / `thinking` / `tool_use`
            ブロックを含められます）


            システムプロンプトはトップレベルの `system` フィールドで渡します。
        content:
          description: >-
            メッセージ内容


            **説明**：

            - プレーンテキストの場合は文字列を直接渡します

            - 構造化された内容の場合は content block 配列（`text` / `image` / `video` /
            `tool_use` / `tool_result` / `thinking`）を渡します
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/ContentBlock'
    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` を宣言すべきです
    OutputContentBlock:
      type: object
      description: レスポンス内の content block
      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` の場合の完全性署名。マルチターン文脈の検証に使用します。例の `signature`
            はプレースホルダーです。次のリクエストでは、直前のレスポンスに含まれる値をそのまま送信してください。
        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: キャッシュにヒットしなかった入力トークン数（`cache_read_input_tokens` を含みません）
          example: 55
        output_tokens:
          type: integer
          description: 出力 token 数（thinking を含む）
          example: 66
        cache_creation_input_tokens:
          type: integer
          description: キャッシュ作成に使用された入力トークン数。自動キャッシュでは 0 です
          example: 0
        cache_read_input_tokens:
          type: integer
          description: >-
            キャッシュにヒットした入力トークン数。キャッシュヒット料金が適用されます。入力全体のトークン数は `input_tokens +
            cache_read_input_tokens` です
          example: 174
        output_tokens_details:
          type: object
          description: 出力 token の詳細内訳
          properties:
            thinking_tokens:
              type: integer
              description: 思考で生成されたトークン数（`output_tokens` に含まれます）
              example: 63
    ContentBlock:
      type: object
      description: >-
        テキスト、画像、動画には `text`、`image`、`video` を使います。画像と動画は URL または Base64
        に対応します。ツールには `tool_use` と `tool_result` を使い、推論を続けるときは直前の `thinking` を
        `signature` ごと送信します。`MiniMax-M4`、`MiniMax-M3.1-Flash`、`MiniMax-M3`
        は画像と動画に対応しています。`MiniMax-M2.5` はテキストのみです。JPEG、PNG、GIF、WEBP に対応し、1 枚あたり最大
        10 MB です。動画形式は MP4、AVI、MOV、MKV に対応し、1 本あたり最大 50 MB、30 分です。
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - text
            - image
            - video
            - tool_use
            - tool_result
            - thinking
        text:
          type: string
          description: type=`text` の場合のテキスト内容
        source:
          $ref: '#/components/schemas/MediaSource'
          description: 画像または動画のソース。type=`image` または type=`video` の場合に使用します
        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: 過去のアシスタントメッセージに含まれる思考内容（`type=thinking` の場合に使用）
        signature:
          type: string
          description: >-
            思考内容の署名。マルチターン対話では、そのまま返す必要があります。例の `signature`
            はプレースホルダーです。次のリクエストでは、直前のレスポンスに含まれる値をそのまま送信してください。
    MediaSource:
      type: object
      description: |-
        - JPEG、PNG、GIF、WEBP に対応し、1 枚あたり最大 10 MB です。
        - 動画形式は MP4、AVI、MOV、MKV に対応し、1 本あたり最大 50 MB、30 分です。
        - 履歴を含む 1 リクエストあたり画像 200 枚、動画 20 本まで、リクエスト本文は最大 64 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
        detail:
          type: string
          enum:
            - low
            - default
            - high
          default: default
          description: 理解の精細度。デフォルトは default。解像度が高いほど消費トークンが多くなります
        fps:
          type: number
          minimum: 0.2
          maximum: 5
          default: 2
          description: 動画のサンプリング頻度（フレーム/秒）。既定値は 2、範囲は 0.2～5 です。高いほど動きを細かく捉え、使用トークン数が増えます。
        max_long_side_pixel:
          type: integer
          minimum: 1
          description: 画像または動画フレームの最長辺のピクセル上限
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        すべての API は Bearer Token 認証が必要です

        **API キーの取得：**

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

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

        **備考**：EvoLink は `/v1/messages` に対して一律で Bearer Token 認証を採用しています。

````

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