Flux 2 Pro: API, Pricing and Code Examples (2026)
Unicorn API Team · · 11 min read
Flux 2 Pro is Black Forest Labs’ production image model from the Flux.2 generation, built for photoreal detail and close prompt following, and it is the variant most teams pick when an image has to look like a real photograph on the first attempt. This article covers what the model is, how it differs from the other Flux.2 variants people search for, what each image costs, how to call it from code, and the mistakes that waste credits. All Unicorn API prices and parameters below reflect the model catalog as of October 2026.
What is Flux 2 Pro?
Flux 2 Pro is a text-to-image model: you describe a picture in ordinary language and it returns an image that matches the description. Black Forest Labs, the German lab behind the original Flux models, released it on 27 November 2025 as part of the Flux.2 series. Like most modern image generators, it works in the diffusion style: it starts from random noise and refines it, step by step, toward an image consistent with your prompt.
On Unicorn API the model is listed as Flux 2 Pro with the id flux-2-pro. Its defining traits are:
- Photoreal detail. Skin, fabric, metal, glass and natural light are where it is strongest. It is a natural fit for product shots, editorial-style scenes and anything meant to pass as photography.
- Strong prompt following. “Prompt adherence” means how faithfully a model renders what you asked for: the right number of objects, the right colours, the right composition. Flux 2 Pro is tuned to take long, specific prompts literally.
- Up to 8 reference images. You can pass reference pictures so the output keeps a product, character or style consistent.
- Two resolutions. 1K for drafts and smaller placements, 2K for final assets.
- Five aspect ratios. 16:9, 1:1, 9:16, 21:9 and 4:3.
The “Pro” in the name marks its place in the lineup. It is the managed, production model you call through an API, as opposed to the open-weight variants you download and run on your own GPU. That distinction matters when you are choosing between the variants, which is the next question most searchers have.
Flux 2 Pro, Flex, Dev and Klein: how the family fits together
Black Forest Labs shipped Flux.2 as a family rather than a single model. The names show up together in search results, so it helps to see them side by side.
| Variant | What it is | On Unicorn API |
|---|---|---|
| Flux 2 Pro | Managed production model: photoreal output, prompt following, up to 8 reference images | Yes: flux-2-pro, 5 credits at 1K, 7 at 2K |
| Flux 2 Flex | Managed model offered as separate text-to-image and image-to-image endpoints, with an NSFW checker setting | Yes: 14 credits at 1K, 24 at 2K |
| Flux 2 Dev | Open-weight model for self-hosting and experimentation | Not offered |
| Flux 2 Klein | Small open-weight models under the Apache 2.0 licence (“Klein” is German for small) | Not offered; the newer Flux 3 Klein is |
| Flux 3 Klein | Newer compact model, released 20 October 2026, with text-to-image and edit endpoints | Yes: from 1.6 credits per image at 1K |
If you arrived searching “flux 2 klein 9b” or “flux 2 dev”, you are probably looking for weights you can run locally. Those are a different path from the hosted Pro model: you manage the GPU, the inference code and the scaling yourself, and in return you get full control. If you want images from an HTTP request without running hardware, the hosted models in the table are the practical route.
One detail surprises people: on Unicorn API, Flux 2 Flex Text To Image costs about 3x what Flux 2 Pro costs at 1K (14 credits against 5). A higher price does not mean higher quality here. Pick Flex when you specifically want its split endpoints or the NSFW checker control, and use Pro as the default for photoreal work.

