POST
/
images
/
variations
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
{
  "created": 123,
  "data": [
    {
      "b64_json": "<string>",
      "url": "<string>",
      "revised_prompt": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data

Response

200 - application/json

OK

The response is of type object.