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

# GPT Image 2.6 官方版

> Flare 与 Sunburst，支持六档画质、规划强度、掩码和标注编辑，按实际 token 结算

Flare 与 Sunburst，支持六档画质、规划强度、掩码和标注编辑，按实际 token 结算.

可用模型：`gpt-image-2.6-flare` / `gpt-image-2.6-sunburst`.

## 快速开始

```bash theme={"system"}
curl -X POST https://api.qingbo.ai/v1/tasks \
  -H "Authorization: Bearer $WAVE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: image26-demo-001" \
  -d '{
  "model": "gpt-image-2.6-flare",
  "action": "generate",
  "prompt": "A sculptural glass vase on ivory stone, soft side light, refined editorial photography",
  "resolution": "1k",
  "aspect_ratio": "4:5",
  "quality": "medium",
  "complexity": "high",
  "n": 1
}'
```

提交后读取 `task_id`，用 `GET /v1/tasks/{task_id}` 查询；成功后从 `result.images[].url[]` 下载文件。等待超时后继续查原任务，不要重复提交。

## 参数

| 参数 | 取值与规则 |
| - | - |
| `action` | generate 文生图；edit 编辑，必须提供 image\_urls。 |
| `prompt` | 必填，图片描述或编辑指令。 |
| `image_urls` | 编辑时提供 1–16 张可公网读取的参考图。 |
| `resolution` | 1k / 2k / 4k，默认 1k。 |
| `aspect_ratio` | 1:1 / 3:2 / 2:3 / 4:3 / 3:4 / 5:4 / 4:5 / 16:9 / 9:16 / 2:1 / 1:2 / 21:9 / 9:21 / 3:1 / 1:3. Default: 1:1. |
| `quality` | low / medium / high / xhigh / max / auto；默认 low。 |
| `complexity` | low / medium / high，默认 high；控制规划强度，独立于画质，不单独收费。 |
| `n` | 1–4，默认 1，预扣按张数增加。 |
| `output_format` | png / jpeg / webp / gif. Default: png. |
| `mask_url` | 与参考图同尺寸的透明 PNG 蒙版，透明区表示重绘区域；必须同时传 image\_urls。 |
| `markup_url` | 透明 PNG 标注层，须与首张参考图同尺寸；仅 edit，可与参考图一起使用，不能与 mask\_url 同时传。 |
| `background` | auto / opaque / transparent；透明背景只支持 PNG / WebP。 |
| `moderation` | auto / low，默认 low。 |
| `output_compression` | 整数 0–100，仅 JPEG / WebP。 |
| `safety_identifier` | 可选终端用户稳定标识，最多 128 字符，建议使用哈希。 |

## 参考图编辑

```json theme={"system"}
{
  "model": "gpt-image-2.6-sunburst",
  "action": "edit",
  "prompt": "Preserve the subject and composition. Change the lighting to warm late-afternoon sunlight.",
  "image_urls": [
    "https://cdn.example.com/source.png"
  ],
  "resolution": "1k",
  "quality": "low",
  "complexity": "low",
  "n": 1
}
```

## GIF 动画

两条官方线路均支持 `output_format: "gif"`，可从文字或参考图生成动图。默认 512×512、9 帧、每帧 200ms；`n` 表示动画段数，不是帧数。

| 参数 | GIF 规则 |
| - | - |
| `size` | 单帧尺寸：auto / 512x512 / 768x768；auto 等同 512x512。 |
| `frame_count` | 整数 2–16，默认 9；768x768 最多 12 帧。 |
| `frame_duration_ms` | 默认 200，最小 20，必须为 10 的倍数；不影响价格。 |
| `quality` | low / medium / high，默认 low。 |
| `resolution` / `aspect_ratio` | 保持默认 1k / 1:1；实际单帧像素由 size 决定。 |
| `n` | 1–4 段动画，每段按一张完整拼图预扣。 |

```json theme={"system"}
{
  "model": "gpt-image-2.6-flare",
  "action": "generate",
  "prompt": "An ivory paper lantern sways in a soft night breeze, warm amber light, deep navy background, seamless loop",
  "output_format": "gif",
  "size": "512x512",
  "frame_count": 9,
  "frame_duration_ms": 200,
  "quality": "low",
  "n": 1
}
```

通过相同任务查询接口取得 `result.images[].url[]` 中的 GIF 下载地址。GIF 按整张动画拼图的输出 token 预扣，加上每段动画的提示词和参考图输入预留；成功后使用实际分类 token 结算并退差，不按帧数乘静态图片价格。

例如 512x512、9 帧、low 的输出预留为 1172 token，即 $0.031644，再加提示词预留。一次实测回执为 68 文本输入 + 1172 图片输出 token，最终 $0.03195；这是样例账单，提交前仍以实时报价为准。

### 参考图生成 GIF

Flare、Sunburst 官方版均支持最多 16 张参考图。使用 `action: "edit"` 时至少提供 1 张 `image_urls`；`n=2` 表示生成两段完整动图。每段动画都预留参考图输入费用，最终只按回传的实际总用量结算，不将参考图费用按帧数重复相乘。

GIF 的 `size` 是单帧尺寸，不跟随参考图宽高比。

```json theme={"system"}
{
  "model": "gpt-image-2.6-flare",
  "action": "edit",
  "prompt": "Keep the amber perfume bottle and fern. A warm ray of light glides gently through the glass, creating delicate caustics; the fern sways slightly. Refined product photography, stable camera, complete bottle visible on a square canvas, seamless loop, no text.",
  "image_urls": [
    "https://s3.qingbo.ai/qingbo-public/waveapi/site/assets/2026/11/428b6c75-654f-4cdc-8310-ba9ac545f2de.png"
  ],
  "output_format": "gif",
  "size": "512x512",
  "frame_count": 9,
  "frame_duration_ms": 200,
  "quality": "medium",
  "n": 1
}
```

经济版暂不支持参考图 GIF。

### Flare：参考图生成 16 帧动图

![Flare reference GIF](https://s3.qingbo.ai/qingbo-public/waveapi/site/assets/2026/11/830db81e-5007-4508-a868-3254d06c2c17.gif)

### Sunburst：参考图生成 9 帧动图

![Sunburst reference GIF](https://s3.qingbo.ai/qingbo-public/waveapi/site/assets/2026/11/eaa118f2-d355-4907-8f58-ede024fc27c4.gif)

均为对应模型真实生成的循环 GIF，已验证帧数、时长与下载文件。

## 计费

按实际分类 token 用量收费，单位为 USD / 百万 token：

| 文本输入 | 缓存文本 | 图片输入 | 缓存图片 | 图片输出 |
| - | - | - | - | - |
| 4.5 | 1.125 | 7.2 | 1.8 | 27 |

报价包含提示词、参考图和输出预留；`quality: "auto"` 按 max 档预扣，成功后按实际用量退差，不超过预扣。2.6 的 low / medium 用量与 2.5 不同，请重新报价。审核拒绝仍可能收取已处理的输入费，不收未生成的输出费；费用或用量未确认时 `billing_status` 保持 pending，应等待最终结算。

## 能力边界

SVG 和静态图片的精确像素尺寸暂不开放。GIF 仅开放下表所列的方形帧尺寸与画质，支持参考图生成动图；不支持蒙版、标注层、压缩和透明背景。


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