> ## 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.x 全系一致，自定义值不影响输出；`topK` 被网关直接丢弃（不下发上游），`temperature` / `topP` 超出合法范围会返回 400。
- **思考控制**：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`，请求体不变，响应逐块返回；可追加 `?alt=sse` 获取 SSE 格式。
</Tip>

<Note>
  **BaseURL 说明**：默认 BaseURL 为 `https://direct.evolink.ai`，对文本模型支持更好、支持长连接；`https://api.evolink.ai` 为备用地址。
</Note>


## OpenAPI

````yaml cn/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: 备用地址
security:
  - bearerAuth: []
tags:
  - name: 内容生成
    description: Gemini AI 内容生成相关接口
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.x
        全系一致，自定义值不影响输出；`topK` 被网关直接丢弃（不下发上游），`temperature` / `topP` 超出合法范围会返回
        400。

        - **思考控制**：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: 请介绍下你自己
              multi_turn:
                summary: 多轮对话（上下文理解）
                value:
                  contents:
                    - role: user
                      parts:
                        - text: 什么是Python？
                    - role: model
                      parts:
                        - text: Python是一种高级编程语言...
                    - role: user
                      parts:
                        - text: 它有什么优点？
              audio_analysis:
                summary: 音频分析
                value:
                  contents:
                    - role: user
                      parts:
                        - text: 请分析这段歌曲音频，回答以下问题：1. 歌曲来源和歌手来源 2. 歌曲情绪 3. 歌词完整输出
                        - fileData:
                            mimeType: audio/mp3
                            fileUri: https://example.com/audio.mp3
              image_understanding:
                summary: 图像理解
                value:
                  contents:
                    - role: user
                      parts:
                        - text: 请详细描述这张图片中的场景和主要元素
                        - fileData:
                            mimeType: image/jpeg
                            fileUri: https://example.com/image.jpg
              multi_file:
                summary: 多文件输入（混合）
                value:
                  contents:
                    - role: user
                      parts:
                        - text: 对比这两张图片和这段音频的内容关联性
                        - 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: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: 未认证、Token无效或过期
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 401
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: 配额不足、需要充值
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 402
                  message: Insufficient quota
                  type: insufficient_quota_error
                  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: Request body too large
                  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: Rate limit exceeded
                  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: Internal server error
                  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: Service temporarily unavailable
                  type: service_unavailable_error
                  fallback_suggestion: retry after 30 seconds
