Skip to main content
POST
Edit Images

Authorizations

Authorization
string
header
required

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

Body

multipart/form-data

Source image(s), optional mask, prompt, and edit options.

model
string
required

The model to use for image generation.

image
required

The image(s) to edit. Must be a supported image file or an array of images.

prompt
string
required

A text description of the desired image(s).

background
string | null

Allows to set transparency for the background of the generated image(s).

input_fidelity
string | null

Control how much effort the model will exert to match the style and features of input images.

mask
string | null

An additional image whose fully transparent areas indicate where image should be edited.

n
integer | null

The number of images to generate. Must be between 1 and 10.

output_compression
integer | null

The compression level (0-100%) for the generated images.

output_format
string | null

The format in which the generated images are returned.

partial_images
integer | null

The number of partial images to generate. Used for streaming responses.

quality
string | null

The quality of the image that will be generated.

response_format
string | null

The format in which generated images are returned. Must be one of url or b64_json.

size
string | null

The size of the generated images.

stream
boolean | null

Edit the image in streaming mode.

user
string | null

A unique identifier representing your end-user.

Response

Edited images.

created
number
required

Unix timestamp when the image was generated.

data
object[]
required

Generated images.