Image models
FLUX.2
On this page
FLUX.2 — fast, high-fidelity AI image generation & editing.
| modelId | flux-2-pro-text-to-image, flux-2-pro-image-to-image, flux-2-flex-text-to-image, flux-2-flex-image-to-image |
| Modality | image |
| Pricing | See this model on the Pricing page for the current per-call price (with your markup). |
Operations
| Operation | modelId | Endpoint | Required input |
|---|---|---|---|
| Pro Text To Image | flux-2-pro-text-to-image | POST /api/v1/generate | prompt, aspect_ratio, resolution |
| Pro Image To Image | flux-2-pro-image-to-image | POST /api/v1/generate | input_urls, prompt, aspect_ratio, resolution |
| Flex Text To Image | flux-2-flex-text-to-image | POST /api/v1/generate | prompt, aspect_ratio, resolution |
| Flex Image To Image | flux-2-flex-image-to-image | POST /api/v1/generate | input_urls, prompt, aspect_ratio, resolution |
| Poll task | — | GET /api/v1/task/{id}?model=flux-2-pro-text-to-image | — |
Pro Text To Image — flux-2-pro-text-to-image
| Field | Type | Required | Values / example |
|---|---|---|---|
| prompt | string | Yes | Must be between 3 and 5000 characters. Max 5000 characters. (default: Hyperrealistic studio photo of a glass terrarium shaped like a vintage camera, a tiny forest growing inside, product lighting.) |
| aspect_ratio | string | Yes | Aspect ratio for the generated image. Select 'auto' to match the first input image ratio (requires input image). (options: 1:1 | 4:3 | 3:4 | 16:9 | 9:16 | 3:2 | 2:3) (default: 1:1) |
| resolution | string | Yes | Output image resolution. (options: 1K | 2K) (default: 1K) |
| nsfw_checker | boolean | No | A configurable parameter. Defaults to true in the Playground. (true/false) (default: true) |
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":"A photorealistic portrait of a red fox in a snowy forest, soft morning light, shallow depth of field, 85mm.","aspect_ratio":"1:1","resolution":"1K","nsfw_checker":true}}'Pro Image To Image — flux-2-pro-image-to-image
| Field | Type | Required | Values / example |
|---|---|---|---|
| input_urls | string[] | Yes | Input reference images (1-8 images). (image URL) |
| prompt | string | Yes | Must be between 3 and 5000 characters. Max 5000 characters. (default: Restyle this into a textured oil painting of a weathered fisherman mending his nets on the dock at dawn, thick impasto brushwork and a warm, salt-worn harbor palette.) |
| aspect_ratio | string | Yes | Aspect ratio for the generated image. Select 'auto' to match the first input image ratio (requires input image). (options: 1:1 | 4:3 | 3:4 | 16:9 | 9:16 | 3:2 | 2:3 | auto) (default: 4:3) |
| resolution | string | Yes | Output image resolution. (options: 1K | 2K) (default: 1K) |
| nsfw_checker | boolean | No | A configurable parameter. Defaults to true in the Playground. (true/false) (default: true) |
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-image-to-image","input":{"input_urls":["https://example.com/input.jpg"],"prompt":"A photorealistic portrait of a red fox in a snowy forest, soft morning light, shallow depth of field, 85mm.","aspect_ratio":"4:3","resolution":"1K","nsfw_checker":true}}'Flex Text To Image — flux-2-flex-text-to-image
| Field | Type | Required | Values / example |
|---|---|---|---|
| prompt | string | Yes | Must be between 3 and 5000 characters. Max 5000 characters. (default: A tower of pastel macarons stacked on a pale marble slab, soft window light raking across their crisp shells, scattered crumbs and one bitten macaron in the foreground, shallow depth of field, editorial food photography.) |
| aspect_ratio | string | Yes | Aspect ratio for the generated image. Select 'auto' to match the first input image ratio (requires input image). (options: 1:1 | 4:3 | 3:4 | 16:9 | 9:16 | 3:2 | 2:3) (default: 1:1) |
| resolution | string | Yes | Output image resolution. (options: 1K | 2K) (default: 1K) |
| nsfw_checker | boolean | No | A configurable parameter. Defaults to true in the Playground. (true/false) (default: true) |
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-flex-text-to-image","input":{"prompt":"A photorealistic portrait of a red fox in a snowy forest, soft morning light, shallow depth of field, 85mm.","aspect_ratio":"1:1","resolution":"1K","nsfw_checker":true}}'Flex Image To Image — flux-2-flex-image-to-image
| Field | Type | Required | Values / example |
|---|---|---|---|
| input_urls | string[] | Yes | Input reference images (1-8 images). (image URL) |
| prompt | string | Yes | Must be between 3 and 5000 characters. Max 5000 characters. (default: Transform this into stained glass — recast the subject in glowing colored panes with dark lead-line outlines, sunlight streaming through and scattering rainbow shards across a pale marble floor.) |
| aspect_ratio | string | Yes | Aspect ratio for the generated image. Select 'auto' to match the first input image ratio (requires input image). (options: 1:1 | 4:3 | 3:4 | 16:9 | 9:16 | 3:2 | 2:3 | auto) (default: 1:1) |
| resolution | string | Yes | Output image resolution. (options: 1K | 2K) (default: 1K) |
| nsfw_checker | boolean | No | A configurable parameter. Defaults to true in the Playground. (true/false) (default: true) |
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-flex-image-to-image","input":{"input_urls":["https://example.com/input.jpg"],"prompt":"A photorealistic portrait of a red fox in a snowy forest, soft morning light, shallow depth of field, 85mm.","aspect_ratio":"1:1","resolution":"1K","nsfw_checker":true}}'