Container.Image

Image generations

Given a description, the model generates image.

post/v1/images/generations

Request

Request body

modelstring nullable

Routes the request to a specific adapter.

promptstring required

A text description of the desired image.

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.

controlnet_weightsnumber[] 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.

Example request

{
  "guidance_scale": 3.5,
  "num_inference_steps": 10,
  "prompt": "An orange Lamborghini driving down a hill road at night with a beautiful ocean view in the background."
}

Response

Successfully generated image.

imagestring binary required

The base64-encoded image.

Changes

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