Skip to content
RU

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.

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.

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))
{
"model": "black-forest-labs/flux-2-pro",
"prompt": "Roastery banner: morning light, coffee beans, craft typography",
"size": "3072x1296"
}

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.

  • Seven frame formats, including the ultra-wide 21:9 and 9:21 for banners and covers.
  • Two resolutions: 1k (about a megapixel) and 2k (about four, up to 3072x1296).
  • Fourteen fixed size values — 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 quality knob — a size outside the model’s table returns 400.

All models — in the catalog. The general image workflow — images guide.