Create variations of an existing image (DALL·E 2 only) Request
Example:Bearer {{YOUR_API_KEY}}
Body Params application/json
Text description of the target image. Maximum length is 1000 characters.
The number of images to generate. Must be between 1 and 10.
The size of the generated image. Must be one of 256x256, 512x512, or 1024x1024.
{
"prompt": "A colorful sunset over the mountains",
"n": 1,
"model": "dall-e-3",
"size": "1024x1024"
}
Request samples
curl --location --request POST 'https://api.302.ai/v1/images/variations' \
--header 'Authorization: Bearer sk-jls4AaVBGoe1GwZD64qZA1qyKTN1MPHa4NmvH1cT68z7K1Zz' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt": "A colorful sunset over the mountains",
"n": 1,
"model": "dall-e-3",
"size": "1024x1024"
}'
Responses
application/json {
"created": 1589478378,
"data": [
{
"url": "https://..."
},
{
"url": "https://..."
}
]
}
Modified at 2024-09-03 07:28:10