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

# Image generations

`POST /dedicated/v1/images/generations`

## Request

- Base URL: `https://api.friendli.ai`
- URL: `https://api.friendli.ai/dedicated/v1/images/generations`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/friendli/apis/friendli-suite-api-reference/docs/dedicated/v1/images/generations/post.ts> (a function with typed inputs; its response is checked against the schema)

Given a description, the model generates image(s).

## Headers

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

## Request body

- DedicatedImageGenerationBody
  - `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.
  - `prompt` string, required: A text description of the desired image(s).
  - `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`.
  - `control_images` ImageInput[], nullable: Optional input images used to condition or guide the generation process (e.g., for ControlNet or image editing models). This field is only applicable when using ControlNet or image editing models.
    - `image` string, required: An input image, provided either as a URL or a base64-encoded string. Maximum supported image size is 50 MiB.
  - `controlnet_weights` number[], nullable: A list of weights that determine the influence of each ControlNet model in the generation process. Each value must be within [0, 1], where 0 disables the corresponding ControlNet and 1 applies it fully. When multiple ControlNet models are used, the list length must match the number of control images. If omitted, all ControlNet models default to full influence (1.0). This field is only applicable when using ControlNet models.

## Response `200`

Successfully generated image(s).

- DedicatedImageGenerateSuccess
  - `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)
