Skip to Content

Seedream

OpenAI Images
接口POST /v1/images/generations
doubao-seedream-5-0-pro-260628doubao-seedream-5.0-lite

模型能力

能力Seedream 5.0 ProSeedream 5.0 Lite
公开模型名doubao-seedream-5-0-pro-260628doubao-seedream-5.0-lite
生成方式文生单图、单图生单图、多图生单图支持单图与组图生成
参考图数量最多 10 张最多 14 张;输入图与输出图合计不超过 15 张
分辨率档位1K / 1.5K / 2K,默认 2K2K / 3K / 4K
组图 / 联网 / 流式均不支持支持组图;联网和流式以实际模型能力为准
Pro 仅生成单图:调用 doubao-seedream-5-0-pro-260628 时不要传 sequential_image_generation、stream 或 tools。

请求参数

参数类型说明
modelstring使用上方模型名之一。
promptstring必填,支持中英文;建议不超过 300 个汉字或 600 个英文单词。
imagestring / string[]可选,参考图片的公网 URL 或 Base64 数据;Pro 最多 10 张。
sizestring分辨率档位或 宽x高 像素值,两种方式不可混用。
output_formatstringjpeg / png,默认 jpeg。
response_formatstringurl / b64_json,默认 url。
watermarkboolean是否添加水印,默认 true。
sequential_image_generationstringLite 使用 auto 开启组图;Pro 不支持此参数。
sequential_image_generation_options.max_imagesintegerLite 组图的最大生成数量,需与 auto 同时使用。

Pro 使用自定义像素尺寸时,总像素必须在 921600 至 4624220 之间,宽高比必须在 1:16 至 16:1 之间。例如 2048x1024 有效,512x512 像素不足。

官方参考:图片生成 API

调用示例

curl "https://api.example.com/v1/images/generations" \ -H "Authorization: Bearer <YOUR_API_KEY>" \ -H "Content-Type: application/json" \ -d '{ "model": "doubao-seedream-5-0-pro-260628", "prompt": "充满活力的编辑肖像,模特眼神锐利,雕塑感帽子,丰富色彩拼接,Vogue 杂志封面美学,工作室灯光", "size": "2K", "output_format": "png", "response_format": "url", "watermark": false }'
response_format=url 时从 data[0].url 读取图片地址,链接有效期为 24 小时;使用 b64_json 时读取 data[0].b64_json。usage.generated_images 表示成功生成的图片数量。
Last updated on