# FLUX.2 [flex] API (Black Forest Labs)

> FLUX.2 [flex] lets you tune sampling steps and guidance for the best typography and fine detail, up to 4 megapixels.

Page: https://cheapergen.com/models/bfl/flux-2-flex · API reference: https://cheapergen.com/models/bfl/flux-2-flex/api

## Pricing
Official list price source: BFL API list price for FLUX.2 [flex] ($0.05 per megapixel of output and of input images). Prices verified 2026-10-16.

| Tier | Official | Cheaper Gen. | Save |
|---|---|---|---|
| 1 MP | $0.0500/image | $0.0440/image | 12% |
| 2 MP | $0.1000/image | $0.0880/image | 12% |
| 3 MP | $0.1500/image | $0.1320/image | 12% |
| 4 MP | $0.2000/image | $0.1760/image | 12% |

## Specs
- Resolutions: 1 · 2 · 3 · 4 MP
- Steps: 1–50
- Guidance: 1.5–10

## Endpoints

### Text to Image — `POST https://cheapergen.com/api/v1/run/bfl/flux-2-flex/text-to-image`

| Param | Type | Required | Description |
|---|---|---|---|
| prompt | string | yes | Describe the shot: subject, action, camera movement, lighting and style. |
| aspect_ratio | string (enum) (1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 21:9, 9:21) | no | Output image shape. |
| resolution | string (enum) (1MP, 2MP, 3MP, 4MP) | no | Output size in megapixels (1 MP ≈ 1024×1024). FLUX.2 is billed per megapixel. |
| steps | integer (1–50) | no | Sampling steps. More steps add detail and take longer (same price). |
| guidance | integer (1.5–10) | no | How closely the image follows the prompt (1.5–10). |
| prompt_upsampling | boolean | no | Let the model expand and rewrite the prompt before generating. |
| seed | integer | no | Use the same seed and settings to reproduce a result. Leave empty for random. |

```bash
curl -X POST https://cheapergen.com/api/v1/run/bfl/flux-2-flex/text-to-image \
  -H "Authorization: Bearer $CHEAPERGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "Editorial photo of a ceramic vase with dried flowers on a linen-covered table, soft north light, film grain",
  "aspect_ratio": "1:1",
  "resolution": "1MP"
}'
```

## Getting the result
Jobs are async. Poll `GET https://cheapergen.com/api/v1/generations/{id}` until status is succeeded/failed/canceled, or pass `webhook_url`. Failed generations are refunded automatically.

## FAQ
**How is FLUX.2 [flex] priced?**
FLUX.2 [flex] is billed per image by output megapixels, like Black Forest Labs' own API: a price for the first megapixel and a price for each additional one. Failed generations are not charged.

**Is this the official FLUX.2 [flex]?**
Yes. Requests run on Black Forest Labs' FLUX.2 [flex] model through official API channels, at a lower price than the BFL list price.

**Can I use the output commercially?**
Yes, outputs of the FLUX API models can be used commercially, subject to Black Forest Labs' terms and our Terms of Service.

FLUX.2 [flex] is developed by Black Forest Labs. Cheaper Gen. provides API access and does not own the model.