Images
Image Variations
POST
Image Variations
Creates a variation of a given image.
This endpoint only supports
dall-e-2.
Method Signature
Parameters
file
required
The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
string
The model to use for image generation. Only
dall-e-2 is supported at this time.integer
The number of images to generate. Must be between 1 and 10.
string
The format in which the generated images are returned. Must be one of
url or b64_json. URLs are only valid for 60 minutes after the image has been generated.string
The size of the generated images. Must be one of:
256x256512x5121024x1024
string
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
Returns
Returns anImagesResponse object containing the image variations.
integer
The Unix timestamp (in seconds) of when the image was created.
array
The list of generated images.
Examples
Create variations with URL response
Create variations with base64 response
Multiple smaller variations
Image Variations