---
title: "Image edits"
method: POST
path: "/v1/images/edits"
tags: ["Container.Image"]
---

# Image edits

`POST /v1/images/edits`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/v1/images/edits`
- Auth: none declared
- TypeScript: <https://skmtc.dev/friendli/apis/friendli-suite-api-reference/docs/v1/images/edits/post.ts> (a function with typed inputs; its response is checked against the schema)

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

## Request body

- ContainerImageEditBody
  - `image` union, required: The image(s) to edit. Must be in a supported image format.
    - ImageInput
      - `image` string, required: An input image, provided either as a URL or a base64-encoded string. Maximum supported image size is 50 MiB.
    - ImageInput[]
      - `image` string, required: An input image, provided either as a URL or a base64-encoded string. Maximum supported image size is 50 MiB.
  - `prompt` string, required: A text description of the desired image.
  - `model` string, nullable: Routes the request to a specific adapter.
  - `num_inference_steps` integer: The number of inference steps to use during image generation. Defaults to 20. Supported range: [1, 50].
  - `guidance_scale` number: 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, 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`.

## Response `200`

Successfully edited image.

- ContainerImageEditSuccess
  - `image` string, binary, required: The base64-encoded image.

## Other responses

- `422`: Unprocessable Entity

---

[API](https://skmtc.dev/friendli/apis/friendli-suite-api-reference.md) - [All operations](https://skmtc.dev/friendli/apis/friendli-suite-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/friendli/apis/friendli-suite-api-reference/revisions/38fb43993a11?raw)
