Skip to main content
POST
Create image edit
/v1/images/edits accepts multipart/form-data and uploads reference images as files. If your references are already URLs or Data URLs, we recommend using Create image generation with image_urls for a more reliable asynchronous workflow.

Request URL

Upload at least one image file.

Single-image example

Multiple-image example

Upload up to nine reference images.

File fields

Response

On success, the endpoint returns the same structure as the generation endpoint:

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
prompt
string
required
model
string
default:gpt-image-2
size
string
resolution
string
image
file
image[]
file[]
Maximum array length: 9
mask
file

Response

Image edit result

created
integer
Example:

1777080000

task_id
string
Example:

"img_xxx"

data
object[]