components:
  schemas:
    GenerateContentRequest:
      type: object
      required:
        - contents
      properties:
        contents:
          type: array
          description: 对话内容列表，支持多轮对话和多模态输入
          items:
            $ref: '#/components/schemas/Content'
          minItems: 1
        systemInstruction:
          $ref: '#/components/schemas/Content'
          description: 系统指令（可选），当前以文本为主
        tools:
          type: array
          description: 模型可调用的工具列表，如函数调用或代码执行
          items:
            type: object
        toolConfig:
          type: object
          description: 工具调用配置（可选）
        safetySettings:
          type: array
          description: 安全设置列表（可选）
          items:
            type: object
        generationConfig:
          $ref: '#/components/schemas/GenerationConfig'
          description: 生成配置参数（可选）
        cachedContent:
          type: string
          description: 缓存内容名称，格式为 cachedContents/{cachedContent}
    GenerateContentResponse:
      title: 同步响应
      type: object
      properties:
        candidates:
          type: array
          description: 候选响应列表
          items:
            $ref: '#/components/schemas/Candidate'
        promptFeedback:
          $ref: '#/components/schemas/PromptFeedback'
        usageMetadata:
          $ref: '#/components/schemas/UsageMetadata'
        modelVersion:
          type: string
          description: 模型版本
          example: gemini-3.6-flash
        responseId:
          type: string
          description: 响应 ID
          example: l-LoaPu0BPmo1dkP6ZPHiQc
    StreamGenerateContentResponse:
      title: 流式响应
      type: object
      description: |-
        流式响应块

        **中间块**:
        ```json
        {
          "candidates": [
            {
              "content": {
                "role": "model",
                "parts": [{ "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": "最后的文本片段" }]
              },
              "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: 输入内容的 token 数量（仅最后一块）
              example: 4
            cachedContentTokenCount:
              type: integer
              description: 缓存内容 token 数量（仅最后一块）
              example: 0
            candidatesTokenCount:
              type: integer
              description: 输出内容的 token 数量（仅最后一块）
              example: 522
            totalTokenCount:
              type: integer
              description: 总 token 数量（仅最后一块）
              example: 2191
            trafficType:
              type: string
              description: 流量类型
              example: ON_DEMAND
        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: 内容片段列表，支持文本、文件、内联数据、函数调用、函数返回和代码执行结果
          items:
            $ref: '#/components/schemas/Part'
          minItems: 1
    GenerationConfig:
      type: object
      description: 生成配置参数
      properties:
        temperature:
          type: number
          description: >-
            采样温度，控制输出的随机性


            **说明**:

            - 较低值(如 0.2): 更确定、更聚焦的输出

            - 较高值(如 1.5): 更随机、更有创意的输出


            ⚠️ **Gemini 3.x 全系一致**（不因模型而异）：合法范围内的自定义值不影响输出；超出该参数合法范围会返回
            400，而非静默忽略。
          minimum: 0
          maximum: 2
          example: 0.7
        maxOutputTokens:
          type: integer
          description: >-
            生成回复的最大 token 数量


            **说明**:

            - 此值过小可能导致回复被截断


            `gemini-3.6-flash` / `gemini-3.5-flash-lite` 上限 65,536
            tokens；其余模型以各自规格为准。
          minimum: 1
          example: 2000
        topP:
          type: number
          description: >-
            核采样(Nucleus Sampling)参数


            **说明**:

            - 控制从累积概率前多少的token中采样

            - 例如 0.9 表示从累积概率达到90%的token中选择

            - 默认值: 0.95


            **建议**: 不要同时调整 temperature 和 topP


            ⚠️ **Gemini 3.x 全系一致**（不因模型而异）：合法范围内的自定义值不影响输出；超出该参数合法范围会返回
            400，而非静默忽略。
          minimum: 0
          maximum: 1
          example: 0.9
        topK:
          type: integer
          description: |-
            Top-K 采样参数

            **说明**:
            - 例如 10 表示限制每次采样时只考虑概率最高的 10 个 token
            - 较小的值会使输出更加聚焦
            - 默认值: 64

            ⚠️ 该参数会被网关直接丢弃、不下发上游，对所有 Gemini 3.x 模型均不生效。
          minimum: 1
          example: 40
        responseMimeType:
          type: string
          description: 生成候选内容的 MIME 类型，例如 text/plain 或 application/json
          example: application/json
        responseSchema:
          type: object
          description: 生成内容的输出结构定义（JSON Mode / 结构化输出）
        responseJsonSchema:
          type: object
          description: 生成内容的 JSON Schema（可选，适合更复杂的结构化输出）
        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: 完成原因
          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: 输入内容的 token 数量
          example: 4
        cachedContentTokenCount:
          type: integer
          description: 缓存内容 token 数量
          example: 0
        candidatesTokenCount:
          type: integer
          description: 输出内容的 token 数量
          example: 611
        totalTokenCount:
          type: integer
          description: 总 token 数量
          example: 2422
        thoughtsTokenCount:
          type: integer
          description: 推理 token 数量
          example: 1807
        promptTokensDetails:
          type: array
          description: 输入 token 详细信息（按模态分类）
          items:
            $ref: '#/components/schemas/TokenDetail'
    StreamCandidate:
      type: object
      description: 流式响应候选项（比普通响应更简化）
      properties:
        content:
          $ref: '#/components/schemas/ContentResponse'
        finishReason:
          type: string
          description: 完成原因（仅最后一块包含此字段）
          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: 内容片段联合类型。思考模型返回的 thoughtSignature 需要在下一轮原样回传。
    ContentResponse:
      type: object
      properties:
        role:
          type: string
          description: 响应角色
          enum:
            - model
          example: model
        parts:
          type: array
          description: 响应内容片段列表，支持文本、内联数据、函数调用、函数返回和代码执行结果
          items:
            $ref: '#/components/schemas/Part'
    TokenDetail:
      type: object
      description: Token 详细信息（按模态统计）
      properties:
        modality:
          type: string
          description: 内容模态类型
          enum:
            - MODALITY_UNSPECIFIED
            - TEXT
            - IMAGE
            - AUDIO
            - VIDEO
            - DOCUMENT
          example: TEXT
        tokenCount:
          type: integer
          description: 该模态的 token 数量
          example: 4
    TextPart:
      title: 文本输入
      type: object
      required:
        - text
      properties:
        text:
          type: string
          description: 文本内容
          example: |-
            你好！很高兴能向你介绍我自己。

            我是一个大型语言模型，由 Google 训练和开发...
        thought:
          type: boolean
          description: 是否为思考内容
        thoughtSignature:
          type: string
          description: 思考签名，需要在下一轮原样回传
          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: 内联数据
      type: object
      required:
        - inlineData
      properties:
        inlineData:
          $ref: '#/components/schemas/BlobData'
        thought:
          type: boolean
          description: 是否为思考内容
        thoughtSignature:
          type: string
          description: 思考签名，需要在下一轮原样回传
          example: <Signature_A>
    FunctionCallPart:
      title: 函数调用
      type: object
      required:
        - functionCall
      properties:
        functionCall:
          $ref: '#/components/schemas/FunctionCall'
        thought:
          type: boolean
          description: 是否为思考内容
        thoughtSignature:
          type: string
          description: 思考签名，需要在下一轮原样回传
          example: <Signature_A>
    FunctionResponsePart:
      title: 函数返回
      type: object
      required:
        - functionResponse
      properties:
        functionResponse:
          $ref: '#/components/schemas/FunctionResponse'
    ExecutableCodePart:
      title: 生成代码
      type: object
      required:
        - executableCode
      properties:
        executableCode:
          $ref: '#/components/schemas/ExecutableCode'
    CodeExecutionResultPart:
      title: 代码执行结果
      type: object
      required:
        - codeExecutionResult
      properties:
        codeExecutionResult:
          $ref: '#/components/schemas/CodeExecutionResult'
    BlobData:
      type: object
      required:
        - mimeType
        - data
      properties:
        mimeType:
          type: string
          description: IANA MIME 类型
          example: image/png
        data:
          type: string
          format: byte
          description: Base64 编码的原始媒体数据
    FunctionCall:
      type: object
      required:
        - name
        - args
      properties:
        name:
          type: string
          description: 函数名
          example: get_weather
        args:
          type: object
          description: 函数参数
        id:
          type: string
          description: 调用 ID。Gemini 3.x 由模型生成，用于并行函数调用的配对。
          example: fc-abc123
    FunctionResponse:
      type: object
      required:
        - name
        - response
      properties:
        name:
          type: string
          description: 函数名
          example: get_weather
        response:
          type: object
          description: 函数返回内容
        parts:
          type: array
          description: 可选的多模态返回片段
          items:
            $ref: '#/components/schemas/FunctionResponseMediaPart'
        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: 代码语言
          example: python
        code:
          type: string
          description: 生成的代码
    CodeExecutionResult:
      type: object
      required:
        - outcome
      properties:
        outcome:
          type: string
          description: 代码执行结果
          enum:
            - OUTCOME_UNSPECIFIED
            - OUTCOME_OK
            - OUTCOME_FAILED
            - OUTCOME_DEADLINE_EXCEEDED
          example: OUTCOME_OK
        output:
          type: string
          description: 标准输出、错误输出或其他描述
    FunctionResponseMediaPart:
      type: object
      required:
        - inlineData
      properties:
        inlineData:
          $ref: '#/components/schemas/BlobData'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##所有接口均需要使用Bearer Token进行认证##

        **获取 API Key：**

        访问 [API Key 管理页面](https://evolink.ai/dashboard/keys) 获取您的 API Key

        **使用时在请求头中添加：**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```

````