curl --request POST \
--url https://api.openai.com/v1/images/variations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form model=dall-e-2 \
--form n=1 \
--form response_format=url \
--form size=1024x1024 \
--form user=user-1234 \
--form image=@example-file
{
"created": 123,
"data": [
{
"b64_json": "<string>",
"url": "<string>",
"revised_prompt": "<string>"
}
]
}
Creates a variation of a given image.
curl --request POST \
--url https://api.openai.com/v1/images/variations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form model=dall-e-2 \
--form n=1 \
--form response_format=url \
--form size=1024x1024 \
--form user=user-1234 \
--form image=@example-file
{
"created": 123,
"data": [
{
"b64_json": "<string>",
"url": "<string>",
"revised_prompt": "<string>"
}
]
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
OK
The response is of type object
.
Was this page helpful?