OpenAPI 3.1.0MITraw.githubusercontent.com2026-08-142881,4092.8 MB

111dd5cc1628

Images

Creates an edited or extended image given one or more source images and a prompt. This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`, `gpt-image-1-mini`, and `chatgpt-image-latest`) 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.

size'1024x1024' | '1024x1536' | '1536x1024'

The size of the image generated. Either 1024x1024, 1024x1536, or 1536x1024.

quality'low' | 'medium' | 'high'

The quality of the image generated. Either low, medium, or high.