Edit images with mask using gpt-image-1 model
POST /v1/images/edits
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model ID: gpt-image-1 |
| prompt | string | Yes | Text describing the desired edit |
| image | file/string | Yes | The image to edit, can be a file upload or URL |
| mask | file/string | No | Mask image specifying the area to edit (transparent areas will be modified) |
| n | integer | No | Number of images to generate, default 1 |
| size | string | No | Image size, default 1024x1024 |
| Field | Type | Description |
|---|---|---|
| created | integer | Creation timestamp |
| data | array | List of edited images |
| data[].url | string | Image URL |
| data[].revised_prompt | string | Model’s revised prompt |