Image Edits
Edit existing images using AI
Create variations or edits of existing images using AI models.
Edit Images
POST /images/edits
Create edited or extended versions of an existing image.
Request Body
The image to edit. Must be a valid PNG file, less than 4MB, and square.
Additional image whose fully transparent areas indicate where image should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as image.
A text description of the desired image(s)
The model to use for image editing (currently only “dall-e-2”)
Number of images to generate (1-10)
Size of the generated images (“256x256”, “512x512”, “1024x1024”)
Format of the generated images (“url” or “b64_json”)
Response
Returns an array of image objects with URLs or base64-encoded images.
Example
Image Variations
POST /images/variations
Create variations of an existing image.
Request Body
The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
The model to use for generating variations (currently only “dall-e-2”)
Number of images to generate (1-10)
Size of the generated images (“256x256”, “512x512”, “1024x1024”)
Format of the generated images (“url” or “b64_json”)
Authorizations
Enter your API key (starts with 'ek-')
Body
Response
Success
The response is of type object
.