Skip to main content
POST
Upstream, this endpoint only supports dall-e-2. GPT image models do not implement it. To vary an image with a GPT image model, send the source to POST /v1/images/edits with a prompt describing the variation you want.
Returns new images derived from a source image, with no prompt. Always multipart/form-data.
file
required
Source image. Must be a square PNG under 4 MB.
string
default:"dall-e-2"
Only dall-e-2 implements variations.
integer
default:"1"
Number of variations, 1–10.
string
default:"1024x1024"
256x256, 512x512, or 1024x1024.
string
default:"url"
url or b64_json. URLs expire about 60 minutes after generation, so download promptly.
string
Stable end-user identifier.
integer
Unix timestamp of the generation.
array
One entry per variation, carrying url or b64_json depending on response_format.

Errors

Same envelope as Errors. A non-square or oversized source returns 400; a model that does not implement variations returns the upstream’s error unchanged.