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

> - OpenAI Responses (`MiniMax-M4`, `MiniMax-M3.1-Flash`). `model` でモデルを選択します。
- **入力形式**：`input` にはプレーンテキスト、または入力アイテムの配列（メッセージ、関数呼び出し、関数の実行結果）を指定できます
- **マルチモーダル入力**：メッセージの `content` 内で `input_text`、`input_image`、`input_video` ブロックを組み合わせます
- **システム指示**：`instructions` で指定します。先頭の system メッセージと同等です
- **思考モード**：常に有効。`reasoning.effort` で思考の深さを調整します。思考内容は `reasoning` 出力アイテムとして返されます
- **ストリーミング出力**：意味ごとに定義された SSE イベントで配信され、`response.completed` で終了します。**`[DONE]` は送信されません**
- **ツール呼び出し**：Function Calling に対応
- **コンテキストキャッシュ**：同一のプレフィックスは自動的にキャッシュヒットし、該当部分は `usage.input_tokens_details.cached_tokens` に反映されます

**ステートレス**：レスポンスは保存されず、`previous_response_id` は使用できません。対話を続ける際は、前の `output` に含まれるすべてのアイテムを元の順序と構造のまま `input` に追加してください。思考アイテムの `content`、`summary`、`encrypted_content` なども保持します。ツールの実行後は、関数呼び出しと同じ `call_id` を持つ `function_call_output` アイテムを追加してください。

**ストリーミングイベント**：`response.created`、`response.in_progress`、`response.output_item.added`、`response.content_part.added`、`response.reasoning_text.delta` / `response.reasoning_text.done`、`response.output_text.delta` / `response.output_text.done`、`response.content_part.done`、`response.output_item.done`。終了イベントは `response.completed` です。各イベントには並び順を示す `sequence_number` が含まれます。

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

