> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apiyi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GPT Image 2.6 新能力

> GPT Image 2.6 Flare / Sunburst 模型选型、complexity 复杂度控制、SVG 矢量输出、GIF 动画与标记引导编辑，附在线 Playground 和真实结果。

> [!NOTE]
>
> 右侧 Playground 提供 **普通 PNG + complexity、SVG、2 帧 GIF** 三组示例。请在 **Authorization** 中填入 `Bearer sk-xxx`，选择示例后修改提示词并发送。

> [!WARNING]
>
> 返回的 `data[0].b64_json` 不含 `data:` 前缀，SVG 和 GIF 也都是 base64。浏览器 Playground 可能无法展示较长的 base64 响应；此时请求可能已经成功，请改用下方 Python 代码在本地解码保存。

## 模型选型

GPT Image 2.6 于 2026-11-04 发布，沿用 `/v1/images/generations` 和 `/v1/images/edits`，增加复杂度控制、SVG、GIF 与标记引导编辑。

| 模型 | 定位 | 适用场景 |
| - | - | - |
| `gpt-image-2.6-flare` | 快速迭代 | 草稿、批量出图、社交内容、需要快速比较多个提示词的场景 |
| `gpt-image-2.6-sunburst` | 精细视觉工作 | 复杂布局、精细文字、成品物料、需要精确编辑的场景 |

