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
| Model | Max reference images | Notes |
|---|---|---|
| doubao-seedream-5-0-260128 | 14 | Multi-image fusion and sequential images |
| doubao-seedream-5-0-pro-260628 | 10 | Multi-image fusion, interactive editing, and layer splitting. Sequential images are not supported. |
Request parameters
| Parameter | Description | Required | Type |
|---|---|---|---|
| model | Model ID | Yes | String |
| prompt | How to change the image | Yes | String |
| image | Reference image URL or Base64 | Yes | String/Array |
| size | Resolution | No | String |
| response_format | url or b64_json | No | String |
| watermark | Whether to add a watermark | No | Boolean |
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
| Requirement | Details |
|---|---|
| Format | jpeg, png, webp, bmp, tiff, gif, heic, heif |
| Size | Up to 30MB |
| Aspect ratio | [1/16, 16] |
| Width and height | Greater than 14px |
| Total pixels | At 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
- URL references must be publicly reachable
- doubao-seedream-5-0-260128 accepts up to 14 reference images. doubao-seedream-5-0-pro-260628 accepts up to 10.
- doubao-seedream-5-0-pro-260628 does not support sequential images. Use doubao-seedream-5-0-260128 for that.
- Image URLs expire after 24 hours. Save them promptly.
