> ## 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-M3.1-Flash - Responses API

> - OpenAI Responses プロトコルで MiniMax-M3.1-Flash モデルを呼び出します
- **入力形式**：`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>


## OpenAPI

````yaml ja/api-manual/language-series/minimax-m3.1-flash/minimax-m3.1-flash-responses.json POST /v1/responses
openapi: 3.1.0
info:
  title: MiniMax-M3.1-Flash 完全パラメータリファレンス（Responses API）
  description: |-
    MiniMax-M3.1-Flash Responses API の完全リファレンス。

    **モデルの機能**：
    - コンテキスト長：**1,000,000 tokens**（1M）
    - 最大出力：**524,288 tokens**（512K）、推奨値は **131,072 tokens**（128K）。思考トークンも含まれます
    - 思考モード：常に有効。`reasoning.effort` で思考の深さを調整します。デフォルトは `max`
    - マルチモーダル入力：テキスト、画像、動画に対応
    - ツール呼び出し：Function Calling に対応
    - コンテキストキャッシュ：同一のプレフィックスは自動的にキャッシュヒットし、該当部分にはキャッシュヒット料金が適用されます

    **ステートレス**：レスポンスは保存されません。マルチターン対話では、クライアントが毎回完全な履歴を送信する必要があります。
  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-M3.1-Flash Responses API（OpenAI 互換）
      description: >-
        - OpenAI Responses プロトコルで MiniMax-M3.1-Flash モデルを呼び出します

        - **入力形式**：`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: createResponseMiniMaxM31Flash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponsesRequest'
            examples:
              simple_text:
                summary: シングルターンのテキスト対話
                value:
                  model: MiniMax-M3.1-Flash
                  input: Explain recursion in one sentence.
                  max_output_tokens: 131072
              with_instructions:
                summary: システム指示の使用
                value:
                  model: MiniMax-M3.1-Flash
                  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-M3.1-Flash
                  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-M3.1-Flash
                  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-M3.1-Flash
                  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-M3.1-Flash
                  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-M3.1-Flash
                  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-M3.1-Flash
                  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: 0725233e825de1d0656437967fc024e1_msg
                      type: message
                      status: completed
                      role: assistant
                      content:
                        - type: output_text
                          text: I'll check the stock level for that product now.
                          annotations: []
                    - id: 0725233e825de1d0656437967fc024e1_fc_0
                      type: function_call
                      status: completed
                      call_id: call_function_izs7qcnzfksd_1
                      name: get_product_stock
                      arguments: '{"product_id": "demo-item-001"}'
                    - type: function_call_output
                      call_id: call_function_izs7qcnzfksd_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-M3.1-Flash
                  input: Write a short poem about autumn.
                  stream: true
                  max_output_tokens: 131072
              reasoning_history:
                summary: 完全な思考履歴を含めて対話を続ける
                value:
                  model: MiniMax-M3.1-Flash
                  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: 0725233a85e23431681447327cbcd9d2_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: >-
                        Ahlub3JtYWwtcmVhc29uaW5nLTIwMjYxMDExjehfvIf2rUinmic9ZiAutly0DD3lHqWEni9ENDziUw0nX-F6VPZLM7x1NbRWbytJNcLH9XQIa-KLYgd-it6XmXzYLvck3xOPOG9wtDdxUnjdBhuuj9dkWrkx0kbK8MFT5UreZ7EcxoRZybrs3oELf2BK_WtDUFOm_FbZXKwNbg76pTCFDoRke0Er0GMWjmi5L8GE7hGnvvBQjHXrwQ88G0L2p6STay-n1FJ5prqz6Q4LEF-xu7FqGjDmh9haliI638ivcQ9XGo9_DLUrtKMh1K4UYN87j2H7vbjbJPJaw6oJ61ZF8Ngk1FSuHUvLB540QKwBJKnClMcvw-ih3CdKRdSTPRfIYlsYOkNCwEWrLwHarLTHG5HzeakMO_5usxOAvzXVDUKRIX7W62x9xKCnVl_Gp0E91dLtlU3U8j_ZZvYCj9pMvd_n_Ba82OUpFxvoXv2R2H1H8bfzztGg5E88fH6OMwoMS5OYa45nCoRFA11Bw7G8OEVqBiPzS48EY1JPjPTC5lBco0CUoeUAHPXeD7jmO-D3LhIL1-3erJ_mxP0ZeiCWUckYaFE2EliolooAHqkoVBmy5Q
                    - id: 0725233a85e23431681447327cbcd9d2_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.
      responses:
        '200':
          description: 生成に成功しました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsesResponse'
              examples:
                with_reasoning:
                  summary: 思考内容を含むレスポンス
                  value:
                    id: 0725233a85e23431681447327cbcd9d2
                    object: response
                    created_at: 1792405562
                    model: MiniMax-M3.1-Flash
                    status: completed
                    output:
                      - id: 0725233a85e23431681447327cbcd9d2_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: >-
                          Ahlub3JtYWwtcmVhc29uaW5nLTIwMjYxMDExjehfvIf2rUinmic9ZiAutly0DD3lHqWEni9ENDziUw0nX-F6VPZLM7x1NbRWbytJNcLH9XQIa-KLYgd-it6XmXzYLvck3xOPOG9wtDdxUnjdBhuuj9dkWrkx0kbK8MFT5UreZ7EcxoRZybrs3oELf2BK_WtDUFOm_FbZXKwNbg76pTCFDoRke0Er0GMWjmi5L8GE7hGnvvBQjHXrwQ88G0L2p6STay-n1FJ5prqz6Q4LEF-xu7FqGjDmh9haliI638ivcQ9XGo9_DLUrtKMh1K4UYN87j2H7vbjbJPJaw6oJ61ZF8Ngk1FSuHUvLB540QKwBJKnClMcvw-ih3CdKRdSTPRfIYlsYOkNCwEWrLwHarLTHG5HzeakMO_5usxOAvzXVDUKRIX7W62x9xKCnVl_Gp0E91dLtlU3U8j_ZZvYCj9pMvd_n_Ba82OUpFxvoXv2R2H1H8bfzztGg5E88fH6OMwoMS5OYa45nCoRFA11Bw7G8OEVqBiPzS48EY1JPjPTC5lBco0CUoeUAHPXeD7jmO-D3LhIL1-3erJ_mxP0ZeiCWUckYaFE2EliolooAHqkoVBmy5Q
                      - id: 0725233a85e23431681447327cbcd9d2_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
                    instructions: null
                    metadata: {}
                    tools: null
                    tool_choice: auto
                    temperature: 1
                    top_p: 0.95
                    text:
                      format:
                        type: text
                    reasoning:
                      effort: medium
                      summary: null
                    max_output_tokens: 2048
                    max_tool_calls: null
                    parallel_tool_calls: true
                    previous_response_id: null
                    conversation: null
                    store: false
                    service_tier: null
                    safety_identifier: null
                    truncation: disabled
                function_call:
                  summary: ツール呼び出し
                  value:
                    id: 0725233e825de1d0656437967fc024e1
                    object: response
                    created_at: 1792405566
                    model: MiniMax-M3.1-Flash
                    status: completed
                    output:
                      - id: 0725233e825de1d0656437967fc024e1_msg
                        type: message
                        status: completed
                        role: assistant
                        content:
                          - type: output_text
                            text: I'll check the stock level for that product now.
                            annotations: []
                      - id: 0725233e825de1d0656437967fc024e1_fc_0
                        type: function_call
                        status: completed
                        call_id: call_function_izs7qcnzfksd_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
                    instructions: null
                    metadata: {}
                    tools:
                      - type: function
                        name: get_product_stock
                        description: Get the current stock level for a product.
                        parameters:
                          properties:
                            product_id:
                              description: Product identifier.
                              type: string
                          required:
                            - product_id
                          type: object
                    tool_choice: auto
                    temperature: 1
                    top_p: 0.95
                    text:
                      format:
                        type: text
                    reasoning:
                      effort: medium
                      summary: null
                    max_output_tokens: 2048
                    max_tool_calls: null
                    parallel_tool_calls: true
                    previous_response_id: null
                    conversation: null
                    store: false
                    service_tier: null
                    safety_identifier: null
                    truncation: disabled
                incomplete:
                  summary: 出力上限に到達（status=incomplete）
                  value:
                    id: 072514375f41347e5f4de3c6ceb8fd87
                    object: response
                    created_at: 1792401719
                    model: MiniMax-M3.1-Flash
                    status: incomplete
                    output:
                      - id: 072514375f41347e5f4de3c6ceb8fd87_rs
                        type: reasoning
                        status: completed
                        summary: []
                        content:
                          - type: reasoning_text
                            text: I need to explain the process step by step.
                        encrypted_content: >-
                          Ahlub3JtYWwtcmVhc29uaW5nLTIwMjYxMDExv21cbZ66-fbVryqevLX4LJWxZguAnQBWN1xlN33KB5qCPkM8IMN2pVWWIclGFlVn6ZZ0CBzkPpHqkdCVqpYbDWc3gQl2Qmf0uD4s3wo
                    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
                    instructions: null
                    metadata: {}
                    tools: null
                    tool_choice: auto
                    temperature: 1
                    top_p: 0.95
                    text:
                      format:
                        type: text
                    reasoning:
                      effort: max
                      summary: null
                    max_output_tokens: 8
                    max_tool_calls: null
                    parallel_tool_calls: true
                    previous_response_id: null
                    conversation: null
                    store: false
                    service_tier: null
                    safety_identifier: null
                    truncation: disabled
        '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: モデル ID
          enum:
            - MiniMax-M3.1-Flash
          example: MiniMax-M3.1-Flash
        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: >-
            今回の生成で出力できる最大トークン数。**思考と回答の両方を含みます**


            - 推奨値は **131,072**（128K）、最大値は **524,288**（512K）

            - 値が小さすぎると、思考中に上限に達し、`status: "incomplete"` となって `message`
            出力アイテムが返されない場合があります
          minimum: 1
          maximum: 524288
          example: 131072
        reasoning:
          type: object
          description: >-
            思考の設定。MiniMax-M3.1-Flash は常に思考を行い、その内容を `reasoning`
            出力アイテムとして返します。思考トークンは出力に含まれ、出力料金で課金されます。
          properties:
            effort:
              type: string
              description: 思考の深さ。デフォルトは `max`。深さを上げると、通常は思考トークンの消費量と応答時間が増加します。
              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: Nucleus Sampling のしきい値。デフォルトは 0.95。
          minimum: 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: 出力フォーマットの種類
        metadata:
          type: object
          description: リクエストのメタデータ。キーと値はどちらも文字列です
          additionalProperties:
            type: string
    ResponsesResponse:
      type: object
      description: >-
        Responses API
        のレスポンスオブジェクト。以下のフィールドに加え、今回のリクエストの設定（`tools`、`tool_choice`、`temperature`、`top_p`、`text`、`reasoning`、`max_output_tokens`
        など）も返されます。
      properties:
        id:
          type: string
          description: このレスポンスの一意識別子
          example: 072514d63605b7a0c83f1672230c398c
        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-M3.1-Flash
        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`：過去の assistant の返信に含まれるテキスト

            リクエストボディの上限は 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: 内部形式の思考データ。履歴ではそのまま保持してください。
    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 data URL
            の文字列、またはオブジェクト `{"url": "...", "fps": 1, "detail": "default",
            "max_long_side_pixel": ...}` を指定できます。`fps` はフレーム抽出頻度で、デフォルトは 1、範囲は
            [0.2, 5] です。値を下げるとトークン消費量が減少します。MP4 / AVI / MOV / MKV に対応し、URL /
            Base64 入力の上限は 50 MB です。より大きな動画は `mm_file://{file_id}` 形式のファイル参照で渡します
          oneOf:
            - type: string
            - type: object
              required:
                - url
              properties:
                url:
                  type: string
                  description: 動画 URL、Base64 data URL、または `mm_file://{file_id}`
                fps:
                  type: number
                  minimum: 0.2
                  maximum: 5
                  default: 1
                  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.