How much does Flux 2 Pro cost?
Flux 2 Pro is priced per output image in credits. A 1K image costs 5 credits and a 2K image costs 7 credits. If you set the n field to generate several images in one request, the price is multiplied by n.
Credits cost $0.01 each on a monthly plan and $0.015 each as top-ups. Top-up credits never expire, which suits bursty projects. Here is what common requests come to:
| Request | Credits | On a monthly plan | With top-up credits |
|---|---|---|---|
| 1 image at 1K | 5 | $0.05 | $0.075 |
| 1 image at 2K | 7 | $0.07 | $0.105 |
4 images at 1K (n: 4) | 20 | $0.20 | $0.30 |
4 images at 2K (n: 4) | 28 | $0.28 | $0.42 |
And here is what each monthly plan buys if you spend it all on Flux 2 Pro:
- Starter, $25 (2,500 credits): 500 images at 1K, or 357 at 2K.
- Creator, $50 (5,000 credits): 1,000 at 1K, or 714 at 2K.
- Studio, $100 (10,000 credits): 2,000 at 1K, or 1,428 at 2K.
- Pro, $200 (20,000 credits): 4,000 at 1K, or 2,857 at 2K.
A worked budget example
Say you are producing lifestyle images for a 200-product catalogue. You generate 4 options per product at 1K to choose a direction (800 images, 4,000 credits), then render one final per product at 2K (200 images, 1,400 credits). The total is 5,400 credits. A Creator plan covers 5,000 of them, and the remaining 400 credits as a top-up cost $6. That is about $56 for 1,000 generated images, with 200 finished at 2K.
Because the same key works for every model, you can also mix cheaper models into the drafting stage, covered in the comparison below. Before running a large batch, call POST /v1/models/price to get the exact cost of a request; the request format is in the API documentation.
How to call the Flux 2 Pro API
Media models on Unicorn API run as jobs. You create a job with POST /v1/jobs, poll GET /v1/jobs/{id} until its status is succeeded, then read the image URL from outputs[0].url. Generation takes a few seconds or more, so this pattern keeps your HTTP calls short and avoids timeouts.
Step 1: get a key
Create an API key on the keys page and export it in your shell:
export UNICORN_API_KEY="your-key-here"
Step 2: create a job with curl
The smallest valid Flux 2 Pro request needs only a prompt. Here it is with resolution and aspect ratio set explicitly:
curl -X POST https://api.unicornapi.net/v1/jobs \
-H "Authorization: Bearer $UNICORN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "flux-2-pro",
"input": {
"prompt": "A red fox resting in a snowy forest at dawn, soft light, highly detailed",
"resolution": "2K",
"aspect_ratio": "16:9"
}
}'
The response contains the job’s id. Check on it with:
curl https://api.unicornapi.net/v1/jobs/JOB_ID \
-H "Authorization: Bearer $UNICORN_API_KEY"
Step 3: a complete Python script
This script creates a job, polls with a timeout, and downloads every output. It supports n and optional reference images.
import os
import time
import requests
API = "https://api.unicornapi.net"
HEADERS = {"Authorization": f"Bearer {os.environ['UNICORN_API_KEY']}"}
def generate(prompt, resolution="2K", aspect_ratio="16:9", n=1, ref_images=None):
body = {
"model": "flux-2-pro",
"input": {
"prompt": prompt,
"resolution": resolution,
"aspect_ratio": aspect_ratio,
"n": n,
},
}
if ref_images:
body["input"]["ref_images"] = ref_images # up to 8
resp = requests.post(f"{API}/v1/jobs", json=body, headers=HEADERS, timeout=30)
resp.raise_for_status()
job_id = resp.json()["id"]
deadline = time.time() + 300 # give up after 5 minutes
while time.time() < deadline:
job = requests.get(f"{API}/v1/jobs/{job_id}", headers=HEADERS, timeout=30).json()
if job["status"] == "succeeded":
return [output["url"] for output in job["outputs"]]
if job["status"] == "failed":
raise RuntimeError(f"Job {job_id} failed: {job}")
time.sleep(3)
raise TimeoutError(f"Job {job_id} did not finish in time")
if __name__ == "__main__":
urls = generate(
"A red fox resting in a snowy forest at dawn, soft light, highly detailed",
resolution="1K",
aspect_ratio="4:3",
n=2,
)
for i, url in enumerate(urls):
image = requests.get(url, timeout=60)
image.raise_for_status()
with open(f"fox_{i}.png", "wb") as f:
f.write(image.content)
print("saved", f"fox_{i}.png")
That request costs 10 credits: 5 per 1K image, times n: 2. If you would rather work from an AI coding assistant, the same models are available from Cursor, Claude Code and other tools through MCP. To try prompts before writing code, use the image playground.

