Skip to main content
POST
Edit image

Authorizations

Authorization
string
header
required

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

Body

multipart/form-data
model
string
required

Image model ID.

Example:

"gpt-image-2"

prompt
string
required

Edit or inpaint instruction.

image
file[]
required

Reference images. Send each file with the repeated field name image.

Required array length: 1 - 3 elements
size
string

Requested output size. Support depends on the selected model.

Example:

"1024x1024"

Response

Edited image response

data
object[]
required
Required array length: 1 element
usage
object