Flux 2 Pro
Flux 2 Pro (black-forest-labs/flux-2-pro) is Black Forest Labs’ flagship for image generation. It works with two endpoints: POST /v1/images/generations for text-to-image and POST /v1/images/edits for working from a reference image. The model is paid — generations are charged from your balance.
Parameters
Section titled “Parameters”| Field | Description |
|---|---|
model |
black-forest-labs/flux-2-pro (or the short flux-2-pro) |
prompt |
What to draw, required |
n |
How many images, 1 to 4; each one is billed separately |
aspect_ratio |
1:1, 2:3, 3:2, 9:16, 9:21, 16:9, 21:9; defaults to 1:1 |
resolution |
1k or 2k; defaults to 1k |
size |
Explicit WxH — an alternative to the aspect_ratio + resolution pair |
quality |
The model has no such knob: passing the parameter returns 400 |
The model thinks in “aspect ratio + resolution” terms, and WxH is derived from them: 1k yields roughly a megapixel of area, 2k — roughly four. Mappings for common combinations:
| Aspect | 1k | 2k |
|---|---|---|
1:1 |
1024x1024 |
2048x2048 |
16:9 |
1344x768 |
2688x1520 |
9:16 |
768x1344 |
1520x2688 |
21:9 |
1568x672 |
3072x1296 |
9:21 |
672x1568 |
1296x3072 |
The full list of 14 allowed size values is the sizes field in the catalog; a value outside the list returns 400.
Examples
Section titled “Examples”Text-to-image
Section titled “Text-to-image”import base64
img = client.images.generate( model="black-forest-labs/flux-2-pro", prompt="Sneaker design concept on a last, studio light, clean background", extra_body={"aspect_ratio": "3:2", "resolution": "2k"},)with open("sneaker.png", "wb") as f: f.write(base64.b64decode(img.data[0].b64_json))curl https://api.mixen.ai/v1/images/generations \ -H "Authorization: Bearer $MIXEN_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "black-forest-labs/flux-2-pro", "prompt": "Sneaker design concept on a last, studio light, clean background", "aspect_ratio": "3:2", "resolution": "2k" }'A wide banner with an explicit size
Section titled “A wide banner with an explicit size”{ "model": "black-forest-labs/flux-2-pro", "prompt": "Roastery banner: morning light, coffee beans, craft typography", "size": "3072x1296"}Editing from a reference
Section titled “Editing from a reference”The model accepts reference images (references: true), so /v1/images/edits with multipart/form-data is available:
curl https://api.mixen.ai/v1/images/edits \ -H "Authorization: Bearer $MIXEN_API_KEY" \ -F model=black-forest-labs/flux-2-pro \ -F image=@sketch.png \ -F prompt="Turn the sketch into a photoreal render, keep the studio background"The answer always carries b64_json — files are not hosted. Both endpoints answer synchronously; set your HTTP client timeout to at least 120 seconds.
4.0108 ₽ ($0.045) per image — the flat catalog price. Current values — catalog.
Strengths and limits
Section titled “Strengths and limits”- Seven frame formats, including the ultra-wide
21:9and9:21for banners and covers. - Two resolutions:
1k(about a megapixel) and2k(about four, up to3072x1296). - Fourteen fixed
sizevalues — one per “aspect + resolution” pair. - Editing from a reference via
/v1/images/edits— the same key and syntax as generation. - Nearby in the catalog: Flux 2 Flex at 8.0216 ₽ ($0.09) and Flux 2 Max at 9.3585 ₽ ($0.105) per image; the family shares the same parameter set.
- Balance only; no
qualityknob — a size outside the model’s table returns400.
All models — in the catalog. The general image workflow — images guide.