Text-to-Image
AI-generatedSummary
Generate an image from a textual prompt using a selected Flux model with configurable options for aspect ratio, resolution, generation steps, guidance scale, and seed. Optionally wait for the generation task to complete and receive results synchronously or use a webhook for asynchronous notification.
Inputs
- Model (required) — Select between 'Flux 2 Pro' and 'Flux 2 Flex' models for text-to-image generation.
- Prompt (required) — Text prompt describing the desired image content.
- Aspect Ratio (required) — Choose the output image aspect ratio (e.g., 1:1, 16:9, 9:16, 4:3, 3:4).
- Seed — Numerical seed to control randomness; use 0 to generate a random seed.
- Resolution (required) — Output image resolution, either '1K' or '2K'.
- Steps (required) — Number of iterative steps used in image generation (1 to 50).
- Guidance Scale (required) — Controls how closely the model follows the prompt, from 1 to 20 (default 3.5).
- Reply URL — Optional webhook URL to receive a callback when the generation task completes.
- Reply Ref — Custom reference string included in webhook callback for identifying the request.
- Wait for Completion (required) — Boolean flag to either wait synchronously for the generation to finish or return immediately with task info.
Output shape
a single JSON object per input item containing the generation task response, including image URLs and metadata upon completion if waiting, or task details if asynchronous.
If 'Wait for Completion' is enabled, the operation polls the Kie.ai API every 3 seconds for up to 5 minutes to retrieve the final generation result. If disabled, the response includes a task ID suitable for later status querying. Webhook-based notifications can be used via 'Reply URL' for asynchronous workflows.