Edit and transform images based on text prompts
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
image | array | ✅ Yes | - | The images to edit. A maximum of 16 reference images can be uploaded. |
prompt | string | ✅ Yes | The cat is running on the grassland | A text description of the desired image(s). The maximum length is 32000 characters for gpt-image-1. |
mask | string | ❌ No | - | An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as image. |
n | integer | ❌ No | 1 | The number of images to generate. Must be between 1 and 10. |
quality | string | ❌ No | auto | The quality of the image that will be generated. Options: high, medium, low. Only supported for gpt-image-1. |
background | string | ❌ No | auto | Allows to set transparency for the background of the generated image(s). This parameter is only supported for gpt-image-1. Must be one of transparent, opaque or auto (default value). When auto is used, the model will automatically determine the best background for the image. |
enable_sync_mode | string | ❌ No | false | Whether to enable synchronous mode. Options: false, true |
response_format | string | ❌ No | b64_json | The format in which the generated images are returned. Must be one of url or b64_json. |