Image models
FLUX.2
On this page
FLUX.2 — fast, high-fidelity AI image generation & editing.
| modelId | flux-2-pro-text-to-image |
| Modality | image |
| Pricing | See this model on the Pricing page for the current per-call price (with your markup). |
Operations
| Operation | Endpoint | Description |
|---|---|---|
| Text to image | POST /api/v1/generate | Base generation from a text prompt. |
| Poll task | GET /api/v1/task/{id}?model=flux-2-pro-text-to-image | Retrieve state and result URLs. |
Input parameters
| Field | Type | Required | Values / example |
|---|---|---|---|
| prompt | textarea | required | Enter your image description... |
| aspect_ratio | select | required | 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3 |
| resolution | select | required | 1K, 2K |
| nsfw_checker | select | optional | false, true |
Example request
bash
curl -X POST https://you.bot/api/v1/generate \
-H "Authorization: Bearer $YOUBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"modelId":"flux-2-pro-text-to-image","input":{"prompt":"Hyperrealistic studio photo of a glass terrarium shaped like a vintage camera, a tiny forest growing inside, product lighting.","aspect_ratio":"1:1","resolution":"1K","nsfw_checker":"true"}}'