v1

latestOpenAPI 3.0.32026-07-132681171.6 KB

Edit image

Edit or extend an existing image from a text prompt using image editing models. Accepts multipart/form-data (for file uploads) or application/json (with image references as base64 data URLs or file IDs).

post/v1/images/edits

Request body

modelstring required

The model to use for image editing

promptstring required

A text description of the desired edit

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

The size of the edited images. Defaults to auto.

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

The quality of the edited image. Defaults to auto.

Example request

{
  "model": "azure/openai/gpt-image-1",
  "prompt": "Make the sky a dramatic sunset",
  "size": "1024x1024"
}

Response

Image edit response

createdinteger required

The Unix timestamp of when the image was created

Example response

{
  "created": 1719000000
}