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.
image_sizestring
Output image size, as an aspect-ratio preset or an explicit WIDTHxHEIGHT value.
| Enum Value | Description |
|---|---|
square_hd | Square output, high resolution. |
square | Square output (1:1). |
portrait_4_3 | Portrait output, 3:4 aspect ratio. |
portrait_16_9 | Portrait output, 9:16 aspect ratio. |
landscape_4_3 | Landscape output, 4:3 aspect ratio. |
landscape_16_9 | Landscape output, 16:9 aspect ratio. |
num_imagesinteger
Number of images to generate.
num_inference_stepsinteger
Number of denoising steps. Higher values can improve quality at the cost of speed.
guidance_scalenumber
How closely the result follows the prompt. Higher values follow the prompt more strictly.
seedinteger
Random seed for reproducible results.
schedulerstring
Sampler or scheduler to use, when supported by the model.
output_formatstring
Format of the returned image.
| Enum Value | Description |
|---|---|
png | Returns a lossless PNG image. |
jpeg | Returns a smaller, lossy JPEG image. |
webp | Returns a compact WebP image. |
presetstring
Named quality or style preset, when supported by the model.
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
}
Was this page helpful?