Images

Creates an edited or extended image given one or more source images and a prompt. This endpoint supports GPT Image models and `dall-e-2`.

You can call this endpoint with either:

  • multipart/form-data: use binary uploads via image (and optional mask).
  • application/json: use images (and optional mask) as references with either image_url or file_id.

Note that JSON requests use images (array) instead of the multipart image field.

post/images/edits

Request body

EditImageBodyJsonParam required— unresolved $ref

Response

OK

createdinteger required

The Unix timestamp (in seconds) of when the image was created.

background'transparent' | 'opaque'

The background parameter used for the image generation. Either transparent or opaque.

output_format'png' | 'webp' | 'jpeg'

The output format of the image generation. Either png, webp, or jpeg.

quality'low' | 'medium' | 'high' | 'xhigh' | 'max'

The quality of the image generated. One of low, medium, high, xhigh, or max.

Changes