Skip to content

Image to image ​

Image to image creates a new image from a reference image and a text prompt. Use it for style transfer, edits, and added detail.

Models ​

ModelMax reference imagesNotes
doubao-seedream-5-0-26012814Multi-image fusion and sequential images
doubao-seedream-5-0-pro-26062810Multi-image fusion, interactive editing, and layer splitting. Sequential images are not supported.

Request parameters ​

ParameterDescriptionRequiredType
modelModel IDYesString
promptHow to change the imageYesString
imageReference image URL or Base64YesString/Array
sizeResolutionNoString
response_formaturl or b64_jsonNoString
watermarkWhether to add a watermarkNoBoolean

image formats ​

URL:

json
{
  "image": "https://example.com/reference.jpg"
}

Base64:

json
{
  "image": "data:image/png;base64,iVBORw0KGgo..."
}

Multiple images (up to 14 for doubao-seedream-5-0-260128, up to 10 for doubao-seedream-5-0-pro-260628):

json
{
  "image": [
    "https://example.com/image1.jpg",
    "https://example.com/image2.jpg"
  ]
}

Image requirements ​

RequirementDetails
Formatjpeg, png, webp, bmp, tiff, gif, heic, heif
SizeUp to 30MB
Aspect ratio[1/16, 16]
Width and heightGreater than 14px
Total pixelsAt least 196 pixels, at most 6000×6000 px

Examples ​

Style transfer ​

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-pro-260628",
    "prompt": "Convert the image to a Van Gogh oil-painting style, rich color, visible brushstrokes",
    "image": "https://example.com/photo.jpg",
    "size": "2K",
    "watermark": false
  }'

Edit content ​

Change part of the image and keep the composition:

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-pro-260628",
    "prompt": "Change the person's clothing to a red dress",
    "image": "https://example.com/portrait.jpg",
    "watermark": false
  }'

Add detail ​

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-pro-260628",
    "prompt": "Add lighting, increase depth, and make the scene more vivid",
    "image": "https://example.com/scene.jpg",
    "watermark": false
  }'

Response ​

json
{
    "model": "doubao-seedream-5-0-pro-260628",
    "created": 1757321139,
    "data": [
        {
            "url": "https://api-ai.xiaoku.ai/images/xxx.jpg"
        }
    ],
    "usage": {
        "generated_images": 1
    }
}

Notes ​

  1. URL references must be publicly reachable
  2. doubao-seedream-5-0-260128 accepts up to 14 reference images. doubao-seedream-5-0-pro-260628 accepts up to 10.
  3. doubao-seedream-5-0-pro-260628 does not support sequential images. Use doubao-seedream-5-0-260128 for that.
  4. Image URLs expire after 24 hours. Save them promptly.