Skip to main content
POST
Edit an image

Authorizations

Authorization
string
header
required

A workspace API key in an Authorization: Bearer header. A missing header, a scheme other than Bearer, a key of the wrong shape, and a key we reject are all 401.

Body

multipart/form-data

The upload. Accepted controls beyond these depend on the model.

model
string
required

The exact provider-qualified ID from GET /v1/models, for a model whose endpoint_families include image_edits.

Example:

"openai/gpt-image-1"

image
file
required

The image to edit.

prompt
string
required

What to change.

Example:

"Make the door blue."

n
integer

How many images to request. The hold is sized from it.

Required range: x >= 1
Example:

1

size
string

Model-specific output size.

Example:

"1024x1024"

Response

The provider's image list, relayed unchanged apart from platform headers. The charge is the images returned at the model's per-image rate, never above the hold sized from n.