Dedicated.Image

Image edits

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

post/dedicated/v1/images/edits

Request

Headers

X-Friendli-Teamstring nullable

ID of team to run requests as (optional parameter).

Request body

promptstring required

A text description of the desired image(s).

modelstring required

ID of target endpoint. If you want to send request to specific adapter, use the format "YOUR_ENDPOINT_ID:YOUR_ADAPTER_ROUTE". Otherwise, you can just use "YOUR_ENDPOINT_ID" alone.

num_inference_stepsinteger

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

guidance_scalenumber nullable

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. This parameter may be irrelevant for certain models, such as FLUX.Schnell.

seedinteger nullable

The seed to use for image generation.

response_format'url' | 'raw' | 'png' | 'jpeg' | 'jpg' nullable

The format in which the generated image(s) will be returned. One of url(default), raw, png, jpeg, and jpg.

Example request

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

Response

Successfully edited image(s).

Changes

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