Skip to main content

ImageEditRequestSchema

modelstringrequired

ID of the image-to-image model to use, such as FLUX.1-Kontext-dev. Use the model_name from List base models; the model must support the image-to-image modality.

promptstringrequired

Text description of the edit to apply to the source image.

image_urlstring

URL or S3 filename of the source image to edit. Pass the filename returned by Get image upload URL after uploading, or a publicly reachable image URL.

Default: null
image_urlsstring[]

Multiple source images to edit, as URLs or S3 filenames returned by Get image upload URL. Use instead of image_url when the model accepts several inputs.

Default: null
negative_promptstring

Text describing what to exclude from the result.

Default: null
image_sizestring

Output image size, as an aspect-ratio preset or an explicit WIDTHxHEIGHT value.

Enum ValueDescription
square_hdSquare output, high resolution.
squareSquare output (1:1).
portrait_4_3Portrait output, 3:4 aspect ratio.
portrait_16_9Portrait output, 9:16 aspect ratio.
landscape_4_3Landscape output, 4:3 aspect ratio.
landscape_16_9Landscape output, 16:9 aspect ratio.
Default: square_hd
num_imagesinteger

Number of images to generate.

Default: 1
num_inference_stepsinteger

Number of denoising steps. Higher values can improve quality at the cost of speed.

Default: null
guidance_scalenumber

How closely the result follows the prompt. Higher values follow the prompt more strictly.

Default: null
output_formatstring

Format of the returned image.

Enum ValueDescription
pngReturns a lossless PNG image.
jpegReturns a smaller, lossy JPEG image.
webpReturns a compact WebP image.

Possible values: [png, jpeg, webp]

Default: null
presetstring

Named quality or style preset, when supported by the model.

Default: null
ImageEditRequestSchema
{
"model": "string",
"prompt": "string",
"image_url": null,
"image_urls": [
"string"
],
"negative_prompt": null,
"image_size": "square_hd",
"num_images": 1,
"num_inference_steps": null,
"guidance_scale": null,
"output_format": "png",
"preset": null
}