sequential_image_generation to be configured as auto)sequential_image_generation as disabled)| Resolution | Aspect Ratio | Resolution (px) |
|---|---|---|
| 2K | 1:1 | 2048 × 2048 |
| 4:3 | 2304 × 1728 | |
| 3:2 | 2496 × 1664 | |
| 16:9 | 2560 × 1440 | |
| 21:9 | 3024 × 1296 | |
| 4K | 1:1 | 4096 × 4096 |
| 4:3 | 4694 × 3520 | |
| 3:2 | 4992 × 3328 | |
| 16:9 | 5404 × 3040 | |
| 21:9 | 6198 × 2656 |
{
"model": "doubao-seedream-4-5-251128",
"prompt": "Replace the clothing in Figure 1 with the clothing in Figure 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_5_imagesToimage_2.png"
],
"sequential_image_generation": "disabled",
"size": "2K",
"watermark": false
}curl --location --request POST 'https://api.302.ai/doubao/images/generations' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "doubao-seedream-4-5-251128",
"prompt": "Replace the clothing in Figure 1 with the clothing in Figure 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_5_imagesToimage_2.png"
],
"sequential_image_generation": "disabled",
"size": "2K",
"watermark": false
}'| Field Name | Type | Description |
|---|---|---|
| model | string | The model ID used in this request (model name-version). |
| created | integer | The Unix timestamp (in seconds) at the time this request was created. |
| data | list | Information about the output images, including the URL or Base64 of the image download. - When the return format is specified as url, the field is url- When the return format is specified as b64_json, the field is b64_jsonNote: To ensure information security, the URL link will expire within 24 hours after generation. Please be sure to save the images in time. |
| usage | object | Image generation related information. - usage.generated_images (integer): The number of images generated by the model. |
| error | object | Error message (optional). - error.code (string): Error code- error.message (string): Error message |
response_format is url, each element of the data array contains the following fields:url: Image download addressresponse_format is b64_json, each element of the data array contains the following fields:b64_json: Base64 encoded string of the imageusage.generated_images: Number of images generated by the model (integer)error.code: Error code (string)error.message: Error message (string){
"model": "doubao-seedream-4-0-250828",
"created": 1757321139,
"data": [
{
"url": "https://...",
"size": "3104x1312"
}
],
"usage": {
"generated_images": 1,
"output_tokens": xxx,
"total_tokens": xxx
}
}