两款的 token 单价可在 [模型价格总表](https://docs.apiyi.com/models/index.md) 中查询。实际费用取决于尺寸、画质、输出格式和 token 用量；SVG 还会产生编写模型费用，不能按普通 PNG 的单张成本估算。

## 新能力一览

> [card] [complexity 规划控制](#complexity-控制规划量)
>
> 控制模型渲染前的规划量，与 quality 画质设置相互独立。

> [card] [SVG 矢量输出](#svg-生成可编辑矢量文件)
>
> 返回可编辑的路径、形状和颜色，适合图标、插画和 UI 素材。

> [card] [GIF 循环动画](#gif-生成循环动画)
>
> 一次请求生成完整 GIF，可控制帧数和每帧时长。

> [card] [标记引导编辑](#标记引导编辑)
>
> 用透明标记图层圈出编辑区域，再通过 prompt 描述修改内容。

## complexity：控制规划量

`complexity` 控制模型在渲染前投入多少规划。它适合密集文字、复杂布局、多个对象关系等任务；`quality` 则控制最终渲染画质，两者不要混用。

| 官方档位 | 建议用途 |
| - | - |
| `low` | 聚焦修改、简单构图、快速草稿 |
| `medium` | 常规布局与多个约束的均衡选择 |
| `high` | 密集文字、复杂布局、对象关系较多的场景；省略 `complexity` 时默认使用 |

`complexity` 不单独收费，但较高档位可能增加耗时，也可能引入不希望的改动。先用同一提示词比较结果，再决定生产档位，不要默认越高越好。

> [!NOTE]
>
> **API易 已通过原生透传支持该参数**：`low` / `medium` / `high` 三档可正常透传（省略时按官方默认 `high`），无需额外字段或分组配置。

> [accordion] 上游实测补充：还会返回哪些档位？
>
> 本次上游错误信息还列出 `none`、`xhigh`、`max`，这些值在当前链路可被接受。OpenAI 公开指南稳定承诺的是 `low / medium / high`，因此生产请求建议只使用官方三档，不把额外档位作为长期兼容保证。

## SVG：生成可编辑矢量文件

设置 `output_format: "svg"`。当前上游还要求提供嵌套的 `svg.model`，用于指定编写矢量代码的文本模型：

```json theme={null}
{
  "model": "gpt-image-2.6-sunburst",
  "prompt": "A minimal flat vector icon of a rocket, exactly three solid colors, geometric editable shapes, no text, no raster texture, transparent background.",
  "output_format": "svg",
  "svg": {
    "model": "gpt-5.6-terra"
  },
  "quality": "low",
  "size": "1024x1024",
  "n": 1
}
```

![红色尾翼、蓝色舷窗和白色机身的矢量火箭图标](https://mintcdn.com/apiyillc/I9X_C01jz8OkWw6c/images/gpt-image-2-6/rocket.svg?fit=max\&auto=format\&n=I9X_C01jz8OkWw6c\&q=85\&s=c2dc54229ae6495d2926adcc44513fa4)

APIYI 透传链路生成的真实 SVG：由 path 和 circle 组成，可继续在矢量编辑器中修改

### 文本模型选择与计费

`svg.model` 由请求方指定，不是平台随机选择。可选范围取决于上游和当前分组，不代表所有 OpenAI 文本模型都自动支持；本页已实测 `gpt-5.6-terra`、`gpt-6-luna` 和 `gpt-4.1-mini`，其他模型需在实际分组中验证。编写模型按所选文本模型的输入、输出 token 单价计费：

* 编写模型费用 = `svg_usage.input_tokens` × 输入单价 + `svg_usage.output_tokens` × 输出单价。
* SVG 总费用 = 参考图像费用 + 编写模型费用。图像模型先生成参考图，文本模型再编写 SVG。
* 成功响应会同时返回 `usage` 和 `svg_usage`：前者是参考图像用量，后者是编写模型用量，两部分都要计入成本。
* `svg_usage.reasoning_tokens` 已包含在 `svg_usage.output_tokens` 中，不要重复相加。

2026-11-05 APIYI 透传链路实测，使用 `gpt-image-2.6-sunburst` 和 `gpt-5.6-terra`，返回了以下用量字段：

```json theme={null}
{
  "output_format": "svg",
  "usage": {
    "input_tokens": 100,
    "output_tokens": 824,
    "total_tokens": 924
  },
  "svg_usage": {
    "model": "gpt-5.6-terra",
    "input_tokens": 1572,
    "output_tokens": 850,
    "reasoning_tokens": 350,
    "total_tokens": 2422
  }
}
```

按模型总表当前列出的 `gpt-5.6-terra` 单价（输入每百万 tokens \$2、输出每百万 tokens \$12）估算，本次文本编写部分为 `1572 ÷ 1000000 × 2 + 850 ÷ 1000000 × 12 = \$0.013344`，参考图像费用另计。

同一提示词下的三款编写模型实测对比如下，均返回无脚本、嵌入位图或外链的真实 SVG：

| `svg.model` | 结果 | 输入 / 输出 tokens | reasoning tokens | 耗时 | 文本费用估算 |
| - | - | -: | -: | -: | -: |
| `gpt-5.6-terra` | PASS | 1,572 / 850 | 350 | 29.196s | \$0.013344 |
| `gpt-6-luna` | PASS | 1,572 / 1,618 | 1,110 | 53.436s | \$0.0009662 |
| `gpt-4.1-mini` | PASS | 2,005 / 513 | 0 | 23.777s | \$0.0016228 |

三次请求的参考图像用量均为输入 100、输出 824、总计 924 tokens，参考图像费用另计。`gpt-4.1-mini` 的响应模型名回显为 `gpt-4.1-mini-2025-04-14`。价格可能调整，不同分组也可能有阶梯价格；实际以 [模型价格总表](https://docs.apiyi.com/models/index.md) 和账单为准。单张结果不用于画质排名。

### 使用限制

* 仅限 `/v1/images/generations`，`n=1`；编辑接口不支持 SVG 输出，也不能把 SVG 作为编辑输入位图。
* 不支持 streaming、partial images、`output_compression` 或 `prompt_rewriter`。
* 返回静态矢量 XML，不包含脚本、外部资源或嵌入位图。解码后保存为 `.svg`，不要按 PNG 渲染。

## GIF：生成循环动画

设置 `output_format: "gif"`，并在提示词中描述主体、运动和循环方式。`/v1/images/generations` 和 `/v1/images/edits` 都支持 GIF；编辑时把参考图放进 `images`，第一张图会作为动画主体。下面的低成本示例预期得到 **2 帧、每帧 100ms、总时长 0.2 秒**：

```json theme={null}
{
  "model": "gpt-image-2.6-sunburst",
  "prompt": "A minimal two-frame looping animation of a yellow circle moving slightly right and returning to its starting position on a plain white background, no text, seamless loop.",
  "output_format": "gif",
  "quality": "low",
  "size": "512x512",
  "frame_count": 2,
  "frame_duration_ms": 100,
  "n": 1
}
```

![黄色圆形向右移动并回到起点的两帧循环动画](https://mintcdn.com/apiyillc/I9X_C01jz8OkWw6c/images/gpt-image-2-6/two-frame-loop.gif?s=d010bf9dbb9b5c3a3e9b915bb2164a3d)

APIYI 透传链路生成的真实 GIF：2 帧、0.2 秒，圆形位置发生变化

| 参数 | 官方范围与默认值 | 说明 |
| - | - | - |
| `frame_count` | **2–16**，默认 9 | 超出范围时本链路不报错，会回退默认值（见下）；帧数越多，耗时和费用通常越高 |
| `frame_duration_ms` | **20–2000ms**，默认 200ms，按 10ms 取整 | 总时长 = 帧数 × 每帧时长 |
| `size` | `auto`，或宽高均为 **16 的倍数** 的 `WIDTHxHEIGHT` | 表示**每一帧**的尺寸，不是成片尺寸 |

### 尺寸边界：所有帧共享一张拼图

2.6 会先把每一帧画进同一张拼图（sprite sheet），再切成 GIF，所以限制落在拼图上，而不是单帧上：

| 约束 | 边界值 |
| - | - |
| 拼图单边 | ≤ **3840** |
| 拼图总像素 | ≤ **8,294,400**（= 3840×2160），且 ≥ **约 655,360**（589,824 被拒、665,856 通过） |
| 拼图长短边比 | ≤ **3:1** |
| 帧尺寸 | 宽、高都是 **16** 的倍数 |

拼图布局是固定的：2–8 帧用 `4×2`，9 帧用 `3×3`，10–12 帧用 `4×3`，13–16 帧用 `4×4`。换算成方形单帧的上限：

| 帧数 | 布局 | 方形单帧上限 | 说明 |
| - | -: | -: | - |
| 2–8 | 4×2 | **960×960** | 受单边 3840 限制（4×960） |
| 9 | 3×3 | **960×960** | 9×960² 正好用满预算 |
| 10–12 | 4×3 | **816×816** | 832² 即超出预算 |
| 13–16 | 4×4 | **720×720** | 16×720² 正好用满预算 |

常用结论：

* **512×512：2–16 帧全部可用**，最稳的取值
* **768×768：最多 12 帧**；16 帧时拼图 3072×3072 = 9,437,184，超出预算
* **960×960：最多 9 帧**
* **1024×1024、2048×2048：任何帧数都不可用**。1024² 在 2–8 帧下拼图宽 4096，超过单边 3840；2048² 仅 2 帧就需要 8192×4096
* `frame_count` 传 1 或 17 不会返回 400：本链路会丢掉 `frame_count` 和 `frame_duration_ms`，回退默认 **9 帧 / 1.8 秒**。要确认实际帧数请用下面的 ffprobe
* `n > 1` 时本链路按单张分别校验、不累加：实测 2 张 × 16 帧 × 512²（合计 8,388,608）仍然成功。官方指南写的是多张也要落在同一预算内，以实际返回为准
* 要更宽的画面换比例：9 帧、每帧 1280×720 时拼图正好是 3840×2160

超出边界时返回 400，`param` 为 `size`，常见两种报错：

```text theme={null}
GIF frames exceed the total request pixel budget. Reduce the frame size or frame_count.
```

```text theme={null}
No supported sheet fits 8 GIF frames at size '1024x1024'. Invalid size '4096x2048'. The longest edge must be less than or equal to 3840.
```

GIF 不支持 streaming、partial images、自定义 `output_compression` 或 `prompt_rewriter`。`frame_count` 和 `frame_duration_ms` 只用于 GIF，不要传给 PNG、JPEG、WebP 或 SVG。

### 用编辑接口做 GIF

`/v1/images/edits` 同样接受 `output_format: "gif"`，第一张输入图作为动画主体，其余字段与生成接口一致：

```json theme={null}
{
  "model": "gpt-image-2.6-sunburst",
  "images": [{ "image_url": "https://example.com/cat.png" }],
  "prompt": "让这只猫跳一小段舞，纯色背景，固定镜头，最后一个动作回到起始姿势",
  "output_format": "gif",
  "size": "512x512",
  "frame_count": 16,
  "frame_duration_ms": 100
}
```

> [!NOTE]
>
> 拼图预算为 2026-11-09 在官转链路的实测口径：8,294,400 顶格通过，12 帧 832²（只超 12,288 像素）被拒。模型侧可能调整，以实际返回的 400 报错为准。

### 验证真实帧数

不要只看 HTTP 200 或响应中的 `output_format`。字段被路由丢弃时，仍可能返回默认 9 帧、1.8 秒的 GIF。可用 `ffprobe` 检查实际文件：

```bash theme={null}
ffprobe -v error -select_streams v:0 -count_frames \
  -show_entries stream=codec_name,width,height,nb_read_frames,duration \
  -of json result.gif
```

本例应返回 `nb_read_frames=2`、`duration=0.200000`。

## 标记引导编辑

GPT Image 2.6 还支持通过 `/v1/images/edits` 的 `markup` 字段进行标记引导编辑：

1. 第一张输入图保持为原图。
2. 另做一张与原图同尺寸的透明 PNG，用圆圈、箭头或草图标出修改区域。
3. 将该透明图层作为 `markup` 上传，并在 `prompt` 中说明修改内容和需要保留的细节。
4. `markup` 作用于第一张输入图，不能与 `mask` 或 `prompt_rewriter` 同时使用。

普通单图编辑、多图融合和 mask 用法见 [图片编辑 API](https://docs.apiyi.com/api-capabilities/gpt-image-2/image-edit.md)。不同路由对 `markup` 的透传情况需单独验证，本页不将其作为已实测的在线演示。

## 客户端解码

三种输出都读取 `data[0].b64_json`，只是保存扩展名不同：

```python theme={null}
import base64
from pathlib import Path

payload = response.json()
fmt = payload["output_format"]
raw = base64.b64decode(payload["data"][0]["b64_json"])
Path(f"result.{fmt}").write_bytes(raw)
```

SVG 解码后是 UTF-8 XML；GIF 和 PNG/JPEG/WebP 解码后是二进制文件。生产代码还应检查 HTTP 状态、`error` 字段和实际文件签名，不要只根据扩展名判断成功。

## 路由兼容性与排障

> [!WARNING]
>
> 2.6 新字段要求链路按原生 JSON 透传。不同上游路由的兼容进度可能不同，公开示例不代表每个分组都已具备相同行为。接入时请在实际使用的分组中验证。

| 现象 | 优先检查 |
| - | - |
| 已传 `svg.model`，仍返回 `SVG generation requires 'svg.model'` | 嵌套 `svg` 对象是否被路由过滤或改写 |
| 请求 2 帧、100ms，实际却是 9 帧、1.8 秒 | `frame_count` 和 `frame_duration_ms` 是否被丢弃并回退默认值 |
| 报 `GIF frames exceed the total request pixel budget` | `frame_count × 单帧像素 × n` 是否超过 8,294,400，或拼图单边是否超过 3840 |
| complexity 非法字符串仍返回 200 | 不同上游的校验策略可能不同，不能仅凭这一点判定未透传；结合合法档位的耗时、结果和上游日志排查 |
| Playground 显示 `unable to complete request` | 先检查是否实际返回 200；长 base64 可能超出浏览器展示能力，改用本地代码解码 |
| 担心 SVG 账单偏高 | 同时核对 `usage` 与 `svg_usage`，不要只统计参考图像 tokens |

## 相关文档

* [GPT-Image-2.5 / 2 概览](https://docs.apiyi.com/api-capabilities/gpt-image-2/overview.md)
* [普通文生图 Playground](https://docs.apiyi.com/api-capabilities/gpt-image-2/text-to-image.md)
* [图片编辑 Playground](https://docs.apiyi.com/api-capabilities/gpt-image-2/image-edit.md)
* [官转 vs 官逆对比（2.6）](https://docs.apiyi.com/api-capabilities/gpt-image-2/vs-gpt-image-2-6-all.md) - 与 `gpt-image-2.6-all` 的选型对照
* [图片 API 调用须知与最佳实践](https://docs.apiyi.com/api-capabilities/image-api-best-practices.md)
* [模型价格总表](https://docs.apiyi.com/models/index.md)


## OpenAPI

````yaml api-reference/gpt-image-2-6-generate-openapi.yaml POST /v1/images/generations
openapi: 3.1.0
info:
  title: GPT Image 2.6 文生图与新能力 API
  description: >
    OpenAI `gpt-image-2.6-flare` / `gpt-image-2.6-sunburst`
    文生图接口，支持普通位图、复杂度控制、SVG 矢量输出与 GIF 动画输出。


    - complexity：官方档位 low / medium / high，默认 high，不单独收费

    - SVG：output_format=svg，并传 svg.model；仅 generations，n=1

    - GIF：output_format=gif，帧数 2–16（默认 9），帧时长 20–2000ms；生成与编辑接口都支持

    - 返回 data[0].b64_json，客户端需自行 base64 解码


    **认证方式**：在请求头中添加 `Authorization: Bearer YOUR_API_KEY`


    **获取 API Key**：访问 [API易控制台](https://api.apiyi.com/token) 创建令牌
  version: 1.0.0
servers:
  - url: https://api.apiyi.com
    description: 主要端点
security:
  - bearerAuth: []
paths:
  /v1/images/generations:
    post:
      tags:
        - GPT Image 2.6
      summary: GPT Image 2.6：生成 PNG、SVG 或 GIF
      description: >
        使用 GPT Image 2.6 根据文本提示词生成图片。三组请求示例分别演示 complexity、SVG 和 GIF。


        complexity 控制渲染前的规划量，与 quality 的画质控制相互独立。SVG 需要嵌套的 svg.model；GIF
        的帧数和帧时长只在 output_format=gif 时使用。GIF 的所有帧共享一张拼图：单边 ≤3840、总像素
        ≤8,294,400（≥655,360），帧数 2–16，方形单帧上限随帧数为 960 / 816 / 720。SVG 与 GIF 均不支持
        streaming、partial images 或 output_compression。
      operationId: generateGptImage26
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Image26Request'
            examples:
              complexityPng:
                summary: 普通 PNG + low complexity
                description: 用四象限信息图观察 complexity；quality=low 控制成本
                value:
                  model: gpt-image-2.6-sunburst
                  prompt: >-
                    A clean 2x2 technical infographic on a white background.
                    Top-left: a red circle labeled 'A'. Top-right: a blue square
                    labeled 'B'. Bottom-left: a green triangle labeled 'C'.
                    Bottom-right: a yellow hexagon labeled 'D'. A black arrow
                    connects A to B to C to D in that order. Exactly four
                    labels, balanced grid, no other text.
                  output_format: png
                  complexity: low
                  quality: low
                  size: 1024x1024
                  'n': 1
              svgVector:
                summary: SVG 矢量图标
                description: 必须保留嵌套 svg.model；响应另有 svg_usage
                value:
                  model: gpt-image-2.6-sunburst
                  prompt: >-
                    A minimal flat vector icon of a rocket, exactly three solid
                    colors, geometric editable shapes, no text, no raster
                    texture, transparent background.
                  output_format: svg
                  svg:
                    model: gpt-5.6-terra
                  quality: low
                  size: 1024x1024
                  'n': 1
              gifAnimation:
                summary: 2 帧 GIF 循环动画
                description: 预期真实文件为 2 帧、0.2 秒；不要用默认 9 帧判断参数透传
                value:
                  model: gpt-image-2.6-sunburst
                  prompt: >-
                    A minimal two-frame looping animation of a yellow circle
                    moving slightly right and returning to its starting position
                    on a plain white background, no text, seamless loop.
                  output_format: gif
                  quality: low
                  size: 512x512
                  frame_count: 2
                  frame_duration_ms: 100
                  'n': 1
      responses:
        '200':
          description: 生成成功，结果为 base64 编码的 PNG、JPEG、WebP、SVG 或 GIF
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Image26Response'
        '400':
          description: >-
            参数非法、GIF 帧数或尺寸超出总像素预算（单边 >3840 或总像素 >8,294,400），或实际路由未透传 svg.model
            等新字段
        '401':
          description: 未授权 - API Key 无效
        '403':
          description: 内容审核拦截
        '429':
          description: 请求频率超限或额度不足
        '500':
          description: 服务器内部错误
      security:
        - bearerAuth: []
components:
  schemas:
    Image26Request:
      type: object
      required:
        - model
        - prompt
      properties:
        model:
          type: string
          description: Flare 适合快速迭代，Sunburst 适合精细视觉工作
          enum:
            - gpt-image-2.6-flare
            - gpt-image-2.6-sunburst
          default: gpt-image-2.6-sunburst
        prompt:
          type: string
          maxLength: 32000
          description: 提示词，支持中英文。GIF 应在提示词中描述主体、运动和循环方式
          example: A minimal flat vector icon of a rocket, three solid colors, no text
        complexity:
          type: string
          description: 渲染前的规划复杂度，与 quality 独立。官方文档档位为 low / medium / high，省略时默认 high；不单独收费
          enum:
            - low
            - medium
            - high
          default: high
        size:
          type: string
          description: >-
            输出尺寸，预设值或满足模型约束的 WIDTHxHEIGHT。GIF 时表示每帧尺寸，宽高须为 16 的倍数；n ×
            frame_count × 单帧像素须落在总像素预算内（拼图单边 ≤3840、总量 ≤8,294,400、≥655,360）
          example: 1024x1024
          default: auto
        quality:
          type: string
          description: 渲染画质，与 complexity 独立。SVG 中控制参考图像质量
          enum:
            - auto
            - low
            - medium
            - high
            - xhigh
            - max
          default: auto
        output_format:
          type: string
          description: >-
            输出格式。SVG 与 GIF 只支持 generations，不支持编辑、streaming、partial images 或
            output_compression
          enum:
            - png
            - jpeg
            - webp
            - svg
            - gif
          default: png
        output_compression:
          type: integer
          description: 输出压缩率，仅 jpeg / webp 生效；不要用于 SVG 或 GIF
          minimum: 0
          maximum: 100
          example: 85
        background:
          type: string
          description: 背景模式。transparent 需与输出格式兼容；JPEG 不支持透明
          enum:
            - auto
            - opaque
            - transparent
          default: auto
        moderation:
          type: string
          description: 审核强度
          enum:
            - auto
            - low
          default: auto
        'n':
          type: integer
          description: 生成数量。本页示例及 SVG 输出固定为 1
          enum:
            - 1
          default: 1
        svg:
          type: object
          description: SVG 专用配置。当前上游要求 output_format=svg 时提供 svg.model
          properties:
            model:
              type: string
              description: >-
                生成 SVG 矢量代码的文本模型。已实测
                gpt-5.6-terra、gpt-6-luna、gpt-4.1-mini，其他模型需在实际分组中验证；示例使用
                gpt-5.6-terra
              example: gpt-5.6-terra
              default: gpt-5.6-terra
          required:
            - model
        frame_count:
          type: integer
          description: >-
            GIF 帧数。官方范围 2–16，默认 9；仅 output_format=gif 时使用。超出范围时网关会回退默认 9
            帧。拼图布局：2–8 帧 4×2、9 帧 3×3、10–12 帧 4×3、13–16 帧 4×4；方形单帧上限 960 / 816 /
            720
          minimum: 2
          maximum: 16
          default: 9
          example: 2
        frame_duration_ms:
          type: integer
          description: GIF 每帧时长，20–2000ms，默认 200ms，按 10ms 取整；仅 output_format=gif 时使用
          minimum: 20
          maximum: 2000
          default: 200
          example: 100
    Image26Response:
      type: object
      properties:
        created:
          type: integer
          description: Unix 时间戳
        background:
          type: string
          description: 实际背景模式
          example: opaque
        data:
          type: array
          description: 生成结果数组
          items:
            type: object
            properties:
              b64_json:
                type: string
                description: >-
                  纯 base64，不含 data: 前缀。按 output_format 保存为对应扩展名；SVG 解码为 UTF-8
                  XML
              generation_id:
                type: string
                description: 本次生成 ID，部分响应提供
        output_format:
          type: string
          example: gif
        quality:
          type: string
          example: low
        size:
          type: string
          example: 512x512
        usage:
          $ref: '#/components/schemas/ImageUsage'
        svg_usage:
          $ref: '#/components/schemas/SvgUsage'
    ImageUsage:
      type: object
      description: 图像模型的 token 用量
      properties:
        input_tokens:
          type: integer
          example: 59
        output_tokens:
          type: integer
          example: 555
        total_tokens:
          type: integer
          example: 614
        input_tokens_details:
          type: object
          properties:
            text_tokens:
              type: integer
              example: 59
            image_tokens:
              type: integer
              example: 0
        output_tokens_details:
          type: object
          properties:
            text_tokens:
              type: integer
              example: 0
            image_tokens:
              type: integer
              example: 555
    SvgUsage:
      type: object
      description: >-
        仅 SVG 输出时出现的编写模型用量。模型由请求的 svg.model 指定，按该文本模型的输入、输出 token
        单价计费；reasoning_tokens 已包含在 output_tokens 中，不重复相加
      properties:
        model:
          type: string
          example: gpt-5.6-terra
        input_tokens:
          type: integer
          example: 1572
        output_tokens:
          type: integer
          example: 850
        reasoning_tokens:
          type: integer
          example: 350
        total_tokens:
          type: integer
          example: 2422
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 在 API易控制台获取的 API Key

````

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