Skip to content

Sequential images ​

Sequential image generation creates a related set of images from the input. Only doubao-seedream-5-0-260128 supports it. doubao-seedream-5-0-pro-260628 does not.

Modes ​

ModeDescriptionMax images
Text to a setA related set from a text prompt15
One image to a setA related set from one reference image plus text14
Many images to a setA related set from 2–14 reference images plus textReference count + generated count ≤ 15

Request parameters ​

ParameterDescriptionRequiredType
modelModel ID. Use doubao-seedream-5-0-260128YesString
promptText descriptionYesString
imageOptional reference image, URL or Base64NoString/Array
sequential_image_generationSet mode. Use autoYesString
sequential_image_generation_optionsSet optionsNoObject
sizeResolutionNoString
response_formatResponse formatNoString
watermarkWhether to add a watermarkNoBoolean

sequential_image_generation_options ​

ParameterDescriptionDefault
max_imagesMaximum images to generate, range [1, 15]15

Examples ​

Text to a set ​

bash
curl -X POST https://api-ai.xiaoku.ai/doubao/api/v3/images/generations \
  -H "Authorization: Bearer XIAOKU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedream-5-0-260128",
    "prompt": "City nights in different styles: a modern downtown, an old town, and a coastal city",
    "sequential_image_generation": "auto",
    "sequential_image_generation_options": {
      "max_images": 5
    },
    "size": "2K",
    "watermark": false
  }'

One image to a set ​

bash
curl -X POST https://api-ai.xiaoku.ai/doubao/api/v3/images/generations \
  -H "Authorization: Bearer XIAOKU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedream-5-0-260128",
    "prompt": "Use this image as inspiration and show the landscape in different seasons",
    "image": "https://example.com/landscape.jpg",
    "sequential_image_generation": "auto",
    "sequential_image_generation_options": {
      "max_images": 4
    },
    "watermark": false
  }'

Many images to a set ​

bash
curl -X POST https://api-ai.xiaoku.ai/doubao/api/v3/images/generations \
  -H "Authorization: Bearer XIAOKU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedream-5-0-260128",
    "prompt": "Combine elements from these images into a creative set",
    "image": [
      "https://example.com/image1.jpg",
      "https://example.com/image2.jpg",
      "https://example.com/image3.jpg"
    ],
    "sequential_image_generation": "auto",
    "sequential_image_generation_options": {
      "max_images": 12
    },
    "watermark": false
  }'

Response ​

json
{
    "model": "doubao-seedream-5-0-260128",
    "created": 1757321139,
    "data": [
        { "url": "https://api-ai.xiaoku.ai/images/image1.jpg" },
        { "url": "https://api-ai.xiaoku.ai/images/image2.jpg" },
        { "url": "https://api-ai.xiaoku.ai/images/image3.jpg" },
        { "url": "https://api-ai.xiaoku.ai/images/image4.jpg" },
        { "url": "https://api-ai.xiaoku.ai/images/image5.jpg" }
    ],
    "usage": {
        "generated_images": 5
    }
}

Notes ​

  1. Only doubao-seedream-5-0-260128 supports sequential images. doubao-seedream-5-0-pro-260628 does not.
  2. Reference image count + generated image count ≤ 15
  3. Multi-image input accepts at most 14 reference images
  4. Image URLs expire after 24 hours. Save them promptly.