Skip to main content

ImageGenerationRequestSchema

modelstringrequired

ID of the text-to-image model to use, such as FLUX.1-schnell. Use the model_name from List base models; the model must support the text-to-image modality.

promptstringrequired

Text description of the image to generate.

negative_promptstring

Text describing what to exclude from the generated image.

Default: null
image_sizestring

Output image size, as an aspect-ratio preset or an explicit WIDTHxHEIGHT value.

Enum ValueDescription
square_hdSquare output, high resolution.
squareSquare output (1:1).
portrait_4_3Portrait output, 3:4 aspect ratio.
portrait_16_9Portrait output, 9:16 aspect ratio.
landscape_4_3Landscape output, 4:3 aspect ratio.
landscape_16_9Landscape output, 16:9 aspect ratio.
Default: square_hd
num_imagesinteger

Number of images to generate.

Default: 1
num_inference_stepsinteger

Number of denoising steps. Higher values can improve quality at the cost of speed.

Default: null
guidance_scalenumber

How closely the result follows the prompt. Higher values follow the prompt more strictly.

Default: null
seedinteger

Random seed for reproducible results.

Default: null
schedulerstring

Sampler or scheduler to use, when supported by the model.

Default: null
output_formatstring

Format of the returned image.

Enum ValueDescription
pngReturns a lossless PNG image.
jpegReturns a smaller, lossy JPEG image.
webpReturns a compact WebP image.

Possible values: [png, jpeg, webp]

Default: null
presetstring

Named quality or style preset, when supported by the model.

Default: null
ImageGenerationRequestSchema
{
"model": "string",
"prompt": "string",
"negative_prompt": null,
"image_size": "square_hd",
"num_images": 1,
"num_inference_steps": null,
"guidance_scale": null,
"seed": null,
"scheduler": null,
"output_format": "png",
"preset": null
}