Using reference images with Flux 2 Pro
Reference images are the feature that moves Flux 2 Pro from “nice pictures” to “usable in production”. A single prompt cannot reliably describe the exact shape of your product, the face of a recurring character or a brand’s colour grade. A reference picture can.
Common uses:
- Product consistency: pass two or three clean shots of the product, then prompt for new settings: on a marble counter, in a gym bag, on a beach towel.
- Character consistency: keep the same person or mascot across a storyboard or a set of ads.
- Style matching: supply a frame from an existing campaign so new images share its lighting and palette.
A few practices make references work better:
- Say what each reference is for. “Use the bottle from the reference photos, placed on a wet slate surface, lit like the moody reference frame” gives the model a clear job for each input.
- Use clean references. A product on a plain background transfers more faithfully than one lost in a busy scene.
- Do not fill all 8 slots by default. Eight loosely related images give the model conflicting signals. Two to four focused references usually beat eight mixed ones.
- Check the accepted formats. The documentation lists how
ref_imagesexpects images to be supplied.
If your goal is to change one existing image, such as swapping a background or adjusting a detail, rather than compose a new scene, an edit model fits better. Flux 3 Klein Edit Image and Flux 2 Flex Image To Image both take a source image and a prompt describing the change.
How to prompt Flux 2 Pro for photoreal images
Flux 2 Pro reads full sentences well, so write prompts the way you would brief a photographer, not as a pile of comma-separated tags. A structure that works consistently:
- Subject: what is in the frame, with specific attributes.
- Setting: where it is and what surrounds it.
- Light: time of day, direction, quality (soft, hard, diffused).
- Camera: framing, angle, lens feel, depth of field.
- Constraints: what must or must not appear.
Worked example: from vague to specific
A weak prompt:
coffee cup, cozy, aesthetic, 4k, best quality
A strong prompt for the same idea:
A matte white ceramic coffee cup with a thin chip on the rim, filled with black coffee, on a weathered oak table beside a rain-streaked window. Early morning, soft grey daylight from the left, warm lamp glow from behind. Shot at eye level, shallow depth of field, the window softly out of focus. No text, no logos, no people.
The second version tells the model the material, the imperfection that makes it feel real, the light sources and their direction, the camera position and the exclusions. Quality tags like “4k” and “best quality” add little; resolution is controlled by the resolution field, not the prompt.
Draft at 1K, finish at 2K, with one caveat
The sensible workflow is to explore at 1K (5 credits) and render keepers at 2K (7 credits). The caveat: Flux 2 Pro’s input fields do not include a seed, so rerunning the same prompt at 2K gives you a new image, not an upscaled copy of your 1K favourite. Treat the 1K stage as finding the right prompt, not the exact final frame. If a precise match matters, either generate finals at 2K from the start or carry the chosen 1K image forward as a reference image. When you need repeatable outputs, Flux 3 Klein Text to Image does accept a seed.
Flux 2 Pro vs other image models on Unicorn API
One key gives you access to every model in the catalogue, so the real question is which model fits each job. Here is how Flux 2 Pro compares with the closest alternatives:
| Model | Price per image | Reference images | Output options | Pick it for |
|---|---|---|---|---|
| Flux 2 Pro | 5 credits (1K), 7 (2K) | Up to 8 | 1K, 2K; 16:9, 1:1, 9:16, 21:9, 4:3 | Photoreal finals, product and character consistency |
| Flux 2 Flex Text To Image | 14 (1K), 24 (2K) | None (separate image-to-image endpoint) | 1K, 2K; NSFW checker setting | When you need its specific settings |
| Flux 3 Klein Text to Image | 1.6 (1K), 2.5 (2K), 6.5 (4K), rounded up per request | None (separate edit endpoint) | Up to 4K; seed, prompt enhancement, output format | Cheap drafts, 4K, reproducible seeds |
| Nano Banana 2 Lite | 4 | Up to 10 | 1K; seven ratios including 3:2 and 2:3 | Fast, low-cost images and edits |
| GPT Image 1.5 | 3 (low), 4 (medium), 22 (high) | Up to 4 | 1:1, 3:2, 2:3; transparent background | Legible text, graphics needing transparency |
A note on Flux 3 Klein’s rounding: the per-image price is fractional, but each request is rounded up to whole credits. One 1K image costs 2 credits, not 1.6. Four 1K images in one request (num_images: 4) cost 6.4, rounded to 7. Batch your Klein drafts to keep rounding from adding up.
A practical split for many teams: draft compositions cheaply with Flux 3 Klein or Nano Banana 2 Lite, then produce finals with Flux 2 Pro when photorealism and reference consistency matter. Use GPT Image 1.5 when the image contains words that must be spelled correctly or when you need a transparent background for a logo or sticker.
Common Flux 2 Pro mistakes (and how to avoid them)
- Iterating at 2K. Every exploratory image at 2K costs 40% more than at 1K. Explore small, finish large.
- Expecting a 2K rerun to match a 1K draft. Without a seed, it will not. Use the draft as a reference image instead.
- Requesting an unsupported aspect ratio. Flux 2 Pro offers 16:9, 1:1, 9:16, 21:9 and 4:3. If your layout needs 3:2 or 2:3, generate at 4:3 or 1:1 and crop, or use a model that supports those ratios.
- Forgetting that
nmultiplies the price.n: 4at 2K is 28 credits, not 7. Check withPOST /v1/models/pricebefore large runs. - Assuming the pricier Flux variant is better. Flex costs more than Pro but is not a quality upgrade for typical photoreal work.
- Polling without a timeout. A loop that waits forever will eventually hang a worker. Set a deadline and handle failures, as in the script above.
- Hot-linking output URLs. Download finished images to your own storage or CDN so your site does not depend on a generation URL.
- Tag-soup prompts. Flux 2 Pro rewards descriptive sentences about light, material and camera. Lists of quality keywords mostly waste tokens.
Flux 2 Pro is a strong default when an image must look photographed and stay consistent across a set. Start in the playground to settle your prompts at 1K, move the winning prompt into the Python script above, and keep the cheaper models in the comparison table for drafting stages where photorealism matters less.
Frequently asked questions
What is Flux 2 Pro?
Flux 2 Pro is a text-to-image model from Black Forest Labs, released on 27 November 2025 as part of the Flux.2 series. It is the production tier of the family, tuned for photoreal detail and close prompt following. On Unicorn API it generates images at 1K or 2K in five aspect ratios and can take up to 8 reference images to keep products, characters or styles consistent.
How much does Flux 2 Pro cost per image?
On Unicorn API, Flux 2 Pro costs 5 credits per image at 1K and 7 credits at 2K. Setting n to generate several images multiplies the price. On a monthly plan, where credits cost $0.01, that is $0.05 or $0.07 per image. With top-up credits at $0.015 it is $0.075 or $0.105. You can check the exact price before running a request.
What is the difference between Flux 2 Pro and Flux 2 Flex?
Both come from the Flux.2 release by Black Forest Labs. On Unicorn API, Flux 2 Flex is split into separate text-to-image and image-to-image endpoints and exposes an NSFW checker setting. It also costs more: 14 credits at 1K and 24 at 2K, against 5 and 7 for Flux 2 Pro. Pro also accepts up to 8 reference images in a single text-to-image request.
Is Flux 2 Pro the same as Flux 2 Klein or Flux 2 Dev?
No. Flux 2 Dev and Flux 2 Klein are the open-weight members of the Flux.2 family, aimed at people who run models on their own hardware. Klein, German for small, is the compact Apache 2.0 line. Flux 2 Pro is the managed production model you call through an API. Unicorn API offers Flux 2 Pro, Flux 2 Flex and the newer Flux 3 Klein, not the Flux 2 Dev or Flux 2 Klein weights.
How many reference images can Flux 2 Pro use?
Flux 2 Pro accepts up to 8 reference images through the ref_images input field. Use them to hold a product, character or visual style steady across many generations. Fewer, well-chosen references usually work better than eight loosely related ones, and your prompt should say in plain words what each reference contributes, such as the bottle shape or the lighting style.
Does Flux 2 Pro support 4K output?
On Unicorn API, Flux 2 Pro offers two resolutions, 1K and 2K. If you need 4K output, Flux 3 Klein Text to Image supports a 4K setting at 6.5 credits per image, rounded up to whole credits per request. For most web, social and product-page uses, 2K from Flux 2 Pro is already larger than the space the image will be displayed in.