Text to image
Elo · text-to-image arena
Custom pricing for production workloads
Compact 9B FLUX.2 model for efficient image generation.
blackforestlabs/flux-2-klein-9bPOST https://api.aimlapi.com/v1/images/generationsCompact 9B FLUX.2 model for efficient image generation.
FLUX.2 Klein 9B API Pricing
- Pricing on request
High-volume image generation
Produce product visuals, thumbnails, and marketing assets programmatically at scale.
Creative and concept art
Turn text prompts into illustrations, mockups, and design explorations.
Real-time image generation is a documented use case for FLUX.2 Klein 9B, which is described as built for applications requiring real-time image generation without sacrificing quality.
Text-to-image generation is another documented use case for this model; the model card says it can generate images from text descriptions.
Image editing with multiple references is also documented; the model supports multi-reference editing capabilities and is described as suitable for single-reference and multi-reference editing workflows.
Interactive visual workflows are a documented fit as well, with the model described as the flagship small model for the quality-versus-latency frontier and recommended for real-time, interactive applications.
Human-preference results for FLUX.2 Klein 9B in text to image, next to models available on AI/ML API. Data retrieved Nov 3, 2026.
Elo · text-to-image arena
USD per Megapixel
Arena results for models you can call with the same API key.
Blind pairwise human votes on images generated from text prompts. FLUX.2 Klein 9B ranks #68 of 98.
| Usage | Price | Unit |
|---|---|---|
| Image generation | $0.015 | per Megapixel |
The final price depends on request parameters such as resolution or duration.
Prices from the AI/ML API price list, checked on Nov 4, 2026.
AI/ML API rates for 5 models, per Megapixel.
| Model | Per Megapixel |
|---|---|
| $0.015 | |
| $0.014 | |
| $0.015 | |
| $0.03 | |
| $0.05 |
Give your agent the model details, code and documentation.
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"curl 'https://api.aimlapi.com/v1/images/generations' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "blackforestlabs/flux-2-klein-9b",
"prompt": "A ginger cat asleep on a stack of exactly three hardcover books in a rainy bookshop window at dusk. Gold lettering on the glass reads OPEN LATE. Warm lamp light inside, raindrops and blurred neon reflections outside, 35mm film photo."
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "blackforestlabs/flux-2-klein-9b",
"prompt": "A ginger cat asleep on a stack of exactly three hardcover books in a rainy bookshop window at dusk. Gold lettering on the glass reads OPEN LATE. Warm lamp light inside, raindrops and blurred neon reflections outside, 35mm film photo."
}
response = requests.post("https://api.aimlapi.com/v1/images/generations", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.aimlapi.com/v1/images/generations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "blackforestlabs/flux-2-klein-9b",
"prompt": "A ginger cat asleep on a stack of exactly three hardcover books in a rainy bookshop window at dusk. Gold lettering on the glass reads OPEN LATE. Warm lamp light inside, raindrops and blurred neon reflections outside, 35mm film photo."
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());FLUX.2 Klein 9B takes image, text as input and returns image.
FLUX.2 Klein 9B became available on June 12, 2026.
FLUX.2 Klein 9B costs $0.015 per Megapixel on AI/ML API, billed as you go with no subscription.
FLUX.2 Klein 9B is billed per generation, a fixed charge per output rather than by prompt length.
Yes, FLUX.2 Klein 9B accepts image input as well as a text prompt.
FLUX.2 Klein 9B was built by Black Forest Labs.
Send a request to https://api.aimlapi.com/v1/images/generations with blackforestlabs/flux-2-klein-9b as the model id.
Yes. FLUX.2 Klein 9B is served through AI/ML API, so the same key and endpoint format used for other models applies.
It is a compact 9-billion-parameter FLUX.2 model built for efficient image generation.
Use blackforestlabs/flux-2-klein-9b as the model parameter. Requests go to https://api.aimlapi.com/v1/images/generations with your AI/ML API key.