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

# GPT 全模型接口 - Chat Completions 完整参数

> - GPT 系列文本模型的 OpenAI 兼容 Chat Completions 接口，通过 `model` 选择具体模型（全部可选值见 `model` 参数的对照表）
- 全系为推理模型，通过 `reasoning_effort` 控制推理深度；推理 token 计入输出 token 计费
- Prompt 缓存自动生效：命中缓存的输入 token 按更低的缓存价计费
- 支持同步与流式（SSE）两种模式
- 支持文本 + 图像混合输入，以及 `function` 工具调用
- 服务端工具（联网搜索、代码执行、文档检索、MCP）仅在 [Responses 接口](/cn/api-manual/language-series/gpt/responses/responses-reference)提供
- **注意** 采样类参数（`temperature`、`top_p`、`logprobs` 等）各模型支持范围不同，逐参数见下方说明

**GPT-6**：`gpt-6-sol` / `gpt-6-luna` 默认使用 `medium` 推理；只有显式设置 `reasoning_effort: "none"` 时，才能在 Chat Completions 中使用函数工具。`gpt-6-astra` 与 `gpt-6.1-sol` 不支持 `none`，函数调用请使用 [Responses 接口](/cn/api-manual/language-series/gpt/responses/responses-reference)。`gpt-6.1-terra` 支持 `none`，函数调用同样请使用 Responses 接口。GPT-6 的 `max` 档位请使用 Responses，本接口不支持。

> [!NOTE]
>
> **BaseURL 说明**：默认 BaseURL 为 `https://direct.evolink.ai`，对文本模型支持更好，支持长连接；`https://api.evolink.ai` 是多模态主力地址，对文本模型作为备用地址使用。

