MaaS-Seedream
| 模型 | 计费项 |
|---|---|
| MaaS_Seedream_5.5 | input_image output_image output_image_2.61-4.63mp |
| MaaS_Seedream_5.0_pro |
input_image_first input_image_additional output_image output_image_>2.61mp layer_decomposition layer_decomposition_>2.61mp |
| MaaS_Seedream_5.0_flash | image |
| MaaS_Seedream_5.0_lite | image |
| MaaS_Seedream_4.5 | image |
| MaaS_Seedream_4.0 | image |
| MaaS_SeedEdit_3.0_i2i | image |
| 能力 | Seedream 5.5 | Seedream 5.0 Pro | Seedream 5.0 Flash | Seedream 5.0 Lite | Seedream 4.5 | Seedream 4.0 |
|---|---|---|---|---|---|---|
| 文生图(单图) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| 单图生图 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| 多图生图(参考图) | 2–10 张 | 2–10 张 | 2–10 张 | 2–14 张 | 2–14 张 | 2–14 张 |
| 图层拆分 | 底图+最多 99 图层 | 底图+最多 16 图层 | 底图+最多 16 图层 | ❌ | ❌ | ❌ |
| 富文本 OCR(text_recognition) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| 交互编辑 | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ |
| 组图生成(sequential_image_generation) | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ |
| 流式输出(stream) | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ |
| 自定义输出格式(output_format) | ✅(默认 png) | ✅(默认 jpeg) | ✅(默认 jpeg) | ✅(默认 jpeg) | ❌(默认 jpeg) | ❌(默认 jpeg) |
| 透明通道(background) | ✅(默认 auto) | ✅(默认 opaque) | ✅(默认 opaque) | ❌ | ❌ | ❌ |
图层拆分模式使用说明
-
仅支持输入单张待拆分图,传入多张报错。
-
任一图层生成失败,整体请求报错,不支持部分成功。
-
若提示词要求的拆分数量超过上限,可能导致部分图层信息丢失。
-
响应结构体 data 中,将返回每个产出图层的位置和内容信息,包括图层顺序(z_index)、边界框信息(bounding_box)、名称(name)和描述(description)。
-
Seedream 5.0 Flash 与 5.0 Pro 能力一致(单图/多图生图、图层拆分、交互编辑);不支持组图、联网搜索、流式输出。
-
Seedream 5.5:支持 layer_decomposition_options 配置。max_images:本次请求最多生成的图片总数(含底图),取值 [2, 100],默认 30;text_recognition:对规整文字图层额外返回富文本 OCR 结果(data[].text_recognition),默认 false。
接口及请求参数
图片生成接口
POST {endpointPath}/seedream/image/generations
请求参数
| 属性名 | 类型 | 是否必需 | 描述 |
|---|---|---|---|
| prompt | string |
是 | 用于生成图像或指定图层拆分意图的提示词。支持中英文;Seedream 5.5 / 5.0 Pro / 5.0 Flash 额外支持俄语、阿拉伯语、菲律宾语、泰语、土耳其语、韩语、马来语、西班牙语、葡萄牙语、印尼语、法语、德语、越南语、日语。建议中文不超过 300 字、英文不超过 600 词。字数过多信息容易分散,模型可能因此忽略细节,只关注重点,造成图片缺失部分元素。 |
| image |
string/array |
否 |
输入的图片信息,支持 URL 或 Base64 编码。其中,seedream-5.0-lite/5.0-pro/5.0-flash/4.5/4.0 支持单图或多图输入 (图片总大小超过10MB的建议用url方式传递)
当开启图层拆分模式时(layer_decomposition 为 true),image 为必选参数,且仅支持输入单张图片(传入多张报错)。 单张图片传入要求 :
|
| layer_decomposition |
boolean | 否 | 控制是否开启图层拆分功能。默认false 图层拆分会将单张图片的主体、背景、文字等内容自动拆解为 1 张底图和最多 16 个可独立编辑的图层。每个图层为带透明通道的 PNG 图片。
|
| size |
string |
否 |
指定生成图像的尺寸信息,支持以下两种方式,不可混用。
在图层拆分场景(seedream-5.0-pro / seedream-5.0-flash) 仅支持通过指定分辨率档位的方式设置。输出图的分辨率规则如下:
auto 模式下,模型将根据输入图片中底图和每个图层的原始尺寸进行输出:
|
| seed | integer | 否 | 默认值-1, |
| sequential_image_generation |
string |
否 | 仅 seedream-5.0-lite/4.5/4.0 支持该参数 Seedream 5.0 Pro / 5.0 Flash 不支持 控制是否关闭组图功能,默认值disabled
|
| sequential_image_generation_options |
object | 否 | 仅 seedream-5.0-lite/4.5/4.0 支持该参数,组图功能的配置。仅当 sequential_image_generation 为 auto 时生效. Seedream 5.0 Pro / 5.0 Flash 不支持 |
| sequential_image_generation_options.max_images |
integer |
否 |
指定本次请求,最多可生成的图片数量,默认值15。
实际可生成的图片数量,除受到 max_images 影响外,还受到输入的参考图数量影响。输入的参考图数量+最终生成的图片数量≤15张。 |
| stream | boolean | 否 | 仅 seedream-5.0-lite/4.5/4.0 支持该参数 默认值false,控制是否开启流式输出模式。
|
| tools | Array | 否 | 仅 seedream-5.0-lite 支持该参数 |
| tools.type | string |
否 | 仅 seedream-5.0-lite 支持该参数
|
| guidance_scale |
float |
否 |
seedream-3.0-t2i 默认值 2.5 seededit-3.0-i2i 默认值 5.5 seedream-5.0-lite/4.5/4.0 不支持 模型输出结果与prompt的一致程度,生成图像的自由度,又称为文本权重;值越大,模型自由度越小,与用户输入的提示词相关性越强。 取值范围:[1, 10] 。 |
| response_format |
string | 否 | 指定生成图像的返回格式,默认值url。 生成的图片为 jpeg 格式,支持以下两种返回方式:
|
| watermark |
boolean | 否 | 是否在生成的图片中添加水印,默认值true。
|
| output_format | string |
否 | 仅 seedream-5.5/5.0-lite/5.0-pro/5.0-flash 支持该参数(5.5 默认 png,其余默认 jpeg)
|
| background |
string | 否 | 用于控制是否生成带透明通道的图片。默认opaque,可选值:
|
| optimize_prompt_options | object |
否 | 提示词优化功能的配置 |
| optimize_prompt_options.mode |
string |
否 | 设置提示词优化功能使用的模式,默认值standard。
|
| layer_decomposition_options | object | 否 | 图层拆分功能的配置,仅 layer_decomposition 为 true 时生效,仅 Seedream 5.5 支持。 |
| layer_decomposition_options.max_images | integer | 否 | 本次请求最多生成的图片总数(含底图),取值范围 [2, 100],默认 30。当提示词未说明拆分方式时,模型会结合 max_images 与输入图复杂度合理规划拆分结果。 |
| layer_decomposition_options.text_recognition | boolean | 否 | 是否对规整文字图层额外返回富文本 OCR 结果(data[].text_recognition),默认 false。非文字图层及艺术字、手写体等非规整文字图层不返回。 |
| safety_identifier | string | 否 | 终端用户的唯一标识符,用于协助平台检测违规用户;英文字符串,对单个用户固定且唯一,长度不超过 64 字符,响应中原样返回。支持模型:Seedream 5.5 / 5.0 Pro / 5.0 Flash。 |
| size | string | 否 | 图片生成场景:档位方式可选 1K / 1.5K / 2K(默认 2K);或指定宽高像素值(宽x高),总像素范围 [1280x720(921600), 4624220],宽高比 [1/16, 16]。图层拆分场景:仅支持分辨率档位,默认 auto,可选 1K / 1.5K / 2K / auto。 |
- 附表1:seedream4.5推荐的宽高像素值
| 宽高比 | 宽高像素值 |
|---|---|
| 1:1 | 2048x2048 |
| 4:3 | 2304x1728 |
| 3:4 | 1728x2304 |
| 16:9 | 2560x1440 |
| 9:16 | 1440x2560 |
| 3:2 | 2496x1664 |
| 2:3 | 1664x2496 |
| 21:9 | 3024x1296 |
附表2:seedream4.0
| 分辨率 | 宽高比 | 宽高像素值 |
|---|---|---|
| 1k | 1:1 | 1024x1024 |
| 4:3 | 1152x864 | |
| 3:4 | 864x1152 | |
| 16:9 | 1280x720 | |
| 9:16 | 720x1280 | |
| 3:2 | 1248x832 | |
| 2:3 | 832x1248 | |
| 21:9 | 1512x648 | |
| 2k | 1:1 | 2048x2048 |
| 4:3 | 2304x1728 | |
| 3:4 | 1728x2304 | |
| 16:9 | 2848x1600 | |
| 9:16 | 1600x2848 | |
| 3:2 | 2496x1664 | |
| 2:3 | 1664x2496 | |
| 21:9 | 3136x1344 | |
| 4k | 1:1 | 4096x4096 |
| 4:3 | 4704x3520 | |
| 3:4 | 3520x4704 | |
| 16:9 | 5504x3040 | |
| 9:16 | 3040x5504 | |
| 3:2 | 4992x3328 | |
| 2:3 | 3328x4992 | |
| 21:9 | 6240x2656 |
- 附表3:seedream5.0 lite
| 分辨率 | 宽高比 | 宽高像素值 |
|---|---|---|
| 2k | 1:1 | 2048x2048 |
| 4:3 | 2304x1728 | |
| 3:4 | 1728x2304 | |
| 16:9 | 2848x1600 | |
| 9:16 | 1600x2848 | |
| 3:2 | 2496x1664 | |
| 2:3 | 1664x2496 | |
| 21:9 | 3136x1344 | |
| 3k | 1:1 | 3072x3072 |
| 4:3 | 3456x2592 | |
| 3:4 | 2592x3456 | |
| 16:9 | 4096x2304 | |
| 9:16 | 2304x4096 | |
| 3:2 | 3744x2496 | |
| 2:3 | 2496x3744 | |
| 21:9 | 4704x2016 | |
| 4k | 1:1 | 4096x4096 |
| 4:3 | 4704x3520 | |
| 3:4 | 3520x4704 | |
| 16:9 | 5504x3040 | |
| 9:16 | 3040x5504 | |
| 3:2 | 4992x3328 | |
| 2:3 | 3328x4992 | |
| 21:9 | 6240x2656 |
- 附表4:seedream 5.0 pro / 5.0 flash 推荐的宽高像素值(两者规则一致)
| 分辨率 | 宽高比 | 宽高像素值 |
|---|---|---|
| 1k | 1:1 | 1024x1024 |
| 4:3 | 1152x864 | |
| 3:4 | 864x1152 | |
| 16:9 | 1424x800 | |
| 9:16 | 800x1424 | |
| 3:2 | 1248x832 | |
| 2:3 | 832x1248 | |
| 21:9 | 1568x672 | |
| 1.5K | 1:1 | 1536x1536 |
| 4:3 | 1792x1344 | |
| 3:4 | 1344x1792 | |
| 16:9 | 2048x1152 | |
| 9:16 | 1152x2048 | |
| 3:2 | 1872x1248 | |
| 2:3 | 1248x1872 | |
| 21:9 | 2352x1008 | |
| 2k | 1:1 | 2048x2048 |
| 4:3 | 2368x1776 | |
| 3:4 | 1776x2368 | |
| 16:9 | 2816x1584 | |
| 9:16 | 1584x2816 | |
| 3:2 | 2496x1664 | |
| 2:3 | 1664x2496 | |
| 21:9 | 3136x1344 |
请求体示例
文生图
curl https://genaiapi.cloudsway.net/v1/ai/{endpointPath}/seedream/image/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
"prompt": "充满活力的特写编辑肖像,模特眼神犀利,头戴雕塑感帽子,色彩拼接丰富,眼部焦点锐利,景深较浅,具有Vogue杂志封面的美学风格,采用中画幅拍摄,工作室灯光效果强烈。",
"size": "2K",
"watermark": false
}'
图生图
curl -X https://genaiapi.cloudsway.net/v1/ai/{endpointPath}/seedream/image/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ARK_API_KEY" \
-d '{
"prompt": "保持模特姿势和液态服装的流动形状不变。将服装材质从银色金属改为完全透明的清水(或玻璃)。透过液态水流,可以看到模特的皮肤细节。光影从反射变为折射。",
"image": "https://ark-project.tos-cn-beijing.volces.com/doc_image/seedream4_5_imageToimage.png",
"size": "2K",
"watermark": false
}'
多图生图
curl -X https://genaiapi.cloudsway.net/v1/ai/{endpointPath}/seedream/image/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ARK_API_KEY" \
-d '{
"prompt": "将图1的服装换为图2的服装",
"image": ["https://ark-project.tos-cn-beijing.volces.com/doc_image/seedream4_imagesToimage_1.png", "https://ark-project.tos-cn-beijing.volces.com/doc_image/seedream4_5_imagesToimage_2.png"],
"sequential_image_generation": "disabled",
"size": "2K",
"watermark": false
}'
图层拆分
curl -X https://{YOUR_DOMAIN}/v1/ai/{YOUR_ENDPOINT}/seedream/image/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ARK_API_KEY" \
-d '{
"prompt": "拆分图层",
"layer_decomposition": true,
"image": "https://arkdocs.tos-cn-beijing.volces.com/images/image-generation/layer_auto.png"
}'
非流式响应示例
生图场景
{
"model": "doubao-seedream-4-5-251128", //当使用endpoint调用时,endpoint将锁定model,更换model参数变量不生效
"created": 1757323224,
"data": [
{
"url": "https://...",
"output_format": "jpeg",
"size": "1760x2368"
}
],
"usage": {
"generated_images": 1,
"output_tokens": 16280,
"input_images": 3,
"total_tokens": 16280
}
}
图层拆分场景
bounding_box为输出图层在输出底图坐标系中所占区域的边界框信息。仅图层返回该字段;底图覆盖整张画布,不返回该字段。
-
bounding_box 表示图层在待拆分图中的相对位置与宽高比,等比缩放至输出底图坐标系后的坐标。
-
若需将图层还原到输出底图中,建议优先使用 absolute 坐标。
-
若需将图层还原到任意自定义的画布中,可使用 normalized 坐标。
{
"model": "MaaS_Seedream_5.0_pro", //当使用endpoint调用时,endpoint将锁定model,更换model参数变量不生效
"created": 1787033167,
"data": [
{
"zindex": 0,
"url": "https://ark-acg-ap-southeast-1.tos-ap-southeast-1.volces.com/dola-seedream-5-0-pro/9fe51cf3908af1475408624e76ce4f4af56843468520330787120/Image/3000618968/02178703302586434865fa4f4ec67e4268045741fa8093fc15ef9_base.jpeg?X-Tos-Algorithm=TOS4-HMAC-SHA256&X-Tos-Credential=AKLTYWJkZTExNjA1ZDUyNDc3YzhjNTM5OGIyNjBhNDcyOTQ%2F20260818%2Fap-southeast-1%2Ftos%2Frequest&X-Tos-Date=20260818T060549Z&X-Tos-Expires=86400&X-Tos-Signature=8af51d903653b65da84e452cf0912cd599339e51dba548c422a47e7171bb5f7c&X-Tos-SignedHeaders=host",
"output_format": "jpeg",
"size": "1760x2176",
"z_index": 0
},
{
"zindex": 1,
"url": "https://ark-acg-ap-southeast-1.tos-ap-southeast-1.volces.com/dola-seedream-5-0-pro/9fe51cf3908af1475408624e76ce4f4af56843468520330787120/Image/3000618968/02178703302586434865fa4f4ec67e4268045741fa8093fc15ef9_layer_1.png?X-Tos-Algorithm=TOS4-HMAC-SHA256&X-Tos-Credential=AKLTYWJkZTExNjA1ZDUyNDc3YzhjNTM5OGIyNjBhNDcyOTQ%2F20260818%2Fap-southeast-1%2Ftos%2Frequest&X-Tos-Date=20260818T060604Z&X-Tos-Expires=86400&X-Tos-Signature=2582d29740bfbb8401e45b50c8c0a7b769d07e091de05a115376ad4fc6c9b5d9&X-Tos-SignedHeaders=host",
"output_format": "png",
"size": "2496x761",
"z_index": 1,
"name": "前景场景基底",
"description": "包含草地、溪流、小石子的前景场景基底,不包含上方的所有物体",
"bounding_box": {
"absolute": [
0,
1639,
1760,
2176
],
"normalized": [
0,
753,
999,
1000
]
}
},
{
"zindex": 2,
"url": "https://ark-acg-ap-southeast-1.tos-ap-southeast-1.volces.com/dola-seedream-5-0-pro/9fe51cf3908af1475408624e76ce4f4af56843468520330787120/Image/3000618968/02178703302586434865fa4f4ec67e4268045741fa8093fc15ef9_layer_2.png?X-Tos-Algorithm=TOS4-HMAC-SHA256&X-Tos-Credential=AKLTYWJkZTExNjA1ZDUyNDc3YzhjNTM5OGIyNjBhNDcyOTQ%2F20260818%2Fap-southeast-1%2Ftos%2Frequest&X-Tos-Date=20260818T060607Z&X-Tos-Expires=86400&X-Tos-Signature=c6b7fc250ab403fc2818315b685a7406cf8a1f79f1538890c852e7af94c8cb5a&X-Tos-SignedHeaders=host",
"output_format": "png",
"size": "2128x1756",
"z_index": 2,
"name": "背景蓝绿色幕布",
"description": "褶皱质感的蓝绿色背景幕布,不包含前方的所有前景物体",
"bounding_box": {
"absolute": [
0,
0,
1760,
1449
],
"normalized": [
0,
0,
999,
665
]
}
},
{
"zindex": 3,
"url": "https://ark-acg-ap-southeast-1.tos-ap-southeast-1.volces.com/dola-seedream-5-0-pro/9fe51cf3908af1475408624e76ce4f4af56843468520330787120/Image/3000618968/02178703302586434865fa4f4ec67e4268045741fa8093fc15ef9_layer_3.png?X-Tos-Algorithm=TOS4-HMAC-SHA256&X-Tos-Credential=AKLTYWJkZTExNjA1ZDUyNDc3YzhjNTM5OGIyNjBhNDcyOTQ%2F20260818%2Fap-southeast-1%2Ftos%2Frequest&X-Tos-Date=20260818T060557Z&X-Tos-Expires=86400&X-Tos-Signature=56c4ec0ee3fb2b6d9e49eb608a7ac4123fbdf7da983cb8b9b7b7a3303afb43c6&X-Tos-SignedHeaders=host",
"output_format": "png",
"size": "2052x739",
"z_index": 3,
"name": "木质演出平台",
"description": "承载演出设备的树桩质感木质平台,不包含平台上的散落颗粒以外的其他物体",
"bounding_box": {
"absolute": [
274,
1492,
1571,
1959
],
"normalized": [
156,
686,
892,
900
]
}
},
......
],
"usage": {
"generated_images": 17,
"input_images": 1,
"output_tokens": 134757,
"total_tokens": 134757
}
}
响应参数(非流式)
| 属性名 | 类型 | 描述 |
|---|---|---|
| created | integer | 本次请求创建时间的 Unix 时间戳(秒)。 |
| data | array | 输出图像信息。公共返回字段:url/b64_json、size、output_format、background;图层拆分场景额外返回 z_index、name、description、bounding_box。 |
| data.url | string | 图片下载链接,response_format 为 url 时返回;链接在图片生成后 24 小时内失效,请及时保存。 |
| data.b64_json | string | 图片 Base64 编码,response_format 为 b64_json 时返回。 |
| data.output_format | string | 输出图像格式(png / jpeg)。图层拆分场景仅控制底图格式,图层始终为 png。支持模型:5.5 / 5.0 Pro / 5.0 Flash。 |
| data.background | string | 图片实际透明度类型:transparent(存在透明/半透明像素)、opaque(整体不透明)。支持模型:Seedream 5.5。 |
| data.size | string | 图像宽高像素值,格式 宽x高,如 2048x2048。 |
| data.z_index | integer | 图层叠放顺序:底图固定 0,图层从 1 递增,越大越靠上层。支持模型:5.5 / 5.0 Pro / 5.0 Flash。 |
| data.name / data.description | string | 图层拆分元素的名称/标签与详细语义描述。 |
| data.bounding_box | object | 图层在输出底图坐标系中的边界框,仅图层返回;含 absolute(绝对像素坐标 [left, top, right, bottom])与 normalized(归一化至 [0, 1000] 的坐标)。 |
| data.text_recognition | object | 规整文字图层的富文本 OCR 结果(text 全文、lines 逐行位置与样式片段 runs:similar_font_family、foreground_color、bold、italic、underline、strikethrough、shadow、translucent)。需 layer_decomposition 与 layer_decomposition_options.text_recognition 均为 true 且被判定为规整文字。仅 Seedream 5.5。 |
| data.error | object | 某张图片生成失败时的错误信息(code / message),不影响其他成功图片。 |
| usage.generated_images | integer | 模型成功生成的图片张数(不含失败),按张计费依据。 |
| usage.input_images | integer | 输入模型的图片张数。支持模型:5.5 / 5.0 Pro / 5.0 Flash。 |
| usage.output_tokens / usage.total_tokens | integer | 生成图片消耗的 token 数(sum(长×宽)/256 取整);当前不计输入 token,total_tokens 与 output_tokens 一致。 |
| error | object | 本次请求发生错误时的错误信息(code / message)。 |
| safety_identifier | string | 请求中设置时原样返回。支持模型:5.5 / 5.0 Pro / 5.0 Flash。 |
流式响应示例
Seedream 5.5 / 5.0 Pro / 5.0 Flash 不支持流式输出
event: image_generation.partial_succeeded
data: {
"type": "image_generation.partial_succeeded",
"model": "doubao-seedream-4-5-251128", //当使用endpoint调用时,endpoint将锁定model,更换model参数变量不生效
"created": 1757396757,
"image_index": 0,
"url": "https://...",
"size": "2496x1664"
}
event: image_generation.partial_succeeded
data: {
"type": "image_generation.partial_succeeded",
"model": "doubao-seedream-4-5-251128", //当使用endpoint调用时,endpoint将锁定model,更换model参数变量不生效
"created": 1757396785,
"image_index": 1,
"url": "https://...",
"size": "2496x1664"
}
event: image_generation.partial_succeeded
data: {
"type": "image_generation.partial_succeeded",
"model": "doubao-seedream-4-5-251128", //当使用endpoint调用时,endpoint将锁定model,更换model参数变量不生效
"created": 1757396825,
"image_index": 2,
"url": "https://...",
"size": "2496x1664"
}
event: image_generation.completed
data: {
"type": "image_generation.completed",
"model": "doubao-seedream-4-5-251128", //当使用endpoint调用时,endpoint将锁定model,更换model参数变量不生效
"created": 1757396825,
"usage": {
"generated_images": 3,
"output_tokens": 48672,
"total_tokens": 48672
}
}
data: [DONE]
流式响应事件说明
| 事件类型 | 说明 |
|---|---|
| image_generation.partial_succeeded | 在流式响应模式下,当任意图片生成成功时返回该事件 |
| image_generation.partial_failed |
在流式返回模式下,当任意图片生成失败时返回该事件。
|
| image_generation.completed | 请求的所有图片(无论成功或失败)均处理完毕后返回,是该流式返回的最后一个响应事件 |