{
"model": "doubao-seedream-3-0-t2i-250415",
"prompt": "鱼眼镜头,一只猫咪的头部,画面呈现出猫咪的五官因为拍摄方式扭曲的效果。",
"response_format": "url",
"size": "1024x1024",
"seed": 12,
"guidance_scale": 2.5,
"watermark": false
}
curl --location --request POST 'https://api.302.ai/doubao/images/generations' \
--header 'Authorization: Bearer sk-jls4AaVBGoe1GwZD64qZA1qyKTN1MPHa4NmvH1cT68z7K1Zz' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "doubao-seedream-3-0-t2i-250415",
"prompt": "鱼眼镜头,一只猫咪的头部,画面呈现出猫咪的五官因为拍摄方式扭曲的效果。",
"response_format": "url",
"size": "1024x1024",
"seed": 12,
"guidance_scale": 2.5,
"watermark": false
}'
Field Name | Type | Description |
---|---|---|
model | string | The model ID used for this request (model name-version). |
created | integer | The Unix timestamp (in 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 be 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-3-0-t2i-250415",
"created": 1749720737,
"data": [
{
"url": "https://file.302.ai/gpt/imgs/1788db737a9b475c0f30aeca66a26af6.jpg"
}
],
"usage": {
"generated_images": 1
}
}