> ## 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.

# Gemini 全モデルインターフェース - ネイティブ API 形式

> パス内の `{model}` で呼び出す Gemini テキストモデルを選択します（すべての選択可能な値は `model` パラメータの対照表を参照してください）。

- Google ネイティブ API 形式を使用し、会話内容を同期的に返却します
- **プレーンテキスト / マルチモーダル入力**：テキスト + 画像 / 音声 / 動画の混合入力
- **ストリーミング**：パス内の `generateContent` を `streamGenerateContent` に置き換えます（`?alt=sse` を追加して SSE を取得できます）

---

**モデルの仕様と差異**
- **サンプリングパラメータ** `temperature` / `topP` / `topK`：`gemini-3.6-flash`、`gemini-3.5-flash-lite` はカスタム値をサポートしておらず、指定しても有効になりません。その他のモデルは通常どおり有効です。
- **思考制御**：Gemini 3.x シリーズでは `thinkingConfig.thinkingLevel`（各モデルが対応する段階とデフォルトは `thinkingLevel` パラメータを参照）を使用します。Gemini 2.5 シリーズでは `thinkingConfig.thinkingBudget`（整数、`0`=無効）を使用します。両者は排他的です。
- **関数呼び出し**：Gemini 3.x の `FunctionResponse` では、対応する `FunctionCall` と一致する `id` と `name` を必ず返す必要があります。そうでない場合はエラーになります。
- **最終ターンのロール**：最後のメッセージの `role` を `model` にすることはできません（Gemini 3.5+ ではエラーになります）。
- **Token 上限**：`gemini-3.6-flash` / `gemini-3.5-flash-lite` はコンテキスト 1,048,576、最大出力 65,536。その他のモデルは各自の仕様に準じます。

<Tip>
  **ストリーミング**：URL の `generateContent` を `streamGenerateContent` に置き換えてください。リクエストボディのパラメータは同一です。レスポンスはストリーミングでチャンクごとに返されます。レスポンス形式は下記の「ストリーミングレスポンス」を参照してください。
</Tip>

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


## OpenAPI

````yaml ja/api-manual/language-series/gemini/native-api/native-api-reference.json POST /v1beta/models/{model}:generateContent
openapi: 3.1.0
info:
  title: Gemini 全モデルインターフェース（ネイティブ API 形式）
  description: >-
    Gemini 全シリーズのテキストモデルを統一したネイティブインターフェース。パス内の model
    で具体的なモデルを選択し、テキストおよびマルチモーダル（画像 / 音声 / 動画）入力に対応します。
  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: Gemini AIコンテンツ生成関連API
