Create image variation
POST/images/variations
Creates a variation of a given image. This endpoint only supports dall-e-2.
Body ParametersForm Data
image: file
The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
user: optional string
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
Create image variation
curl https://api.openai.com/v1/images/variations \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-F image="@otter.png" \
-F n=2 \
-F size="1024x1024"
{
"created": 1589478378,
"data": [
{
"url": "https://..."
},
{
"url": "https://..."
}
]
}
Returns Examples
{
"created": 1589478378,
"data": [
{
"url": "https://..."
},
{
"url": "https://..."
}
]
}