MaaS-Seedream
能力列表
| 模型 ID (Model ID) | 能力支持 | 限流(最大IPM 张/分钟) |
|---|---|---|
| doubao-seedream-5-0-pro-260628 | 单图生成:文生图、单张图生图、多参考图生图 | 500 |
| doubao-seedream-5-0-260128 (同时支持:doubao-seedream-5-0-lite-260128) | 单图生成:文生图、单张图生图、多参考图生图 组图生成:文生组图、单张图生组图、多参考图生组图 | 500 |
| doubao-seedream-4-5-251128 | 单图生成:文生图、单张图生图、多参考图生图 组图生成:文生组图、单张图生组图、多参考图生组图 | 500 |
| doubao-seedream-4-0-250828 | 单图生成:文生图、单张图生图、多参考图生图 组图生成:文生组图、单张图生组图、多参考图生组图 | 500 |
接口及请求参数
POST
https://genaiapi-m2.cloudsway.net/v1/ai/{endpointPath}/seedream/image/generations
请求参数
| 属性名 | 类型 | 是否必需 | 描述 |
|---|---|---|---|
| prompt | string |
是 | 用于生成图像的提示词,支持中英文,建议不超过300个汉字或600个英文单词。字数过多信息容易分散,模型可能因此忽略细节,只关注重点,造成图片缺失部分元素。 |
| image |
string/array |
否 |
输入的图片信息,支持 URL 或 Base64 编码。其中,seedream-5.0-lite/5.0-pro/4.5/4.0 支持单图或多图输入 (图片总大小超过10MB的建议用url方式传递)
Seedream 5.0 Pro 最多支持传入 10 张参考图 |
| size |
string |
否 | 指定生成图像的尺寸信息,支持以下两种方式,不可混用。
|
| seed | integer | 否 | 默认值-1,随机数种子,用于控制模型生成内容的随机性。取值范围为 [-1, 2147483647]。 |
| sequential_image_generation |
string | 否 | 仅 seedream-5.0-lite/4.5/4.0 支持该参数 Seedream 5.0 Pro 不支持 控制是否关闭组图功能,默认值disabled
|
| sequential_image_generation_options |
object | 否 | 仅 seedream-5.0-lite/4.5/4.0 支持该参数,组图功能的配置。仅当 sequential_image_generation 为 auto 时生效. Seedream 5.0 Pro 不支持 |
| 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 支持该参数
|
| response_format |
string | 否 | 指定生成图像的返回格式,默认值url。 生成的图片为 jpeg 格式,支持以下两种返回方式:
|
| watermark |
boolean | 否 | 是否在生成的图片中添加水印,默认值true。
|
| output_format | string |
否 | 仅 seedream-5.0-lite/5.0 pro 支持该参数
|
| optimize_prompt_options | object |
否 | 提示词优化功能的配置 |
| optimize_prompt_options.mode |
string |
否 | 设置提示词优化功能使用的模式,默认值standard。
|
- 附表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:seedream5.0 pro推荐的宽高像素值
| 分辨率 | 宽高比 | 宽高像素值 |
|---|---|---|
| 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 | |
| 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-m2.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-m2.cloudsway.net/v1/ai/{endpointPath}/seedream/image/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${your_AK}" \
-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-m2.cloudsway.net/v1/ai/{endpointPath}/seedream/image/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${your_AK}" \
-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
}'
非流式响应示例
{
"model": "doubao-seedream-4-5-251128",
"created": 1757323224,
"data": [
{
"url": "https://...",
"output_format": "jpeg",
"size": "1760x2368"
}
],
"usage": {
"generated_images": 1,
"output_tokens": 16280,
"input_images": 3,
"total_tokens": 16280
}
}
流式响应示例
event: image_generation.partial_succeeded
data: {
"type": "image_generation.partial_succeeded",
"model": "doubao-seedream-4-5-251128",
"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",
"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",
"created": 1757396825,
"image_index": 2,
"url": "https://...",
"size": "2496x1664"
}
event: image_generation.completed
data: {
"type": "image_generation.completed",
"model": "doubao-seedream-4-5-251128",
"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 | 请求的所有图片(无论成功或失败)均处理完毕后返回,是该流式返回的最后一个响应事件 |