> [!NOTE]
>
> **服务端工具**（联网搜索、代码执行、文档检索、MCP）仅在 [Responses 接口](https://evolink.ai/docs/cn/api-manual/language-series/gpt/responses/responses-reference.md)提供；Chat Completions 接口只支持普通 `function` 工具调用。

> [!NOTE]
>
> **GPT-6**：Sol / Luna 在本接口调用函数工具时，需设置 `reasoning_effort: "none"`；Astra、6.1 Sol 与 6.1 Terra 的函数调用，以及 GPT-6 的 `max` 档位，请使用 [Responses 接口](https://evolink.ai/docs/cn/api-manual/language-series/gpt/responses/responses-reference.md)。


## OpenAPI

````yaml cn/api-manual/language-series/gpt/chat-completions/chat-completions-reference.json POST /v1/chat/completions
openapi: 3.1.0
info:
  title: GPT 全模型接口 - Chat Completions 完整参数
  description: 通过 OpenAI 兼容的 Chat Completions 接口调用 GPT 系列文本模型的完整参数手册。
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://direct.evolink.ai
    description: 生产环境（推荐）
  - url: https://api.evolink.ai
    description: 备用地址
security:
  - bearerAuth: []
tags:
  - name: Chat Completions
    description: OpenAI 兼容的对话补全接口
paths:
  /v1/chat/completions:
    post:
      tags:
        - Chat Completions
      summary: GPT 对话补全（全模型，完整参数）
      description: >-
        - GPT 系列文本模型的 OpenAI 兼容 Chat Completions 接口，通过 `model` 选择具体模型（全部可选值见
        `model` 参数的对照表）

        - 全系为推理模型，通过 `reasoning_effort` 控制推理深度；推理 token 计入输出 token 计费

        - Prompt 缓存自动生效：命中缓存的输入 token 按更低的缓存价计费

        - 支持同步与流式（SSE）两种模式

        - 支持文本 + 图像混合输入，以及 `function` 工具调用

        - 服务端工具（联网搜索、代码执行、文档检索、MCP）仅在 [Responses
        接口](/cn/api-manual/language-series/gpt/responses/responses-reference)提供

        - **注意** 采样类参数（`temperature`、`top_p`、`logprobs` 等）各模型支持范围不同，逐参数见下方说明


        **GPT-6**：`gpt-6-sol` / `gpt-6-luna` 默认使用 `medium` 推理；只有显式设置
        `reasoning_effort: "none"` 时，才能在 Chat Completions 中使用函数工具。`gpt-6-astra`
        与 `gpt-6.1-sol` 不支持 `none`，函数调用请使用 [Responses
        接口](/cn/api-manual/language-series/gpt/responses/responses-reference)。`gpt-6.1-terra`
        支持 `none`，函数调用同样请使用 Responses 接口。GPT-6 的 `max` 档位请使用 Responses，本接口不支持。
      operationId: gptChatCompletionsReference
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
            example:
              model: gpt-6.1-sol
              messages:
                - role: user
                  content: 用一句话解释什么是量子纠缠。
      responses:
        '200':
          description: '对话生成成功（JSON 对象；`stream=true` 时为 SSE 事件流，以 `data: [DONE]` 结束）'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponse'
        '400':
          description: >-
            请求参数无效（含该模型不支持的参数，错误信息会指出具体参数名）。声明服务端工具（如 `web_search`）或
            `web_search_options` 时，`error.code` 为 `invalid_built_in_tool`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 400
                  message: >-
                    Unsupported parameter: 'stop' is not supported with this
                    model.
                  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/credits
        '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
        '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:
    ChatCompletionRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          type: string
          description: |-
            要调用的模型：

            | 模型 ID | 上下文窗口 | 定位 |
            |---|---|---|
            | `gpt-6.1-terra` | 1,050,000 | GPT-6.1 快速高效档，面向视觉推理、电脑操作与写作 |
            | `gpt-6.1-sol` | 1,050,000 | Sol 新版，以更低成本接近 Astra 的能力（推荐） |
            | `gpt-6-astra` | 1,050,000 | 面向高难度端到端任务的旗舰推理模型 |
            | `gpt-6-sol` | 1,050,000 | 复杂编程与 Agent 工作流 |
            | `gpt-6-luna` | 1,050,000 | 高吞吐分类、抽取与成本控制 |
            | `gpt-5.6-sol` | 1,050,000 | GPT-5.6 家族，前沿推理 |
            | `gpt-5.6-terra` | 1,050,000 | GPT-5.6 家族，均衡生产 |
            | `gpt-5.6-luna` | 1,050,000 | GPT-5.6 家族，高吞吐与成本控制 |
            | `gpt-5.5` | 1,050,000 | 通用推理模型 |
            | `gpt-5.4` | 1,050,000 | 通用推理模型 |
            | `gpt-5.2` | 400,000 | 通用推理模型 |
            | `gpt-5.1` | 400,000 | 通用推理模型 |
          enum:
            - gpt-6.1-terra
            - gpt-6.1-sol
            - gpt-6-astra
            - gpt-6-sol
            - gpt-6-luna
            - gpt-5.6-sol
            - gpt-5.6-terra
            - gpt-5.6-luna
            - gpt-5.5
            - gpt-5.4
            - gpt-5.2
            - gpt-5.1
          example: gpt-6.1-sol
        messages:
          type: array
          description: >-
            对话消息列表，支持多轮上下文与多模态输入。


            `role` 可选 `system` / `developer` / `user` / `assistant` / `tool`。


            `content` 可以是字符串，也可以是内容块数组。块类型支持 `text`（文本）、`image_url`（图像）两种：


            ```json

            "content": [
              { "type": "text", "text": "这张图里有什么？" },
              {
                "type": "image_url",
                "image_url": { "url": "https://example.com/photo.png", "detail": "auto" }
              }
            ]

            ```


            **图像**

            - `image_url.url` 传入图片的公网 URL

            - `image_url` 也可直接写成字符串，等价于 `{ "url": "..." }`

            - `detail` 控制图像解析精度，可选 `auto`（默认）/ `low` / `high` / `original`

            - 图片需能被正常下载，否则返回 `400`


            **注意** 本接口的块类型与 Responses 接口不同（Responses 用 `input_text` /
            `input_image`），两者不可混用，写错会返回 `400`。


            GPT-6 / GPT-5.6 显式缓存断点，放在内容块上；每次请求最多写入 4 个断点（隐式断点占 1 个）。
            `prompt_cache_breakpoint: {"mode": "explicit"}`.
          items:
            $ref: '#/components/schemas/Message'
          example:
            - role: system
              content: 你是一个简洁的助手。
            - role: user
              content: 用一句话解释什么是量子纠缠。
        stream:
          type: boolean
          description: '是否以流式方式返回（SSE 事件流，以 `data: [DONE]` 结束）。默认 `false`。'
          default: false
          example: false
        max_completion_tokens:
          type: integer
          description: >-
            生成的最大 token 数，包含推理 token。推荐使用 `max_completion_tokens`。GPT-6 兼容旧字段
            `max_tokens`：仅传旧字段时会转换；同时传入时保留 `max_completion_tokens` 并移除
            `max_tokens`。GPT-6 Astra / Sol / Luna、GPT-6.1 Sol 与 GPT-6.1 Terra
            最大输出为 128,000 tokens。
          example: 2048
        reasoning_effort:
          type: string
          description: >-
            推理深度控制。可选值随模型不同：


            | 模型 | 可选值 |

            |---|---|

            | `gpt-6-astra` / `gpt-6.1-sol` | `low`、`medium`、`high`、`xhigh` |

            | `gpt-6-sol` / `gpt-6-luna` / `gpt-6.1-terra` |
            `none`、`low`、`medium`、`high`、`xhigh` |

            | `gpt-5.6-sol` / `gpt-5.6-terra` / `gpt-5.6-luna` / `gpt-5.5` |
            `none`、`low`、`medium`、`high`、`xhigh` |

            | `gpt-5.4` / `gpt-5.2` | `none`、`low`、`medium`、`high`、`xhigh` |

            | `gpt-5.1` | `none`、`low`、`medium`、`high` |


            推理 token 按输出 token 计费，并计入
            `usage.completion_tokens_details.reasoning_tokens`。


            GPT-6 默认使用 `medium`。`gpt-6-astra` 与 `gpt-6.1-sol` 不支持
            `none`；`gpt-6-sol` / `gpt-6-luna` / `gpt-6.1-terra` 支持 `none`。GPT-6
            的 `max` 档位仅在 Responses 使用。
          enum:
            - none
            - low
            - medium
            - high
            - xhigh
          example: medium
        verbosity:
          type: string
          description: >-
            回答详略程度，可选 `low` / `medium` / `high`。


            GPT-6 Sol / Luna、GPT-6.1 Sol 与 GPT-6.1 Terra：此参数的支持范围尚未确认，基础请求建议省略。


            以下为既有模型规则（不含 GPT-6 Sol / Luna、GPT-6.1 Sol 与 GPT-6.1 Terra）：


            **注意** `gpt-6-astra`、`gpt-5.6-sol`、`gpt-5.6-terra`、`gpt-5.6-luna` 与
            `gpt-5.5` 支持；其余模型不支持该参数。
          enum:
            - low
            - medium
            - high
          example: low
        temperature:
          type: number
          description: >-
            采样温度，取值 0 ~ 2，值越低输出越确定。


            **GPT-6**：`gpt-6-astra` 与 `gpt-6.1-sol` 请省略此参数；`gpt-6-sol` /
            `gpt-6-luna` / `gpt-6.1-terra` 仅在推理档位为 `none`
            时可调节，其他档位请省略。省略推理档位时默认为 `medium`，不等于 `none`。


            既有模型：仅在推理档位为 `none` 时可调节，其他档位请省略。`gpt-5.4` / `gpt-5.2` / `gpt-5.1`
            省略推理档位时默认为 `none`，可直接调节；`gpt-5.5` 与 `gpt-5.6` 家族省略时默认为
            `medium`，需显式设为 `none` 才可调节。
          minimum: 0
          maximum: 2
          example: 1
        top_p:
          type: number
          description: >-
            核采样参数，取值 0 ~ 1。建议不要与 `temperature` 同时调整。


            **GPT-6**：`gpt-6-astra` 与 `gpt-6.1-sol` 请省略此参数；`gpt-6-sol` /
            `gpt-6-luna` / `gpt-6.1-terra` 仅在推理档位为 `none`
            时可调节，其他档位请省略。省略推理档位时默认为 `medium`，不等于 `none`。


            既有模型：仅在推理档位为 `none` 时可调节，其他档位请省略。`gpt-5.4` / `gpt-5.2` / `gpt-5.1`
            省略推理档位时默认为 `none`，可直接调节；`gpt-5.5` 与 `gpt-5.6` 家族省略时默认为
            `medium`，需显式设为 `none` 才可调节。
          minimum: 0
          maximum: 1
          example: 1
        frequency_penalty:
          type: number
          description: >-
            频率惩罚，取值 -2 ~ 2。正值按 token 出现频率进行惩罚，降低重复内容的概率。


            GPT-6 Sol / Luna、GPT-6.1 Sol 与 GPT-6.1 Terra：此参数的支持范围尚未确认，基础请求建议省略。


            以下为既有模型规则（不含 GPT-6 Sol / Luna、GPT-6.1 Sol 与 GPT-6.1 Terra）：


            **注意** 仅 `gpt-5.4` / `gpt-5.2` / `gpt-5.1` 支持调节；`gpt-5.6` 家族与
            `gpt-5.5` 不支持调节。`gpt-6-astra` 只接受默认值 `0`，传入其他值会返回 `400`。
          minimum: -2
          maximum: 2
          example: 0
        presence_penalty:
          type: number
          description: >-
            存在惩罚，取值 -2 ~ 2。正值鼓励模型讨论新话题。


            GPT-6 Sol / Luna、GPT-6.1 Sol 与 GPT-6.1 Terra：此参数的支持范围尚未确认，基础请求建议省略。


            以下为既有模型规则（不含 GPT-6 Sol / Luna、GPT-6.1 Sol 与 GPT-6.1 Terra）：


            **注意** 仅 `gpt-5.4` / `gpt-5.2` / `gpt-5.1` 支持调节；`gpt-5.6` 家族与
            `gpt-5.5` 不支持调节。`gpt-6-astra` 只接受默认值 `0`，传入其他值会返回 `400`。
          minimum: -2
          maximum: 2
          example: 0
        logprobs:
          type: boolean
          description: >-
            是否返回每个输出 token 的对数概率。


            **GPT-6**：Astra 与 6.1 Sol 不支持输出 logprobs。Sol / Luna 与 6.1 Terra
            仅在推理档位为 `none` 时使用；其他档位请移除 `logprobs`、`top_logprobs`，并从 Responses 的
            `include` 中移除 `message.output_text.logprobs`。


            以下为既有模型规则（不含 GPT-6 Sol / Luna、GPT-6.1 Sol 与 GPT-6.1 Terra）：


            **注意** 仅 `gpt-5.4` / `gpt-5.2` / `gpt-5.1` 支持；`gpt-5.6` 家族与
            `gpt-5.5` 不支持该参数。


            **GPT-6 Astra** 与 **GPT-6.1 Sol** 不支持该参数。
          default: false
          example: true
        top_logprobs:
          type: integer
          description: >-
            每个位置返回的候选 token 数量，取值 0 ~ 20，需与 `logprobs: true` 同时使用。


            **注意** 支持范围同 `logprobs`。


            **GPT-6**：Astra 与 6.1 Sol 不支持输出 logprobs。Sol / Luna 与 6.1 Terra
            仅在推理档位为 `none` 时使用；其他档位请移除 `logprobs`、`top_logprobs`，并从 Responses 的
            `include` 中移除 `message.output_text.logprobs`。
          minimum: 0
          maximum: 20
          example: 2
        'n':
          type: integer
          description: |-
            生成的候选回复数量，返回 `choices` 数组中的多个结果。全部 token（含每个候选的输出）都会计费。

            GPT-6 Sol / Luna、GPT-6.1 Sol 与 GPT-6.1 Terra：此参数的支持范围尚未确认，基础请求建议省略。
          default: 1
          example: 1
        seed:
          type: integer
          description: |-
            随机种子。相同的种子与参数组合下，模型会尽量返回一致的结果（尽力而为，不保证完全可复现）。

            GPT-6 Sol / Luna、GPT-6.1 Sol 与 GPT-6.1 Terra：此参数的支持范围尚未确认，基础请求建议省略。
          example: 42
        response_format:
          type: object
          description: >-
            输出格式控制：


            - `{"type": "text"}`：默认的自由文本

            - `{"type": "json_object"}`：返回合法 JSON，**要求 `messages` 中出现 `json`
            字样**，否则返回 `400`

            - `{"type": "json_schema", "json_schema": {...}}`：按给定 JSON Schema
            输出结构化结果，配合 `"strict": true` 强制贴合 schema
          properties:
            type:
              type: string
              enum:
                - text
                - json_object
                - json_schema
              example: json_schema
            json_schema:
              type: object
              description: '`type` 为 `json_schema` 时必填，含 `name`、`schema`、`strict` 字段'
        tools:
          type: array
          description: >-
            工具列表，用于 Function Calling（客户端函数调用，无按次费用）。


            服务端工具（联网搜索、代码执行等）不在本接口提供，请改用 [Responses
            接口](/cn/api-manual/language-series/gpt/responses/responses-reference)。


            **GPT-6**：`gpt-6-sol` / `gpt-6-luna` 默认使用 `medium` 推理；只有显式设置
            `reasoning_effort: "none"` 时，才能在 Chat Completions
            中使用函数工具。`gpt-6-astra` 与 `gpt-6.1-sol` 不支持 `none`，函数调用请使用 [Responses
            接口](/cn/api-manual/language-series/gpt/responses/responses-reference)。`gpt-6.1-terra`
            支持 `none`，函数调用同样请使用 Responses 接口。GPT-6 的 `max` 档位请使用
            Responses，本接口不支持。
          items:
            $ref: '#/components/schemas/FunctionTool'
        tool_choice:
          description: >-
            工具选择控制：`"auto"`（默认）/ `"none"` / `"required"`，或用对象指定某个函数，如 `{"type":
            "function", "function": {"name": "get_weather"}}`。
          oneOf:
            - type: string
              enum:
                - none
                - auto
                - required
            - type: object
        parallel_tool_calls:
          type: boolean
          description: |-
            是否允许模型在一轮中并行调用多个工具。默认 `true`，设为 `false` 可强制逐个调用。

            GPT-6 Sol / Luna、GPT-6.1 Sol 与 GPT-6.1 Terra：此参数的支持范围尚未确认，基础请求建议省略。
          default: true
          example: true
        prompt_cache_key:
          type: string
          description: >-
            缓存分组键。GPT-6 / GPT-5.6
            自动处理缓存路由，不需要此字段来优化路由；可为不同用户或客户使用不同键，区分缓存复用与计费。同一组需复用前缀的请求应保持键一致。较早模型可使用稳定的键帮助缓存路由。
          example: app-chat-v1
        user:
          type: string
          description: 终端用户标识，用于区分调用来源。
          example: user-1024
        prompt_cache_options:
          type: object
          description: >-
            GPT-6 与 GPT-5.6 的 Prompt 缓存配置。默认使用隐式断点；`mode: "explicit"`
            只使用显式断点，没有断点时不缓存。
          properties:
            ttl:
              type: string
              enum:
                - 30m
              default: 30m
              description: 目前仅支持 `30m`（默认）：最近一次写入或复用后至少保留 30 分钟。
            mode:
              type: string
              enum:
                - implicit
                - explicit
              default: implicit
              description: '`implicit` 自动放置断点；`explicit` 仅使用内容块上的 `prompt_cache_breakpoint`。'
          example:
            ttl: 30m
            mode: implicit
    ChatCompletionResponse:
      type: object
      properties:
        id:
          type: string
          description: 本次对话的唯一标识
          example: chatcmpl-CvJ2p8mQxK7nR4wS
        object:
          type: string
          enum:
            - chat.completion
          description: 响应类型
          example: chat.completion
        created:
          type: integer
          description: 创建时间戳
          example: 1786705221
        model:
          type: string
          description: 实际使用的模型名称
          example: gpt-6.1-sol
        choices:
          type: array
          description: 生成结果列表（长度等于请求中的 `n`）
          items:
            $ref: '#/components/schemas/Choice'
        usage:
          $ref: '#/components/schemas/Usage'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
              description: HTTP 状态错误码
            message:
              type: string
              description: 错误描述
            type:
              type: string
              description: 错误类型
            param:
              type: string
              description: 相关参数名
            fallback_suggestion:
              type: string
              description: 出错时的处理建议
    Message:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          description: 消息角色
          enum:
            - system
            - developer
            - user
            - assistant
            - tool
          example: user
        content:
          description: 消息内容：字符串，或内容块数组（`text` / `image_url` 混合）。
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/ContentBlock'
          example: 用一句话解释什么是量子纠缠。
    FunctionTool:
      type: object
      required:
        - type
        - function
      properties:
        type:
          type: string
          enum:
            - function
          example: function
        function:
          type: object
          description: 函数定义
          properties:
            name:
              type: string
              example: get_weather
            description:
              type: string
              example: 查询指定城市的天气
            parameters:
              type: object
              description: JSON Schema 形式的参数定义
    Choice:
      type: object
      properties:
        index:
          type: integer
          description: 结果序号
          example: 0
        message:
          $ref: '#/components/schemas/AssistantMessage'
        logprobs:
          type: object
          description: 对数概率信息，仅在请求中开启 `logprobs` 时返回
        finish_reason:
          type: string
          description: 结束原因：`stop` 正常结束，`length` 达到最大 token 限制，`tool_calls` 需要调用工具
          enum:
            - stop
            - length
            - tool_calls
          example: stop
    Usage:
      type: object
      description: >-
        Token 用量统计。Prompt 缓存自动生效，命中缓存的输入 token 按更低的缓存价计费。


        GPT-6 按普通输入、缓存读取、缓存写入与输出分别计费。输入超过 272,000 tokens 时，整个请求的输入与两种缓存价格为常规价格的
        2 倍，输出为 1.5 倍。内置生图另计费。当前价格见 [模型价格](https://evolink.ai/pricing)。
      properties:
        prompt_tokens:
          type: integer
          description: 输入 token 数
          example: 18
        completion_tokens:
          type: integer
          description: 输出 token 数（含推理 token）
          example: 42
        total_tokens:
          type: integer
          description: 总 token 数
          example: 60
        prompt_tokens_details:
          type: object
          description: 输入 token 明细
          properties:
            cached_tokens:
              type: integer
              description: 命中缓存的 token 数
              example: 0
            cache_write_tokens:
              type: integer
              description: 写入缓存的输入 token 数，按缓存写入价计费，不要与普通输入重复计费。
              example: 0
        completion_tokens_details:
          type: object
          description: 输出 token 明细
          properties:
            reasoning_tokens:
              type: integer
              description: 推理 token 数
              example: 16
    ContentBlock:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: |-
            内容类型

            - `text`：文本块
            - `image_url`：图片输入
            - `file`：文件输入（PDF）
          enum:
            - text
            - image_url
            - file
          example: image_url
        text:
          type: string
          description: 当 `type=text` 时的文本内容
          example: 这张图里有什么？
        image_url:
          type: object
          description: '图片输入（当 `type=image_url` 时）。也可直接写成图片 URL 字符串，等价于 `{ "url": "..." }`。'
          required:
            - url
          properties:
            url:
              type: string
              description: 图片的公网 URL，需能被正常下载，否则返回 `400`
              example: https://example.com/photo.png
            detail:
              type: string
              description: >-
                图片解析精度


                - `low`：低精度，消耗 token 更少

                - `high`：高精度，识别更细

                - `original`：按原图尺寸解析

                - `auto`（默认）：由模型自动决定


                GPT-6 Sol / Luna、GPT-6.1 Sol 与 GPT-6.1 Terra：基础请求建议使用
                `auto`；其他精度档位的具体支持与图像 token 计算规则尚未逐项确认。
              enum:
                - auto
                - low
                - high
                - original
              default: auto
              example: auto
        file:
          type: object
          description: 文件输入（当 `type=file` 时）。支持 PDF，文件内容按输入 token 计费，实际用量以响应中的 `usage` 为准。
          required:
            - file_data
            - filename
          properties:
            file_data:
              type: string
              description: Base64 编码的文件，写成 `data:application/pdf;base64,...`
              example: data:application/pdf;base64,JVBERi0xLjQK...
            filename:
              type: string
              description: 文件名，例如 `report.pdf`
              example: report.pdf
        prompt_cache_breakpoint:
          type: object
          description: GPT-6 / GPT-5.6 显式缓存断点，放在内容块上；每次请求最多写入 4 个断点（隐式断点占 1 个）。
          required:
            - mode
          properties:
            mode:
              type: string
              enum:
                - explicit
      description: 多模态内容块，通过 `type` 声明类型，仅填写与该类型匹配的字段。
    AssistantMessage:
      type: object
      properties:
        role:
          type: string
          enum:
            - assistant
          example: assistant
        content:
          type: string
          description: 模型生成的文本内容；触发工具调用时可能为 `null`
          example: 量子纠缠是指两个粒子的状态相互关联，测量其中一个会瞬间确定另一个的状态。
        tool_calls:
          type: array
          description: 模型请求调用的工具列表
          items:
            type: object
  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
        ```

````

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