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

# Image edits

`POST /dedicated/v1/images/edits`

## Request

- Base URL: `https://api.friendli.ai`
- URL: `https://api.friendli.ai/dedicated/v1/images/edits`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/friendli/apis/friendli-suite-api-reference/docs/dedicated/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.

## Headers

- `X-Friendli-Team` string, nullable: ID of team to run requests as (optional parameter).

## Request body

- DedicatedImageEditBody
  - `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(s).
  - `model` string, 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_steps` integer: The number of inference steps to use during image generation. Defaults to 20. Supported range: [1, 50].
  - `guidance_scale` number, 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`.
  - `seed` integer, 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`.

## Response `200`

Successfully edited image(s).

- DedicatedImageEditSuccess
  - `data` union, required
    - UrlImageItem[]
      - `seed` integer, required: The seed used during image generation.
      - `response_format` 'url' | 'raw' | 'png' | 'jpeg' | 'jpg', required: The format of the generated image. One of `url(default)`, `raw`, `png`, `jpeg`, and `jpg`.
      - `url` string, required: The URL of the generated image.
    - B64ImageItem[]
      - `seed` integer, required: The seed used during image generation.
      - `response_format` 'url' | 'raw' | 'png' | 'jpeg' | 'jpg', required: The format of the generated image. One of `url(default)`, `raw`, `png`, `jpeg`, and `jpg`.
      - `b64_json` string, binary, required: The base64-encoded JSON of the generated 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)
