| Parameter Name | Type | Required | Description |
|---|---|---|---|
image | File or Array of Files | ✅ | The image to be edited. Must be a supported image file or array. - gpt-image-1: PNG, WEBP, or JPG, each less than 25MB. - dall-e-3: A square PNG, less than 4MB. |
prompt | String | ✅ | A textual description of the desired image. - Max length: 1000 characters for dall-e-3, 32000 characters for gpt-image-1. |
mask | File | An optional PNG mask image. Transparent areas (alpha=0) indicate areas that need editing. Must match the image dimensions and be smaller than 4MB. Applies to the first image. | |
model | string | Model to use: dall-e-3 or gpt-image-1. | |
n | integer or null | Number of images to generate. Must be between 1 and 10. Default: 1. | |
quality | string or null | Applies only to gpt-image-1. Possible values: high, medium, low. Default: auto. | |
response_format | string or null | Response format. Possible values: url or b64_json. Only dall-e-3 supports url (valid for 60 minutes). | |
size | string or null | Image size: - gpt-image-1: 1024x1024, 1536x1024, 1024x1536, auto (default) - dall-e-2: 256x256, 512x512, 1024x1024 |