Container.Image

Image edits

Given an image and a description, the model edits the image.

post/v1/images/edits

Request

Request body

promptstring required

A text description of the desired image.

modelstring nullable

Routes the request to a specific adapter.

num_inference_stepsinteger

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

guidance_scalenumber

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.

seedinteger nullable

The seed to use for image generation.

response_format'raw' | 'jpeg' nullable

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

Example request

{
  "guidance_scale": 0,
  "image": "@/path/to/file/image.png",
  "num_inference_steps": 20,
  "prompt": "Add a red sports car in the foreground."
}

Response

Successfully edited image.

imagestring binary required

The base64-encoded image.

Changes

No recorded changes to this operation across all 1 revision of this API.