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

# Seedream 概览

> Seedream 图像系列：模型、端点与接入方式一览

## 简介

Seedream 是字节跳动的图像模型系列，可用于文本生成图片、图片编辑、交互编辑、多参考图融合与图层拆分。目前该系列文档收录 Seedream 5.5 Pro 和 Seedream 5.0 Pro，具体参数与调用示例按文生图、图生图场景分别提供。

通过 GravitexAI 网关统一同步调用：

* **Base URL**：`https://api.gravitex.ai`
* **认证**：`Authorization: Bearer sk-xxxxxxxxxx`
* **Content-Type**：文生图、图生图均使用 `application/json`

## 该系列文档支持的模型

| 模型 | 模型 ID | 能力 | 文档入口 |
| - | - | - | - |
| Seedream 5.5 Pro | `dola-seedream-5-5-261028` | 文生图、图生图、交互编辑、多图融合、原生透明图、最多 99 个图层拆分与富文本 OCR | [文生图](https://docs.gravitex.ai/cn/api-reference/endpoint/seedream-5.5/generations.md) · [图生图](https://docs.gravitex.ai/cn/api-reference/endpoint/seedream-5.5/edits.md) |
| Seedream 5.0 Pro | `dola-seedream-5-0-pro-260628` | 文生图、图生图、交互编辑、多图融合、图生透明图与最多 16 个图层拆分 | [文生图](https://docs.gravitex.ai/cn/api-reference/endpoint/seedream-5.0/generations.md) · [图生图](https://docs.gravitex.ai/cn/api-reference/endpoint/seedream-5.0/edits.md) |

> [!NOTE]
>
> 需要文生透明图、拆分数量配置或富文本 OCR 时，可选择 Seedream 5.5 Pro。5.0 Pro 的透明图模式仅支持输入 1 张带透明通道的参考图；5.5 Pro 支持文生透明图，也支持最多 10 张无需透明通道的参考图。两版默认输出格式分别为 `jpeg`、`png`，切换模型时请按对应文档检查参数。

## 按场景查看示例

| 你想做什么 | 推荐入口 | 使用要点 |
| - | - | - |
| 通过文字生成图片 | [5.5 Pro](https://docs.gravitex.ai/cn/api-reference/endpoint/seedream-5.5/generations.md#文生图) · [5.0 Pro](https://docs.gravitex.ai/cn/api-reference/endpoint/seedream-5.0/generations.md#文生图) | 无需传入 `image` |
| 编辑图片、融合多张参考图 | [5.5 Pro](https://docs.gravitex.ai/cn/api-reference/endpoint/seedream-5.5/edits.md#单图生图) · [5.0 Pro](https://docs.gravitex.ai/cn/api-reference/endpoint/seedream-5.0/edits.md#单图生图) | 传入参考图和修改指令 |
| 直接生成透明背景图片 | [5.5 Pro 文生透明图](https://docs.gravitex.ai/cn/api-reference/endpoint/seedream-5.5/generations.md#文生透明图) | `background: "transparent"` 搭配 `output_format: "png"` |
| 将图片拆成独立图层 | [5.5 Pro](https://docs.gravitex.ai/cn/api-reference/endpoint/seedream-5.5/edits.md#自动图层拆分) · [5.0 Pro](https://docs.gravitex.ai/cn/api-reference/endpoint/seedream-5.0/edits.md#图层拆分) | 只传 1 张图片，不传 `background` |
| 拆分并识别文字和样式 | [5.5 Pro 图层拆分与 OCR](https://docs.gravitex.ai/cn/api-reference/endpoint/seedream-5.5/edits.md#图层拆分与-ocr) | 开启 `layer_decomposition_options.text_recognition` |
| 查询参数、价格或排查错误 | [5.5 Pro 参数与计费](https://docs.gravitex.ai/cn/api-reference/endpoint/seedream-5.5.md) · [5.0 Pro 参数与计费](https://docs.gravitex.ai/cn/api-reference/endpoint/seedream-5.0.md) | 按所用模型查看默认值和限制 |

## 支持的接口

| 方法 | 路径 | 推荐用途 | 请求格式 |
| - | - | - | - |
| `POST` | `/v1/images/generations` | 文生图；也支持通过 `image` 传入参考图进行编辑、多图融合或图层拆分 | JSON |
| `POST` | `/v1/images/edits` | 图生图、图片编辑、多图融合或图层拆分；请求体与 generations 相同 | JSON |

> [!NOTE]
>
> 两个端点由平台转发到上游同一个生图接口。本站文生图、图生图示例统一使用 `/v1/images/generations`：不传 `image` 为文生图，传入图片 URL 或 Base64 字符串（或数组）为图生图；普通生成最多支持 10 张参考图，图层拆分只能传 1 张图片。

## 响应与计费

接口同步返回图片列表 `data` 和 `usage` 用量统计。`response_format` 默认为 `url`，通过 `data[].url` 获取图片地址，24 小时内有效，收到后请及时下载保存；传入 `b64_json` 时，通过 `data[].b64_json` 获取 Base64 图片数据。

普通生成单次输出 1 张图片；图层拆分返回 1 张底图和多个图层，并提供图层顺序、边界框等信息。Seedream 5.5 Pro 开启 `layer_decomposition_options.text_recognition` 后，还会为规整文字图层返回富文本 OCR 结果。

计费区分参考图和成功生成的输出图，每张输出图按实际像素单独定档；图层拆分的底图和每个图层分别计费。两版模型的参考图价格、输出价格和拆分价格不同，详细字段与计费规则见对应模型文档。

> [card] [查看最新模型与价格](https://maas.gravitex.ai/#/api-models)
>
> 最新模型列表、价格与能力以控制台模型广场为准。

## 接入流程

1. 获取 API Key，设置网关地址和 Bearer 认证。
2. 选择所需模型，并按场景进入文生图或图生图文档。
3. 复制示例中的完整 JSON 请求 body；生成时提供 `model`、`prompt`，图生图同时提供 `image`。图层拆分设置 `layer_decomposition: true`，并传入 1 张图片，`prompt` 可省略。
4. 发起同步请求，读取 `data[].url` 下载图片，或将 `data[].b64_json` 解码保存；通过 `usage` 查看用量，图层拆分时按 `z_index` 和 `bounding_box` 还原图层。


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