paths:
  /v1beta/models/{model}:generateContent:
    post:
      tags:
        - コンテンツ生成
      summary: Gemini コンテンツ生成（全モデル）
      description: >-
        パス内の `{model}` で呼び出す Gemini テキストモデルを選択します（すべての選択可能な値は `model`
        パラメータの対照表を参照してください）。


        - Google ネイティブ API 形式を使用し、会話内容を同期的に返却します

        - **プレーンテキスト / マルチモーダル入力**：テキスト + 画像 / 音声 / 動画の混合入力

        - **ストリーミング**：パス内の `generateContent` を `streamGenerateContent`
        に置き換えます（`?alt=sse` を追加して SSE を取得できます）


        ---


        **モデルの仕様と差異**

        - **サンプリングパラメータ** `temperature` / `topP` /
        `topK`：`gemini-3.6-flash`、`gemini-3.5-flash-lite`
        はカスタム値をサポートしておらず、指定しても有効になりません。その他のモデルは通常どおり有効です。

        - **思考制御**：Gemini 3.x シリーズでは
        `thinkingConfig.thinkingLevel`（各モデルが対応する段階とデフォルトは `thinkingLevel`
        パラメータを参照）を使用します。Gemini 2.5 シリーズでは
        `thinkingConfig.thinkingBudget`（整数、`0`=無効）を使用します。両者は排他的です。

        - **関数呼び出し**：Gemini 3.x の `FunctionResponse` では、対応する `FunctionCall`
        と一致する `id` と `name` を必ず返す必要があります。そうでない場合はエラーになります。

        - **最終ターンのロール**：最後のメッセージの `role` を `model` にすることはできません（Gemini 3.5+
        ではエラーになります）。

        - **Token 上限**：`gemini-3.6-flash` / `gemini-3.5-flash-lite` はコンテキスト
        1,048,576、最大出力 65,536。その他のモデルは各自の仕様に準じます。
      operationId: geminiGenerateContent
      parameters:
        - name: model
          in: path
          required: true
          description: >-
            呼び出す Gemini テキストモデルを選択します：


            | モデル ID | シリーズ | 位置づけ |

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

            | `gemini-3.6-flash` | 3.6 Flash | マルチステップ編成 / コードリファクタリング / 汎用推論 |

            | `gemini-3.5-flash` | 3.5 Flash | 汎用 Flash |

            | `gemini-3.5-flash-lite` | 3.5 Flash-Lite | 低コスト / 高スループット / 軽量
            agent |

            | `gemini-3.1-pro-preview` | 3.1 Pro (Preview) | 高度な推論 |

            | `gemini-3.1-pro-preview-customtools` | 3.1 Pro · CustomTools |
            高度な推論 + カスタムツール |

            | `gemini-3.1-flash-lite-preview` | 3.1 Flash-Lite (Preview) | 低コスト
            |

            | `gemini-3-pro-preview` | 3.0 Pro (Preview) | 高度な推論 |

            | `gemini-3-flash-preview` | 3.0 Flash (Preview) | 汎用 Flash |

            | `gemini-2.5-pro` | 2.5 Pro | 高度な推論 |

            | `gemini-2.5-flash` | 2.5 Flash | 汎用 Flash |

            | `gemini-2.5-flash-lite` | 2.5 Flash-Lite | 低コスト |
          schema:
            type: string
            enum:
              - gemini-3.6-flash
              - gemini-3.5-flash
              - gemini-3.5-flash-lite
              - gemini-3.1-pro-preview
              - gemini-3.1-pro-preview-customtools
              - gemini-3.1-flash-lite-preview
              - gemini-3-pro-preview
              - gemini-3-flash-preview
              - gemini-2.5-pro
              - gemini-2.5-flash
              - gemini-2.5-flash-lite
            example: gemini-3.6-flash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateContentRequest'
            examples:
              simple_text:
                summary: シングルターンテキスト会話
                value:
                  contents:
                    - role: user
                      parts:
                        - text: Please introduce yourself
              multi_turn:
                summary: マルチターン会話（コンテキスト理解）
                value:
                  contents:
                    - role: user
                      parts:
                        - text: What is Python?
                    - role: model
                      parts:
                        - text: Python is a high-level programming language...
                    - role: user
                      parts:
                        - text: What are its advantages?
              audio_analysis:
                summary: 音声分析
                value:
                  contents:
                    - role: user
                      parts:
                        - text: >-
                            Please analyze this song audio and answer: 1. Song
                            source and artist 2. Song mood 3. Complete lyrics
                            output
                        - fileData:
                            mimeType: audio/mp3
                            fileUri: https://example.com/audio.mp3
              image_understanding:
                summary: 画像理解
                value:
                  contents:
                    - role: user
                      parts:
                        - text: >-
                            Please describe the scene and main elements in this
                            image in detail
                        - fileData:
                            mimeType: image/jpeg
                            fileUri: https://example.com/image.jpg
              multi_file:
                summary: マルチファイル入力（混合）
                value:
                  contents:
                    - role: user
                      parts:
                        - text: >-
                            Compare the relationship between these two images
                            and this audio
                        - fileData:
                            mimeType: image/jpeg
                            fileUri: https://example.com/image1.jpg
                        - fileData:
                            mimeType: image/png
                            fileUri: https://example.com/image2.png
                        - fileData:
                            mimeType: audio/mp3
                            fileUri: https://example.com/audio.mp3
      responses:
        '200':
          description: >-
            コンテンツが正常に生成されました


            **レスポンス形式の説明**：

            - `generateContent`
            エンドポイント使用時、`GenerateContentResponse`を返却（完全なレスポンスを一度に返却）

            - `streamGenerateContent`
            エンドポイント使用時、`StreamGenerateContentResponse`を返却（ストリーミングレスポンス、コンテンツをチャンクで返却）
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GenerateContentResponse'
                  - $ref: '#/components/schemas/StreamGenerateContentResponse'
        '400':
          description: 無効なリクエストパラメータ
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 400
                  message: 無効なリクエストパラメータ
                  type: invalid_request_error
        '401':
          description: 未認可、トークンが無効または期限切れです
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 401
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: クォータ不足、チャージが必要です
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 402
                  message: クォータ不足
                  type: insufficient_quota_error
                  fallback_suggestion: https://evolink.ai/dashboard/billing
        '403':
          description: アクセス拒否
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 403
                  message: Access denied for this model
                  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: リクエストボディが大きすぎます
                  type: request_too_large_error
                  fallback_suggestion: reduce file size
        '429':
          description: レート制限を超過しました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 429
                  message: レート制限を超過しました
                  type: rate_limit_error
                  fallback_suggestion: retry after 60 seconds
        '500':
          description: 内部サーバーエラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 500
                  message: 内部サーバーエラー
                  type: internal_server_error
                  fallback_suggestion: try again later
        '502':
          description: 上流サービスエラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 502
                  message: Upstream AI service unavailable
                  type: upstream_error
                  fallback_suggestion: try again later
        '503':
          description: サービス一時利用不可
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 503
                  message: サービス一時利用不可
                  type: service_unavailable_error
                  fallback_suggestion: retry after 30 seconds
