Skip to main content
POST
/
v1
/
images
/
edits
Image edits
curl --request POST \
  --url http://localhost:8000/v1/images/edits \
  --header 'Content-Type: application/json' \
  --data '
{
  "guidance_scale": 0,
  "image": "@/path/to/file/image.png",
  "num_inference_steps": 20,
  "prompt": "Add a red sports car in the foreground."
}
'
{
  "image": "<base64 encoded image>"
}
Given an image and a description, the model edits the image.

Body

application/json
image
ImageInput · object
required

The image(s) to edit. Must be in a supported image format.

prompt
string
required

A text description of the desired image.

model
string | null

Routes the request to a specific adapter.

Example:

"(adapter-route)"

num_inference_steps
integer
default:20

The number of inference steps to use during image generation. Defaults to 20. Supported range: [1, 50].

guidance_scale
number
default:0

Adjusts the alignment of the generated image with the input prompt. Higher values (e.g., 8-10) make the output more faithful to the prompt, while lower values (e.g., 1-5) encourage more creative freedom. Defaults to 0. This parameter may be irrelevant for certain models, such as FLUX.Schnell.

seed
integer | null

The seed to use for image generation.

response_format
enum<string> | null
default:jpeg

The format in which the generated image will be returned. One of raw and jpeg.

Available options:
raw,
jpeg

Response

Successfully edited image.

image
file
required

The base64-encoded image.