豆包 Seedream 文生图与图生图接口,兼容 OpenAI SDK。ZeroFA 已适配火山的输出像素下限、缺少 edits 端点和固定返回 URL 等差异。
https://zerofa.ai/v1/images/generationsdoubao-seedream-5-0-260128文生图 / 图生图可选doubao-seedream-5-0-pro-260628文生图 / 图生图可选doubao-seedream-4-5-251128文生图 / 图生图可选doubao-seedream-4-0-250828文生图 / 图生图可选文生图模型见 模型广场 并筛选图像类型。下表列出已支持的版本标识,具体可用版本以当前环境的实时模型列表为准;Seedream 按张计费。
Authorizationstring必填Bearer sk-zerofa-xxxContent-Typestring必填application/jsonmodelstring必填doubao-seedream-5-0-260128promptstring必填一只戴宇航头盔的柴犬,扁平插画,studio lightninteger可选1sizestring可选2048x2048在 /v1/images/generations 请求中加入 image URL 即可使用原生图生图,不需要 multipart 上传。
imagestring | string[]可选https://...pngsequential_image_generationstring可选disabledsequential_image_generation_optionsobject可选{"max_images":3}curl https://zerofa.ai/v1/images/generations \
-H "Authorization: Bearer sk-zerofa-xxx" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedream-5-0-260128",
"prompt": "把背景换成夜晚的星空,保持主体不变",
"image": "https://your-cdn.com/cat.png",
"size": "2048x2048"
}'{
"model": "doubao-seedream-5-0-260128",
"prompt": "基于这张图生成 3 个不同姿势的变体",
"image": ["https://your-cdn.com/cat.png"],
"sequential_image_generation": "auto",
"sequential_image_generation_options": { "max_images": 3 }
}/v1/images/edits通过 multipart/form-data 上传图片和 prompt。ZeroFA 会将文件转换为 base64 并调用 Seedream generations,固定只生成一张;传 URL 或生成组图时请使用上方原生格式。
curl https://zerofa.ai/v1/images/edits \
-H "Authorization: Bearer sk-zerofa-xxx" \
-F "model=doubao-seedream-5-0-260128" \
-F "prompt=把背景换成夜晚的星空" \
-F "size=2048x2048" \
-F "image=@source.png;type=image/png"data 数组每项为一张图片,url 是火山 TOS 临时链接。需要长期保存时请及时下载。
用下面的示例确认请求格式与返回结构。需要在线发起请求时,点击页面顶部“调试”拉起在线运行面板。
curl https://zerofa.ai/v1/images/generations \
-H "Authorization: Bearer sk-zerofa-xxx" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedream-5-0-260128",
"prompt": "一只戴宇航头盔的柴犬,扁平插画,studio light",
"n": 1,
"size": "2048x2048"
}'{
"created": 1780943800,
"data": [
{ "url": "https://ark-acg-cn-beijing.tos-cn-beijing.volces.com/doubao-seedream-5-0/....jpeg?X-Tos-Expires=86400&..." }
]
}