components:
  schemas:
    GenerateContentRequest:
      type: object
      required:
        - contents
      properties:
        contents:
          type: array
          description: >-
            List of conversation contents, supports multi-turn dialogue and
            multimodal input
          items:
            $ref: '#/components/schemas/Content'
          minItems: 1
        generationConfig:
          $ref: '#/components/schemas/GenerationConfig'
          description: Generation configuration parameters (optional)
        systemInstruction:
          $ref: '#/components/schemas/Content'
          description: System instruction (optional), mainly text content
        tools:
          type: array
          items:
            type: object
          description: >-
            List of tools the model can call, such as function calling or code
            execution
        toolConfig:
          type: object
          description: Tool calling configuration (optional)
        safetySettings:
          type: array
          items:
            type: object
          description: Safety settings list (optional)
        cachedContent:
          type: string
          description: Cached content name, in the form cachedContents/{cachedContent}
    GenerateContentResponse:
      title: 同期レスポンス
      type: object
      properties:
        candidates:
          type: array
          description: List of candidate responses
          items:
            $ref: '#/components/schemas/Candidate'
        promptFeedback:
          $ref: '#/components/schemas/PromptFeedback'
        usageMetadata:
          $ref: '#/components/schemas/UsageMetadata'
        modelVersion:
          type: string
          description: Model version
          example: gemini-3.6-flash
        responseId:
          type: string
          description: Response ID
          example: l-LoaPu0BPmo1dkP6ZPHiQc
    StreamGenerateContentResponse:
      title: ストリームレスポンス
      type: object
      description: |-
        ストリームレスポンスチャンク

        **中間チャンク**:
        ```json
        {
          "candidates": [
            {
              "content": {
                "role": "model",
                "parts": [{ "text": "Partial text..." }]
              }
            }
          ],
          "usageMetadata": {
            "trafficType": "ON_DEMAND"
          },
          "modelVersion": "gemini-3.6-flash",
          "createTime": "2025-10-10T10:40:23.072315Z",
          "responseId": "xxx"
        }
        ```

        **最終チャンク**:
        ```json
        {
          "candidates": [
            {
              "content": {
                "role": "model",
                "parts": [{ "text": "Final text fragment" }]
              },
              "finishReason": "STOP"
            }
          ],
          "usageMetadata": {
            "promptTokenCount": 4,
            "candidatesTokenCount": 522,
            "totalTokenCount": 2191,
            "trafficType": "ON_DEMAND"
          },
          "modelVersion": "gemini-3.6-flash",
          "createTime": "2025-10-10T10:40:23.072315Z",
          "responseId": "xxx"
        }
        ```
      properties:
        candidates:
          type: array
          description: 候補応答のリスト（ストリーミングモードにはindexとsafetyRatingsは含まれません）
          items:
            $ref: '#/components/schemas/StreamCandidate'
        usageMetadata:
          type: object
          description: 使用統計（中間チャンクには trafficType のみ、最後のチャンクに完全な統計が含まれます）
          properties:
            promptTokenCount:
              type: integer
              description: 入力コンテンツのトークン数(最後のチャンクのみ)
              example: 4
            candidatesTokenCount:
              type: integer
              description: 出力コンテンツのトークン数(最後のチャンクのみ)
              example: 522
            totalTokenCount:
              type: integer
              description: トークンの合計数（最後のチャンクのみ）
              example: 2191
            trafficType:
              type: string
              description: トラフィックタイプ
              example: ON_DEMAND
            cachedContentTokenCount:
              type: integer
              description: Number of cached content tokens (last chunk only)
              example: 0
        modelVersion:
          type: string
          description: モデルバージョン
          example: gemini-3.6-flash
        createTime:
          type: string
          format: date-time
          description: 作成日時
          example: '2025-10-10T10:40:23.072315Z'
        responseId:
          type: string
          description: レスポンスID
          example: l-LoaPu0BPmo1dkP6ZPHiQc
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
              description: HTTP ステータスエラーコード
            message:
              type: string
              description: エラーの説明
            type:
              type: string
              description: エラータイプ
            fallback_suggestion:
              type: string
              description: エラー発生時の提案
    Content:
      type: object
      required:
        - role
        - parts
      properties:
        role:
          type: string
          description: |-
            コンテンツロール

            - `user`：ユーザー入力
            - `model`：AIモデルの応答（マルチターン会話用）
          enum:
            - user
            - model
          example: user
        parts:
          type: array
          description: >-
            Content parts list, supports text, file data, inline data, function
            calls, function responses, and code execution results
          items:
            $ref: '#/components/schemas/Part'
          minItems: 1
    GenerationConfig:
      type: object
      description: Generation configuration parameters
      properties:
        temperature:
          type: number
          description: >-
            サンプリング温度、出力のランダム性を制御


            **説明**:

            - 低い値（例: 0.2）: より決定論的で集中した出力

            - 高い値（例: 1.5）: よりランダムで創造的な出力


            ⚠️ `gemini-3.6-flash`、`gemini-3.5-flash-lite`
            はこのパラメータのカスタム値をサポートしていません（指定しても有効になりません）。その他のモデルは通常どおり有効です。
          minimum: 0
          maximum: 2
          example: 0.7
        maxOutputTokens:
          type: integer
          description: >-
            生成された応答の最大トークン数


            **説明**:

            - 値が小さすぎると応答が切り捨てられる可能性があります


            `gemini-3.6-flash` / `gemini-3.5-flash-lite` は上限 65,536
            tokens。その他のモデルは各自の仕様に準じます。
          minimum: 1
          example: 2000
        topP:
          type: number
          description: >-
            Nucleus Samplingパラメータ


            **説明**:

            - 累積確率を持つトークンからのサンプリングを制御

            - 例えば、0.9は累積確率が90%までのトークンから選択することを意味します

            - デフォルト: 1.0（すべてのトークンを考慮）


            **推奨**: temperatureとtopPを同時に調整しないでください


            ⚠️ `gemini-3.6-flash`、`gemini-3.5-flash-lite`
            はこのパラメータのカスタム値をサポートしていません（指定しても有効になりません）。その他のモデルは通常どおり有効です。
          minimum: 0
          maximum: 1
          example: 0.9
        topK:
          type: integer
          description: >-
            Top-K サンプリングパラメータ


            **説明**:

            - 例えば、10は確率が最も高い上位10トークンのみをサンプリング対象にすることを意味します

            - 値が小さいほど出力がより集中します

            - デフォルト: 制限なし


            ⚠️ `gemini-3.6-flash`、`gemini-3.5-flash-lite`
            はこのパラメータのカスタム値をサポートしていません（指定しても有効になりません）。その他のモデルは通常どおり有効です。
          minimum: 1
          example: 40
        responseMimeType:
          type: string
          description: >-
            MIME type of generated candidate content, for example text/plain or
            application/json
          example: application/json
        responseSchema:
          type: object
          description: >-
            Output schema definition for generated content (JSON mode /
            structured output)
        responseJsonSchema:
          type: object
          description: >-
            JSON Schema for generated content (useful for more complex
            structured output)
        thinkingConfig:
          type: object
          description: >-
            思考設定。モデルの推論動作を制御します。


            - **Gemini 3.x シリーズ**：`thinkingLevel` を使用します（各モデルが対応する段階とデフォルトは
            `thinkingLevel` パラメータを参照してください）

            - **Gemini 2.5 シリーズ**：`thinkingBudget` を使用


            ⚠️ `thinkingLevel` と `thinkingBudget` は排他的で、同時に指定するとエラーになります。
          properties:
            thinkingLevel:
              type: string
              enum:
                - minimal
                - low
                - medium
                - high
              description: >-
                思考レベル。推論の深さを制御します（大文字・小文字を区別しません）：

                - `minimal`：思考をほとんど行わず、高スループット / 低レイテンシのシナリオ（分類、抽出、ルーティングなど）向け

                - `low`：思考は少なめで、単純なタスクに適しています

                - `medium`：品質と速度のバランスが取れ、中程度の複雑さのタスクに適しています

                - `high`：深いマルチステップ推論で、複雑な推論、数学、コーディングに適しています


                **Gemini 3.x シリーズのみ対応**しており、各モデルが対応する段階とデフォルトは異なります（Gemini 2.5
                シリーズでは `thinkingBudget` を使用します）：


                | モデル | 対応段階 | デフォルト |

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

                | `gemini-3.6-flash` | `minimal` / `low` / `medium` / `high` |
                `medium` |

                | `gemini-3.5-flash` | `minimal` / `low` / `medium` / `high` |
                `medium` |

                | `gemini-3.5-flash-lite` | `minimal` / `low` / `medium` /
                `high` | `minimal` |

                | `gemini-3.1-flash-lite-preview` | `minimal` / `low` / `medium`
                / `high` | `minimal` |

                | `gemini-3-flash-preview` | `minimal` / `low` / `medium` /
                `high` | `medium` |

                | `gemini-3.1-pro-preview` | `low` / `medium` / `high` | `high`
                |

                | `gemini-3.1-pro-preview-customtools` | `low` / `medium` /
                `high` | `high` |

                | `gemini-3-pro-preview` | `low` / `medium` / `high` | `high` |


                モデルが対応していない段階を指定するとエラーになります（例えば Pro 系に `minimal` を渡すと上流から 400
                が返ります）。
              example: minimal
            thinkingBudget:
              type: integer
              description: >-
                思考 token バジェット。**Gemini 2.5 シリーズ**（`gemini-2.5-flash` /
                `gemini-2.5-flash-lite` /
                `gemini-2.5-pro`）で使用します：`0`=思考を無効化、`-1`=動的バジェット、正の整数=固定バジェット（具体的な範囲は各モデルに準じます）。`thinkingLevel`
                と排他的です。
              example: -1
    Candidate:
      type: object
      properties:
        content:
          $ref: '#/components/schemas/ContentResponse'
        finishReason:
          type: string
          description: Finish reason
          enum:
            - FINISH_REASON_UNSPECIFIED
            - STOP
            - MAX_TOKENS
            - SAFETY
            - RECITATION
            - LANGUAGE
            - OTHER
            - BLOCKLIST
            - PROHIBITED_CONTENT
            - SPII
            - MALFORMED_FUNCTION_CALL
            - IMAGE_SAFETY
            - IMAGE_PROHIBITED_CONTENT
            - IMAGE_OTHER
            - NO_IMAGE
            - IMAGE_RECITATION
            - UNEXPECTED_TOOL_CALL
            - TOO_MANY_TOOL_CALLS
            - MISSING_THOUGHT_SIGNATURE
          example: STOP
        index:
          type: integer
          description: 候補インデックス
          example: 0
        safetyRatings:
          type: array
          nullable: true
          description: 安全性評価
          items:
            type: object
    PromptFeedback:
      type: object
      properties:
        safetyRatings:
          type: array
          nullable: true
          description: プロンプト安全性評価
          items:
            type: object
    UsageMetadata:
      type: object
      description: 使用統計
      properties:
        promptTokenCount:
          type: integer
          description: 入力コンテンツのトークン数
          example: 4
        candidatesTokenCount:
          type: integer
          description: 出力コンテンツのトークン数
          example: 611
        totalTokenCount:
          type: integer
          description: トークンの合計数
          example: 2422
        thoughtsTokenCount:
          type: integer
          description: 推論トークン数
          example: 1807
        promptTokensDetails:
          type: array
          description: 詳細な入力トークン情報（モダリティ別）
          items:
            $ref: '#/components/schemas/TokenDetail'
        cachedContentTokenCount:
          type: integer
          description: Number of cached content tokens
          example: 0
    StreamCandidate:
      type: object
      description: Stream response candidate (more simplified than regular response)
      properties:
        content:
          $ref: '#/components/schemas/ContentResponse'
        finishReason:
          type: string
          description: Finish reason (only included in last chunk)
          enum:
            - FINISH_REASON_UNSPECIFIED
            - STOP
            - MAX_TOKENS
            - SAFETY
            - RECITATION
            - LANGUAGE
            - OTHER
            - BLOCKLIST
            - PROHIBITED_CONTENT
            - SPII
            - MALFORMED_FUNCTION_CALL
            - IMAGE_SAFETY
            - IMAGE_PROHIBITED_CONTENT
            - IMAGE_OTHER
            - NO_IMAGE
            - IMAGE_RECITATION
            - UNEXPECTED_TOOL_CALL
            - TOO_MANY_TOOL_CALLS
            - MISSING_THOUGHT_SIGNATURE
          example: STOP
    Part:
      oneOf:
        - $ref: '#/components/schemas/TextPart'
        - $ref: '#/components/schemas/FilePart'
        - $ref: '#/components/schemas/InlineDataPart'
        - $ref: '#/components/schemas/FunctionCallPart'
        - $ref: '#/components/schemas/FunctionResponsePart'
        - $ref: '#/components/schemas/ExecutableCodePart'
        - $ref: '#/components/schemas/CodeExecutionResultPart'
      description: >-
        Content part union type. The thoughtSignature returned by thinking
        models must be echoed back in the next turn.
    ContentResponse:
      type: object
      properties:
        role:
          type: string
          description: レスポンスロール
          enum:
            - model
          example: model
        parts:
          type: array
          description: >-
            Response content parts, supports text, inline data, function calls,
            function responses, and code execution results
          items:
            $ref: '#/components/schemas/Part'
    TokenDetail:
      type: object
      description: トークン詳細（モダリティ別統計）
      properties:
        modality:
          type: string
          description: Content modality type
          enum:
            - MODALITY_UNSPECIFIED
            - TEXT
            - IMAGE
            - AUDIO
            - VIDEO
            - DOCUMENT
          example: TEXT
        tokenCount:
          type: integer
          description: このモダリティのトークン数
          example: 4
    TextPart:
      title: テキスト入力
      type: object
      required:
        - text
      properties:
        text:
          type: string
          description: テキストコンテンツ
          example: |-
            Hello! I'm pleased to introduce myself.

            I'm a large language model, trained and developed by Google...
        thought:
          type: boolean
          description: Whether this is thought content
        thoughtSignature:
          type: string
          description: Thought signature, must be echoed back in the next turn
          example: <Signature_A>
    FilePart:
      title: マルチモーダル入力
      type: object
      required:
        - fileData
      properties:
        fileData:
          type: object
          required:
            - mimeType
            - fileUri
          properties:
            mimeType:
              type: string
              description: |-
                ファイルMIMEタイプ

                **対応タイプ**：

                **画像**：
                - `image/jpeg`、`image/png`
                - 画像あたりの最大サイズ：10 MB

                **音声**：
                - `audio/mp3`
                - ファイルあたりの最大サイズ：10 MB
                - 推奨長さ：10分以内

                **動画**：
                - `video/mp4`
                - ファイルあたりの最大サイズ：50 MB
                - 推奨長さ：180秒以内

                **ドキュメント**：
                - `application/pdf`
                - ファイルあたりの最大サイズ：20 MB
              example: audio/mp3
            fileUri:
              type: string
              format: uri
              description: |-
                ファイルURIアドレス

                **要件**：
                - 公開アクセス可能なURLである必要があります
                - URLはファイル拡張子（例：.mp3、.jpg）で終わり、mimeTypeパラメータと一致する必要があります
              example: https://example.com/audio.mp3
    InlineDataPart:
      title: Inline Data
      type: object
      required:
        - inlineData
      properties:
        inlineData:
          $ref: '#/components/schemas/BlobData'
        thought:
          type: boolean
          description: Whether this is thought content
        thoughtSignature:
          type: string
          description: Thought signature, must be echoed back in the next turn
          example: <Signature_A>
    FunctionCallPart:
      title: Function Call
      type: object
      required:
        - functionCall
      properties:
        functionCall:
          $ref: '#/components/schemas/FunctionCall'
        thought:
          type: boolean
          description: Whether this is thought content
        thoughtSignature:
          type: string
          description: Thought signature, must be echoed back in the next turn
          example: <Signature_A>
    FunctionResponsePart:
      title: Function Response
      type: object
      required:
        - functionResponse
      properties:
        functionResponse:
          $ref: '#/components/schemas/FunctionResponse'
    ExecutableCodePart:
      title: Generated Code
      type: object
      required:
        - executableCode
      properties:
        executableCode:
          $ref: '#/components/schemas/ExecutableCode'
    CodeExecutionResultPart:
      title: Code Execution Result
      type: object
      required:
        - codeExecutionResult
      properties:
        codeExecutionResult:
          $ref: '#/components/schemas/CodeExecutionResult'
    BlobData:
      type: object
      properties:
        mimeType:
          type: string
          description: IANA MIME type
          example: image/png
        data:
          type: string
          format: byte
          description: Base64-encoded raw media data
      required:
        - mimeType
        - data
    FunctionCall:
      type: object
      required:
        - name
        - args
      properties:
        name:
          type: string
          description: Function name
          example: get_weather
        args:
          type: object
          description: Function arguments
        id:
          type: string
          description: 呼び出し ID。Gemini 3.x ではモデルによって生成され、並列関数呼び出しのペアリングに使用されます。
          example: fc-abc123
    FunctionResponse:
      type: object
      required:
        - name
        - response
      properties:
        name:
          type: string
          description: Function name
          example: get_weather
        parts:
          type: array
          description: Optional multimodal response parts
          items:
            $ref: '#/components/schemas/FunctionResponseMediaPart'
        response:
          type: object
          description: Function response payload
        id:
          type: string
          description: >-
            対応する `FunctionCall` の呼び出し ID（一部のドキュメント / SDK では `call_id`
            と呼ばれます）。**Gemini 3.x では必ず返す必要があり**、`name`
            と併せてペアリングに使用されます。そうでない場合はエラーになります。
          example: fc-abc123
    ExecutableCode:
      type: object
      required:
        - language
        - code
      properties:
        language:
          type: string
          description: Code language
          example: python
        code:
          type: string
          description: Generated code
    CodeExecutionResult:
      type: object
      required:
        - outcome
      properties:
        outcome:
          type: string
          description: Code execution result
          enum:
            - OUTCOME_UNSPECIFIED
            - OUTCOME_OK
            - OUTCOME_FAILED
            - OUTCOME_DEADLINE_EXCEEDED
          example: OUTCOME_OK
        output:
          type: string
          description: Standard output, error output, or other description
    FunctionResponseMediaPart:
      type: object
      required:
        - inlineData
      properties:
        inlineData:
          $ref: '#/components/schemas/BlobData'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##すべてのAPIにBearer Token認証が必要です##

        **APIキーの取得：**

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

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

````