Generate an image from a text prompt using FLUX.2 [flex]. Offers fine-grained control over inference steps and guidance scale. Returns the result synchronously as base64-encoded JSON.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Model ID
flux-2-flex "flux-2-flex"
Text description of the image to generate.
"A cute baby polar bear"
Number of images to generate.
1 <= x <= 4Output image size, e.g. 1024x1024. Supports up to 4MP resolution.
"1024x1024"
Number of sampling steps. Low (6–20) for fast prototyping, high (40–50) for maximum fidelity.
1 <= x <= 50Guidance scale. Controls how closely the model follows the prompt. Higher values produce more prompt-faithful results.
1.5 <= x <= 10Output image format.
jpeg, png "jpeg"
Random seed for reproducible generation.