> [!NOTE]
>
> Responses は `MiniMax-M4` と `MiniMax-M3.1-Flash` に対応します。`MiniMax-M3` と `MiniMax-M2.5` には [Chat Completions](https://evolink.ai/docs/ja/api-manual/language-series/minimax/chat-completions/chat-completions-quickstart.md) または [Messages](https://evolink.ai/docs/ja/api-manual/language-series/minimax/messages/messages-quickstart.md) を使用してください。`MiniMax-M4` と `MiniMax-M3.1-Flash` では推論が常に有効です。推論の深さは `reasoning.effort` で設定します。**最大出力（推論トークンを含む）** — `MiniMax-M4` 262,144, `MiniMax-M3.1-Flash` 524,288.


## OpenAPI

````yaml ja/api-manual/language-series/minimax/responses/responses-reference.json POST /v1/responses
openapi: 3.1.0
info:
  title: MiniMax Responses API リファレンス
  description: >-
    MiniMax Responses API リファレンス。Responses は `MiniMax-M4` と `MiniMax-M3.1-Flash`
    に対応します。`MiniMax-M3` と `MiniMax-M2.5` には [Chat
    Completions](/ja/api-manual/language-series/minimax/chat-completions/chat-completions-quickstart)
    または
    [Messages](/ja/api-manual/language-series/minimax/messages/messages-quickstart)
    を使用してください。`MiniMax-M4` と `MiniMax-M3.1-Flash` では推論が常に有効です。推論の深さは
    `reasoning.effort` で設定します（既定値は `max`）。**最大出力（推論トークンを含む）** — `MiniMax-M4`
    262,144, `MiniMax-M3.1-Flash` 524,288.


    ツール呼び出し、ストリーミング、テキスト・画像・動画入力に対応します。共通のプレフィックスは自動的にキャッシュされます。ヒットしたトークンは
    `usage.input_tokens_details.cached_tokens` に記録され、キャッシュヒット料金が適用されます。Responses
    は応答を保存しません。毎回、会話履歴全体を送信してください。
  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/responses:
    post:
      tags:
        - 対話生成
      summary: MiniMax Responses API リファレンス (OpenAI 互換)
      description: >-
        - OpenAI Responses (`MiniMax-M4`, `MiniMax-M3.1-Flash`). `model`
        でモデルを選択します。

        - **入力形式**：`input` にはプレーンテキスト、または入力アイテムの配列（メッセージ、関数呼び出し、関数の実行結果）を指定できます

        - **マルチモーダル入力**：メッセージの `content` 内で
        `input_text`、`input_image`、`input_video` ブロックを組み合わせます

        - **システム指示**：`instructions` で指定します。先頭の system メッセージと同等です

        - **思考モード**：常に有効。`reasoning.effort` で思考の深さを調整します。思考内容は `reasoning`
        出力アイテムとして返されます

        - **ストリーミング出力**：意味ごとに定義された SSE イベントで配信され、`response.completed`
        で終了します。**`[DONE]` は送信されません**

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

        - **コンテキストキャッシュ**：同一のプレフィックスは自動的にキャッシュヒットし、該当部分は
        `usage.input_tokens_details.cached_tokens` に反映されます


        **ステートレス**：レスポンスは保存されず、`previous_response_id` は使用できません。対話を続ける際は、前の
        `output` に含まれるすべてのアイテムを元の順序と構造のまま `input` に追加してください。思考アイテムの
        `content`、`summary`、`encrypted_content` なども保持します。ツールの実行後は、関数呼び出しと同じ
        `call_id` を持つ `function_call_output` アイテムを追加してください。


        **ストリーミングイベント**：`response.created`、`response.in_progress`、`response.output_item.added`、`response.content_part.added`、`response.reasoning_text.delta`
        / `response.reasoning_text.done`、`response.output_text.delta` /
        `response.output_text.done`、`response.content_part.done`、`response.output_item.done`。終了イベントは
        `response.completed` です。各イベントには並び順を示す `sequence_number` が含まれます。
      operationId: createResponseMiniMax
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponsesRequest'
            examples:
              simple_text:
                summary: シングルターンのテキスト対話
                value:
                  model: MiniMax-M4
                  input: Explain recursion in one sentence.
                  max_output_tokens: 131072
              with_instructions:
                summary: システム指示の使用
                value:
                  model: MiniMax-M4
                  instructions: >-
                    You are a technical documentation assistant. Keep your
                    answers concise.
                  input: Explain how context caching works.
                  max_output_tokens: 131072
              multi_turn:
                summary: マルチターン会話（入力アイテム配列）
                value:
                  model: MiniMax-M4
                  input:
                    - type: message
                      role: user
                      content: Suggest three names for a note-taking app.
                    - type: message
                      role: assistant
                      content: NoteFlow, ClearPage, QuickNote.
                    - type: message
                      role: user
                      content: Suggest five alternatives to the second name.
                  max_output_tokens: 131072
              reasoning_effort:
                summary: 思考の深さの調整
                value:
                  model: MiniMax-M4
                  input: >-
                    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?
                  reasoning:
                    effort: high
                  max_output_tokens: 131072
              vision_url:
                summary: 画像理解
                value:
                  model: MiniMax-M4
                  input:
                    - type: message
                      role: user
                      content:
                        - type: input_text
                          text: Describe this image.
                        - type: input_image
                          image_url: https://example.com/photo.jpg
                  max_output_tokens: 131072
              video_url:
                summary: 動画理解
                value:
                  model: MiniMax-M4
                  input:
                    - type: message
                      role: user
                      content:
                        - type: input_text
                          text: Summarize this video.
                        - type: input_video
                          video_url:
                            url: https://example.com/video.mp4
                            fps: 1
                            detail: default
                  max_output_tokens: 131072
              function_calling:
                summary: Function Calling ツール呼び出し
                value:
                  model: MiniMax-M4
                  input: Check the stock for product demo-item-001.
                  tools:
                    - type: 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_output_tokens: 131072
              function_result:
                summary: ツールの実行結果を返して回答を続行
                value:
                  model: MiniMax-M4
                  reasoning:
                    effort: medium
                  max_output_tokens: 131072
                  input:
                    - type: message
                      role: user
                      content: >-
                        Use get_product_stock to check product demo-item-001.
                        After receiving the tool result, report whether it is in
                        stock and its quantity. Do not guess the stock level.
                    - id: example_2ab00b_msg
                      type: message
                      status: completed
                      role: assistant
                      content:
                        - type: output_text
                          text: I'll check the stock level for that product now.
                          annotations: []
                    - id: example_2ab00b_fc_0
                      type: function_call
                      status: completed
                      call_id: call_example_1
                      name: get_product_stock
                      arguments: '{"product_id": "demo-item-001"}'
                    - type: function_call_output
                      call_id: call_example_1
                      output: >-
                        {"product_id": "demo-item-001", "in_stock": true,
                        "quantity": 24}
                  tools:
                    - type: 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
                  tool_choice: auto
              streaming:
                summary: ストリーミング出力
                value:
                  model: MiniMax-M4
                  input: Write a short poem about autumn.
                  stream: true
                  max_output_tokens: 131072
              reasoning_history:
                summary: 完全な思考履歴を含めて対話を続ける
                value:
                  model: MiniMax-M4
                  reasoning:
                    effort: medium
                  max_output_tokens: 131072
                  input:
                    - type: message
                      role: user
                      content: >-
                        Find the smallest positive integer n such that n mod 7 =
                        3, n mod 11 = 5, and n mod 13 = 7. Return only n.
                    - id: example_ae5b7d_rs
                      type: reasoning
                      status: completed
                      summary: []
                      content:
                        - type: reasoning_text
                          text: >-
                            We need solve CRT. Need only n. Compute. n=3 mod7, 5
                            mod11,7 mod13. Product 1001. Let's solve.


                            Use n=3+7a. mod11: 3+7a=5 =>7a=2 mod11. inverse7=8
                            (56=1), a=16=5 mod11. a=5+11b. n=38+77b. mod13:
                            38+77b = 12+12b mod13 (77=12,38=12) equals7
                            =>12b=-5=8 mod13. inverse12=12, b=96 mod13 =5? 91
                            remainder5. n=38+385=423. Check 423 mod7 3 (420),
                            mod11 5 (418), mod13 7 (416). Smallest positive 423.
                            Only n.
                      encrypted_content: EXAMPLE_ENCRYPTED_CONTENT
                    - id: example_ae5b7d_msg
                      type: message
                      status: completed
                      role: assistant
                      content:
                        - type: output_text
                          text: '423'
                          annotations: []
                    - type: message
                      role: user
                      content: Add one to that result. Return only the new integer.
              flash:
                summary: MiniMax-M3.1-Flash を呼び出す
                value:
                  model: MiniMax-M3.1-Flash
                  input: Explain recursion in one sentence.
                  max_output_tokens: 131072
      responses:
        '200':
          description: 生成に成功しました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsesResponse'
              examples:
                with_reasoning:
                  summary: 思考内容を含むレスポンス
                  value:
                    id: example_ae5b7d
                    object: response
                    created_at: 1792405562
                    model: MiniMax-M3.1-Flash
                    status: completed
                    output:
                      - id: example_ae5b7d_rs
                        type: reasoning
                        status: completed
                        summary: []
                        content:
                          - type: reasoning_text
                            text: >-
                              We need solve CRT. Need only n. Compute. n=3 mod7,
                              5 mod11,7 mod13. Product 1001. Let's solve.


                              Use n=3+7a. mod11: 3+7a=5 =>7a=2 mod11. inverse7=8
                              (56=1), a=16=5 mod11. a=5+11b. n=38+77b. mod13:
                              38+77b = 12+12b mod13 (77=12,38=12) equals7
                              =>12b=-5=8 mod13. inverse12=12, b=96 mod13 =5? 91
                              remainder5. n=38+385=423. Check 423 mod7 3 (420),
                              mod11 5 (418), mod13 7 (416). Smallest positive
                              423. Only n.
                        encrypted_content: EXAMPLE_ENCRYPTED_CONTENT
                      - id: example_ae5b7d_msg
                        type: message
                        status: completed
                        role: assistant
                        content:
                          - type: output_text
                            text: '423'
                            annotations: []
                    output_text: '423'
                    usage:
                      input_tokens: 239
                      output_tokens: 190
                      total_tokens: 429
                      input_tokens_details:
                        cached_tokens: 174
                      output_tokens_details:
                        reasoning_tokens: 189
                    error: null
                    incomplete_details: null
                function_call:
                  summary: ツール呼び出し
                  value:
                    id: example_2ab00b
                    object: response
                    created_at: 1792405566
                    model: MiniMax-M3.1-Flash
                    status: completed
                    output:
                      - id: example_2ab00b_msg
                        type: message
                        status: completed
                        role: assistant
                        content:
                          - type: output_text
                            text: I'll check the stock level for that product now.
                            annotations: []
                      - id: example_2ab00b_fc_0
                        type: function_call
                        status: completed
                        call_id: call_example_1
                        name: get_product_stock
                        arguments: '{"product_id": "demo-item-001"}'
                    output_text: I'll check the stock level for that product now.
                    usage:
                      input_tokens: 479
                      output_tokens: 43
                      total_tokens: 522
                      input_tokens_details:
                        cached_tokens: 174
                    error: null
                    incomplete_details: null
                incomplete:
                  summary: 出力上限に到達（status=incomplete）
                  value:
                    id: example_de610c
                    object: response
                    created_at: 1792401719
                    model: MiniMax-M3.1-Flash
                    status: incomplete
                    output:
                      - id: example_de610c_rs
                        type: reasoning
                        status: completed
                        summary: []
                        content:
                          - type: reasoning_text
                            text: I need to explain the process step by step.
                        encrypted_content: EXAMPLE_ENCRYPTED_CONTENT
                    output_text: null
                    usage:
                      input_tokens: 211
                      output_tokens: 8
                      total_tokens: 219
                      input_tokens_details:
                        cached_tokens: 195
                      output_tokens_details:
                        reasoning_tokens: 8
                    error: null
                    incomplete_details:
                      reason: max_output_tokens
        '400':
          description: リクエストパラメータが不正です
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_prompt
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: 未認証、トークンが無効または期限切れです
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 401
                  message: Invalid authentication credentials
                  type: authentication_error
        '402':
          description: クォータ不足、チャージが必要
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 402
                  message: Insufficient quota
                  type: insufficient_quota
        '403':
          description: このモデルへのアクセス権限がありません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 403
                  message: Model access denied
                  type: permission_error
        '404':
          description: リソースが存在しません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 404
                  message: Model not found
                  type: not_found_error
        '413':
          description: リクエストボディが大きすぎます
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 413
                  message: Request entity too large
                  type: invalid_request_error
        '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: server_error
        '502':
          description: ゲートウェイエラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 502
                  message: Bad gateway
                  type: server_error
        '503':
          description: サービスが一時的に利用できません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 503
                  message: Service temporarily unavailable
                  type: server_error
components:
  schemas:
    ResponsesRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          description: >-
            | モデル | コンテキスト（トークン） | 最大出力（トークン） |

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

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

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


            Responses は `MiniMax-M4` と `MiniMax-M3.1-Flash` に対応します。`MiniMax-M3`
            と `MiniMax-M2.5` には [Chat
            Completions](/ja/api-manual/language-series/minimax/chat-completions/chat-completions-quickstart)
            または
            [Messages](/ja/api-manual/language-series/minimax/messages/messages-quickstart)
            を使用してください。`MiniMax-M4` と `MiniMax-M3.1-Flash` では推論が常に有効です。推論の深さは
            `reasoning.effort` で設定します。どちらのモデルも画像・動画に対応します。
          enum:
            - MiniMax-M4
            - MiniMax-M3.1-Flash
          example: MiniMax-M4
        input:
          type:
            - string
            - array
          description: >-
            モデルへの入力


            - **文字列形式**：テキスト全体を 1 件の `user` メッセージとして扱います

            -
            **配列形式**：入力アイテムのリスト。`message`、`function_call`、`function_call_output`、`reasoning`
            に対応します


            **マルチモーダル**：`message` アイテムの `content` 配列内で
            `input_text`、`input_image`、`input_video` ブロックを組み合わせます。


            **マルチターン対話**：API はステートレスです。対話を続ける場合は、完全な履歴を配列に含める必要があります。
          items:
            $ref: '#/components/schemas/InputItem'
          example: Explain recursion in one sentence.
        instructions:
          type: string
          description: システムレベルの指示。先頭に挿入される system メッセージと同等で、役割・口調・出力制約の設定に使用します。
          example: >-
            You are a technical documentation assistant. Keep your answers
            concise.
        stream:
          type: boolean
          description: >-
            ストリーミングで返すかどうか


            - `false`（デフォルト）：完全なレスポンスオブジェクトを一括で返します

            - `true`：意味ごとに定義された SSE イベントで配信します。終了イベントは `response.completed`
            で、**`[DONE]` は送信されません**
          default: false
          example: false
        max_output_tokens:
          type: integer
          description: >-
            最大出力（推論トークンを含む）


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

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

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

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


            出力トークンはまず 1,024
            以上を目安にしてください。推論で使い切ると本文が返らないことがあります。`status="incomplete"` かつ
            `incomplete_details.reason="max_output_tokens"` なら出力上限を増やしてください。
          minimum: 1
          maximum: 524288
          example: 131072
        reasoning:
          type: object
          description: >-
            `MiniMax-M4` と `MiniMax-M3.1-Flash` では推論が常に有効です。Responses は推論を
            `reasoning` 型の出力項目に返します。推論トークンも出力上限に含まれ、出力料金が適用されます。
          properties:
            effort:
              type: string
              description: >-
                推論の深さは `low`、`medium`、`high`、`xhigh`、`max`（既定値）です。`none` は HTTP
                400 になります。深くするほど通常は推論トークンと応答時間が増えます。
              enum:
                - low
                - medium
                - high
                - xhigh
                - max
              default: max
              example: high
        temperature:
          type: number
          description: 温度は 1 に固定され、他の値を指定しても変わりません。
          enum:
            - 1
          default: 1
          example: 1
        top_p:
          type: number
          description: 0.95 固定です。指定する場合は 0 より大きく 1 以下の値を使用してください。
          exclusiveMinimum: 0
          maximum: 1
          default: 0.95
          example: 0.95
        tools:
          type: array
          description: >-
            モデルが呼び出せるツールのリスト。現在は `function` タイプのみ対応しています。関数はクライアント側で実行し、結果を
            `function_call_output` 入力アイテムとして返します。
          items:
            $ref: '#/components/schemas/Tool'
        tool_choice:
          type: string
          description: ツールの選択方針。`auto` のみ対応しています（ツールを呼び出すかどうかをモデルが判断します）
          enum:
            - auto
          default: auto
          example: auto
        text:
          type: object
          description: テキスト出力形式の設定。`format.type` は `text` のみ対応しています
          properties:
            format:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - text
                  default: text
                  description: 出力フォーマットの種類
    ResponsesResponse:
      type: object
      description: >-
        Responses API
        のレスポンスオブジェクト。以下のフィールドに加え、今回のリクエストの設定（`tools`、`tool_choice`、`temperature`、`top_p`、`text`、`reasoning`、`max_output_tokens`
        など）も返されます。
      properties:
        id:
          type: string
          description: このレスポンスの一意識別子
          example: resp_example
        object:
          type: string
          description: オブジェクト種別。常に `response`
          example: response
        created_at:
          type: integer
          description: 作成時刻（Unix タイムスタンプ、秒）
          example: 1792401878
        status:
          type: string
          description: |-
            レスポンスの状態

            - `completed`：正常に完了
            - `incomplete`：途中で打ち切り。理由は `incomplete_details` を参照してください
            - `failed`：生成に失敗。理由は `error` を参照してください
          enum:
            - completed
            - incomplete
            - failed
          example: completed
        model:
          type: string
          description: 実際に本レスポンスを生成したモデル ID
          example: MiniMax-M4
        output:
          type: array
          description: >-
            生成順に並んだ出力アイテムのリスト：


            - `reasoning`：思考過程。id は `<id>_rs` 形式で、`content`（`reasoning_text`
            ブロックのリスト）、`summary`（空の配列）、`encrypted_content` を含みます

            - `message`：最終回答。id は `<id>_msg` 形式で、`content`（`output_text`
            ブロックのリスト）を含みます

            - `function_call`：モデルによる関数呼び出し。id は `<id>_fc_<連番>`
            形式で、`call_id`、`name`、`arguments` を含みます。クライアント側で実行し、結果を
            `function_call_output` として返す必要があります
          items:
            type: object
        output_text:
          type:
            - string
            - 'null'
          description: すべての `output_text` のテキストを連結した結果。テキスト出力がない場合は `null` です
        error:
          type:
            - object
            - 'null'
          description: 失敗の理由。成功時は `null`
        incomplete_details:
          type:
            - object
            - 'null'
          description: >-
            打ち切り理由。打ち切られていない場合は `null` です。`reason` は
            `max_output_tokens`（出力上限に到達）または `content_filter`（コンテンツ安全性）です
        usage:
          $ref: '#/components/schemas/Usage'
    ErrorResponse:
      type: object
      description: エラーレスポンス
      properties:
        error:
          type: object
          properties:
            code:
              type:
                - integer
                - string
                - 'null'
              description: エラーコード
              example: invalid_prompt
            message:
              type: string
              description: エラー説明
              example: Invalid request parameters
            type:
              type: string
              description: エラータイプ
              example: invalid_request_error
    InputItem:
      title: 入力アイテム
      description: 入力アイテム：メッセージ、思考履歴、関数呼び出し、または関数の実行結果。
      oneOf:
        - $ref: '#/components/schemas/MessageItem'
        - $ref: '#/components/schemas/ReasoningItem'
        - $ref: '#/components/schemas/FunctionCallItem'
        - $ref: '#/components/schemas/FunctionCallOutputItem'
    Tool:
      type: object
      title: ツール定義
      required:
        - type
        - name
      properties:
        type:
          type: string
          description: ツールの種類。現在は `function` のみ対応しています
          enum:
            - function
          example: function
        name:
          type: string
          description: 関数名
          example: get_product_stock
        description:
          type: string
          description: 関数の用途の説明。明確に記述すると、モデルが呼び出すタイミングを判断しやすくなります。
          example: Get the current stock level for a product.
        parameters:
          type: object
          description: パラメータ定義（JSON Schema 形式）。
          example:
            type: object
            properties:
              product_id:
                type: string
                description: Product identifier.
            required:
              - product_id
    Usage:
      type: object
      description: トークン使用統計（キャッシュと思考の内訳を含む）
      properties:
        input_tokens:
          type: integer
          description: 入力トークンの総数（キャッシュヒット分を含む）
          example: 207
        input_tokens_details:
          type: object
          description: 入力 token の詳細内訳
          properties:
            cached_tokens:
              type: integer
              description: >-
                キャッシュにヒットした入力トークン数


                キャッシュヒット分にはキャッシュヒット料金が適用されます。キャッシュにヒットしなかった部分は `input_tokens -
                cached_tokens` で、標準入力料金が適用されます
              example: 174
        output_tokens:
          type: integer
          description: 出力トークン数（思考部分を含む）
          example: 32
        output_tokens_details:
          type: object
          description: 出力 token の詳細内訳
          properties:
            reasoning_tokens:
              type: integer
              description: 思考で生成されたトークン数（`output_tokens` に含まれます）
              example: 9
        total_tokens:
          type: integer
          description: 総トークン数 = input_tokens + output_tokens
          example: 239
    MessageItem:
      type: object
      title: メッセージアイテム
      description: 対話メッセージ。過去のアシスタントメッセージを送信する場合は、返されたすべてのフィールドを保持してください。
      required:
        - role
        - content
      properties:
        type:
          type: string
          enum:
            - message
          default: message
        id:
          type: string
          description: 出力アイテムの識別子。履歴を送信する際は変更しないでください。
        status:
          type: string
          description: 出力アイテムのステータス。履歴を送信する際は変更しないでください。
        role:
          type: string
          description: >-
            メッセージのロール。`type: message` のときのみ使用します。`developer` は `system`
            として扱われます。
          enum:
            - user
            - assistant
            - system
            - developer
          example: user
        content:
          type:
            - string
            - array
          description: >-
            `type: message` には文字列またはブロック配列を渡します。`input_text` は
            `text`、`input_image` は `image_url`、`input_video` は `video_url`
            を使います。過去のアシスタント回答は `output_text` です。履歴を含む 1 リクエストあたり画像 200 枚、動画 20
            本まで、リクエスト本文は最大 64 MB です。
          items:
            $ref: '#/components/schemas/ContentPart'
          example: Explain recursion in one sentence.
    ReasoningItem:
      type: object
      title: 思考アイテム
      description: >-
        前のターンで返された思考アイテム。対話を続ける際は、`id`、`status`、`summary`、`content`、`encrypted_content`
        を含むアイテム全体をそのまま送信してください。
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - reasoning
        id:
          type: string
          description: 出力アイテムの識別子。履歴を送信する際は変更しないでください。
        status:
          type: string
          description: 出力アイテムのステータス。履歴を送信する際は変更しないでください。
        summary:
          type: array
          description: 思考の要約。会話履歴を送信する際は、そのまま保持してください。
          items:
            type: object
        content:
          type: array
          description: 思考コンテンツブロック。履歴ではそのまま保持してください。
          items:
            $ref: '#/components/schemas/ReasoningContentPart'
        encrypted_content:
          type: string
          description: >-
            内部形式の思考データ。履歴ではそのまま保持してください。例の `encrypted_content`
            はプレースホルダーです。次のリクエストでは、直前のレスポンスに含まれる値をそのまま送信してください。
    FunctionCallItem:
      type: object
      title: 関数呼び出しアイテム
      description: モデルが返した関数呼び出し。`call_id` によって `function_call_output` アイテムと対応付けます。
      required:
        - type
        - call_id
        - name
        - arguments
      properties:
        type:
          type: string
          enum:
            - function_call
        id:
          type: string
          description: 出力アイテムの識別子。履歴を送信する際は変更しないでください。
        status:
          type: string
          description: 出力アイテムのステータス。履歴を送信する際は変更しないでください。
        call_id:
          type: string
          description: 関数呼び出しの識別子。`function_call` と `function_call_output` はこれで対応付けられます。
        name:
          type: string
          description: '呼び出された関数名。`type: function_call` のときのみ使用します。'
        arguments:
          type: string
          description: '関数呼び出しの引数（JSON 文字列）。`type: function_call` のときのみ使用します。'
    FunctionCallOutputItem:
      type: object
      title: 関数の実行結果アイテム
      description: クライアントが実行した関数の結果。`call_id` によって対応する関数呼び出しと関連付けます。
      required:
        - type
        - call_id
        - output
      properties:
        type:
          type: string
          enum:
            - function_call_output
        call_id:
          type: string
          description: 関数呼び出しの識別子。`function_call` と `function_call_output` はこれで対応付けられます。
        output:
          type: string
          description: '関数の実行結果。`type: function_call_output` のときのみ使用します。'
    ContentPart:
      type: object
      title: コンテンツブロック
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - input_text
            - input_image
            - input_video
            - output_text
          description: コンテンツブロックの種類
        text:
          type: string
          description: テキスト内容（`input_text` / `output_text`）
        image_url:
          description: >-
            画像入力。`type: input_image` の場合に使用します。URL / Base64 data URL
            の文字列、またはオブジェクト `{"url": "...", "detail": "low | default | high"}`
            を指定できます。`detail` で解析精度を制御します（精度が高いほど詳細を認識し、トークン消費量も増加します）。JPEG / PNG
            / GIF / WEBP に対応し、1 枚あたりの上限は 10 MB です
          oneOf:
            - type: string
            - type: object
              required:
                - url
              properties:
                url:
                  type: string
                  description: 画像 URL または Base64 data URL
                detail:
                  type: string
                  enum:
                    - low
                    - default
                    - high
                  default: default
                  description: 解像度
        video_url:
          description: >-
            `type: input_video` には URL、Base64 データ URL、または `{"url": "...", "fps":
            2, "detail": "default", "max_long_side_pixel": ...}`
            の形式のオブジェクトを渡します。動画のサンプリング頻度（フレーム/秒）。既定値は 2、範囲は 0.2～5
            です。高いほど動きを細かく捉え、使用トークン数が増えます。動画形式は MP4、AVI、MOV、MKV に対応し、1 本あたり最大 50
            MB、30 分です。
          oneOf:
            - type: string
            - type: object
              required:
                - url
              properties:
                url:
                  type: string
                  description: 動画の URL または Base64 データ URL
                fps:
                  type: number
                  minimum: 0.2
                  maximum: 5
                  default: 2
                  description: フレーム抽出頻度
                detail:
                  type: string
                  enum:
                    - low
                    - default
                    - high
                  default: default
                  description: 解像度
                max_long_side_pixel:
                  type: integer
                  minimum: 1
                  description: 動画フレームの最長辺のピクセル上限
    ReasoningContentPart:
      type: object
      title: 思考コンテンツブロック
      required:
        - type
        - text
      properties:
        type:
          type: string
          enum:
            - reasoning_text
        text:
          type: string
          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.