Resolution Level | Aspect Ratio | Width (px) | Height (px) |
---|---|---|---|
1K | 1:1 | 1024 | 1024 |
4:3 | 1152 | 864 | |
3:4 | 864 | 1152 | |
16:9 | 1280 | 720 | |
9:16 | 720 | 1280 | |
3:2 | 1248 | 832 | |
2:3 | 832 | 1248 | |
21:9 | 1512 | 648 | |
2K | 1:1 | 2048 | 2048 |
4:3 | 2304 | 1728 | |
3:4 | 1728 | 2304 | |
16:9 | 2560 | 1440 | |
9:16 | 1440 | 2560 | |
3:2 | 2496 | 1664 | |
2:3 | 1664 | 2496 | |
21:9 | 3024 | 1296 | |
4K | 1:1 | 4096 | 4096 |
4:3 | 4736 | 3552 | |
3:4 | 3552 | 4736 | |
16:9 | 5472 | 2072 | |
9:16 | 2072 | 5472 | |
3:2 | 5024 | 3360 | |
2:3 | 3360 | 5024 | |
21:9 | 6272 | 2688 |
{
"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 '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_json Note: 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
}
}