sequential_image_generation=auto)sequential_image_generation=disabled)| Resolution | Aspect Ratio | Pixel Size |
|---|---|---|
| 1K | 1:1 | 1024 × 1024 |
| 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-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
},
"response_format": "url",
"size": "2K",
"stream": false,
"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-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
},
"response_format": "url",
"size": "2K",
"stream": false,
"watermark": false
}'| Field Name | Type | Description |
|---|---|---|
| model | string | The model ID used for this request (model name-version). |
| created | integer | The Unix timestamp (seconds) when this request was created. |
| data | list | Information about the output images, including the image download URL or Base64. - 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 make sure to save the image in time. |
| usage | object | Information related to image generation. - usage.generated_images (integer): Number of images generated by the model. |
| error | object | Error information (optional). - error.code (string): Error code- error.message (string): Error message |
response_format is url, each element in the data array contains the field:url: Image download addressresponse_format is b64_json, each element in the data array contains the field: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
}
}