Back to models
FLUX.2-klein-9B
Black Forest Labs' 9B 4-step distilled rectified flow model balancing sub-second inference speed with enhanced structural fidelity for text-to-image synthesis and multi-reference image editing.
What you can do
- Fast high-detail visual asset synthesis
- Multi-reference product mockup composition
- Interactive image restyling and editing
Input & output
- Input
- Text prompts and up to 4 optional reference images for editing and composition
- Output
- High-detail 4-step generated or multi-reference edited images
Try a prompt like this
Keep the sneaker silhouette from reference image 1, apply the brushed titanium and neon orange palette from reference image 2, floating over wet asphalt at night.
Things to know
Fits on a single 24GB GPU (~18–22GB VRAM in BF16, lower in FP8); unlike the Apache-2.0 4B variant, the 9B model uses the FLUX Non-Commercial License.
All listed models publish open weights for self-hosted deployment; check each repository's license before commercial use.
Call it through the API
The platform exposes an OpenAI-compatible API. Use an official SDK or any HTTP client, then set the gateway URL, API key, and model ID.
- Endpoint
POST/v1/images/generations- Model repo ID
black-forest-labs/FLUX.2-klein-9B
import os
from openai import OpenAI
client = OpenAI(
base_url=os.environ["API_BASE_URL"],
api_key=os.environ["API_KEY"],
)
result = client.images.generate(
model="black-forest-labs/FLUX.2-klein-9B",
prompt="Keep the sneaker silhouette from reference image 1, apply the brushed titanium and neon orange palette from reference image 2, floating over wet asphalt at night.",
size="1024x1024",
)
print(result.data[0].url)Before running a sample, set the API_BASE_URL (gateway URL) and API_KEY environment variables.
Read the full API guide