Skip to main content

支持的模型

doubao-seedream-4-0-250828

基础版图片生成模型

doubao-seedream-4-5-251128

增强版图片生成模型

参数说明

常用参数

参数名类型必填说明默认值/可选值
modelstring模型名称doubao-seedream-4-0-250828, doubao-seedream-4-5-251128
promptstring文本提示词支持中英文,建议≤300汉字或600英文单词
imagestring/array输入图片URL图生图/多图融合时使用,支持URL或Base64
sizestring图片尺寸2K, 4K, 或指定宽高如2048x2048
sequential_image_generationstring序列图片生成模式disabled(关闭), auto(自动), 默认disabled
sequential_image_generation_optionsobject组图配置max_images: 最多图片数(1-15), 默认15
streamboolean是否流式返回true, false, 默认false
response_formatstring响应格式url(链接), b64_json(Base64), 默认url
watermarkboolean是否添加水印true, false

文生图

通过文本描述生成图片。
curl -X POST https://{YOUR_API_ENDPOINT}/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {YOUR_API_KEY}" \
  -d '{
    "model": "doubao-seedream-4-0-250828",
    "prompt": "星际穿越,黑洞,黑洞里冲出一辆快支离破碎的复古列车,抢视觉冲击力,电影大片,末日既视感,动感,对比色,oc渲染,光线追踪,动态模糊,景深,超现实主义,深蓝,画面通过细腻的丰富的色彩层次塑造主体与场景,质感真实,暗黑风背景的光影效果营造出氛围,整体兼具艺术幻想感,夸张的广角透视效果,耀光,反射,极致的光影,强引力,吞噬",
    "size": "2K",
    "sequential_image_generation": "disabled",
    "stream": false,
    "response_format": "url",
    "watermark": true
  }'

图生图

基于输入图片生成新图片。
curl -X POST https://{YOUR_API_ENDPOINT}/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {YOUR_API_KEY}" \
  -d '{
    "model": "doubao-seedream-4-0-250828",
    "prompt": "生成狗狗趴在草地上的近景画面",
    "image": "https://ark-project.tos-cn-beijing.volces.com/doc_image/seedream4_imageToimage.png",
    "size": "2K",
    "sequential_image_generation": "disabled",
    "stream": false,
    "response_format": "url",
    "watermark": true
  }'

图生组图

基于输入图片生成一组连续的图片。
curl -X POST https://{YOUR_API_ENDPOINT}/v1/images/generations \
   -H "Content-Type: application/json" \
   -H "Authorization: Bearer {YOUR_API_KEY}" \
   -d '{
     "model": "doubao-seedream-4-0-250828",
     "prompt": "生成3张女孩和奶牛玩偶在游乐园开心地坐过山车的图片,涵盖早晨、中午、晚上",
     "image": ["https://ark-project.tos-cn-beijing.volces.com/doc_image/seedream4_imagesToimages_1.png", "https://ark-project.tos-cn-beijing.volces.com/doc_image/seedream4_imagesToimages_2.png"],
     "sequential_image_generation": "auto",
     "sequential_image_generation_options": {
         "max_images": 3
     },
     "size": "2K"
   }'

多图融合

融合多张图片的特征生成新图片。
curl -X POST https://{YOUR_API_ENDPOINT}/v1/images/generations \
   -H "Content-Type: application/json" \
   -H "Authorization: Bearer {YOUR_API_KEY}" \
  -d '{
    "model": "doubao-seedream-4-0-250828",
    "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_imagesToimage_2.png"],
    "sequential_image_generation": "disabled",
    "size": "2K"
  }'
返回的图片URL通常有24小时的有效期,请及时下载保存。