# FLUX.2 [klein] 4B API (Black Forest Labs)

> FLUX.2 [klein] 4B is Black Forest Labs' small, open (Apache-2.0) FLUX.2 model: sub-second text-to-image and editing with up to 4 reference images, at a fraction of a cent per image.

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

## Pricing
Official list price source: BFL API list price for FLUX.2 [klein] 4B ($0.014 for the first output megapixel, $0.001 per additional MP; input images at $0.001 / MP). Prices verified 2026-10-16.

| Tier | Official | Cheaper Gen. | Save |
|---|---|---|---|
| 1K | $0.0140/image | $0.0007/image | 95% |
| 2K | $0.0170/image | $0.0027/image | 84% |

## Specs
- Resolutions: 1K (≈1 MP) · 2K (≈4 MP)
- Aspect ratios: 1:1 · 4:3 · 3:4 · 16:9 · 9:16 · 3:2 · 2:3
- Edit inputs: Up to 4 images
- Weights: Open (Apache-2.0)

## Endpoints

### Text to Image — `POST https://cheapergen.com/api/v1/run/bfl/flux-2-klein-4b/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) | no | Output image shape. |
| resolution | string (enum) (1K, 2K) | no | 1K ≈ 1 MP; 2K ≈ 4 MP (long side up to 2048 px). |
| 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-klein-4b/text-to-image \
  -H "Authorization: Bearer $CHEAPERGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "A cozy coffee shop interior with vintage furniture, morning light, photo",
  "aspect_ratio": "1:1",
  "resolution": "1K"
}'
```

### Image Edit — `POST https://cheapergen.com/api/v1/run/bfl/flux-2-klein-4b/edit`

| Param | Type | Required | Description |
|---|---|---|---|
| prompt | string | yes | Describe the shot: subject, action, camera movement, lighting and style. |
| image_urls | string[] (URLs) | yes | Up to 4 reference images to edit or combine. Refer to them as "image 1", "image 2"… in the prompt. |
| aspect_ratio | string (enum) (1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3) | no | Output image shape. |
| resolution | string (enum) (1K, 2K) | no | 1K ≈ 1 MP; 2K ≈ 4 MP (long side up to 2048 px). |
| 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-klein-4b/edit \
  -H "Authorization: Bearer $CHEAPERGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "Turn the room in image 1 into a snowy winter cabin; keep the furniture layout",
  "image_urls": [
    "https://cdn.cheapergen.com/samples/portrait.jpg"
  ],
  "aspect_ratio": "1:1",
  "resolution": "1K"
}'
```

## 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 [klein] 4B priced?**
Per image by output size (megapixels) — a fraction of a cent at 1K. Failed generations are not charged.

**Is this Black Forest Labs' model?**
Yes. FLUX.2 [klein] 4B is BFL's open-weights (Apache-2.0) model, served on an optimized inference engine for open-source models.

**Can I use the output commercially?**
Yes — the 4B weights are Apache-2.0 — subject to our Terms of Service.

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