Back to models
FLUX.2-dev
Black Forest Labs' 32B rectified flow transformer unifying high-fidelity text-to-image synthesis and multi-reference image editing with strong prompt adherence, lighting realism, and subject consistency.
What you can do
- Studio-grade concept art and photography
- Multi-reference character-consistent editing
- Targeted scene composition and restyling
Input & output
- Input
- Detailed text prompts and optional single or multiple reference images
- Output
- High-resolution synthesized or reference-edited images
Try a prompt like this
Combine the ceramic mug from reference image 1 with the sunlit brutalist concrete café table in reference image 2, shooting at 50mm f/1.8 with natural morning steam.
Things to know
Heavy 32B model requiring ~64GB+ VRAM in BF16 or ~32–40GB with FP8/NF4 offloading; governed by the FLUX Non-Commercial License unless commercially licensed from Black Forest Labs.
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-dev
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-dev",
prompt="Combine the ceramic mug from reference image 1 with the sunlit brutalist concrete café table in reference image 2, shooting at 50mm f/1.8 with natural morning steam.",
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