Overview
Creates an edited or extended image given an original image and a prompt. Requiresmultipart/form-data content type.
Request Body
The image to edit. Must be a valid PNG file, less than 4MB, and square. The image should have transparency where edits are desired.
A text description of the desired edit.
An additional image whose fully transparent areas indicate where the image should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as
image.The model to use for image edit. Currently only
dall-e-2 is supported.The number of images to generate. Must be between 1 and 10.
The size of the generated images. Must be one of
256x256, 512x512, or 1024x1024.The format in which the generated images are returned. Must be
url or b64_json.A unique identifier representing your end-user for abuse monitoring.
Response
Unix timestamp of when the images were created.
Array of generated images.Each object contains:
url(string): URL of the edited image (if response_format isurl)b64_json(string): Base64-encoded image (if response_format isb64_json)
Notes
Image edits are only available with DALL-E 2. The image must have transparent areas indicating where the edit should be applied, or you can provide a separate mask image.