FLUX.2 [klein] 4B
FLUX.2 [klein] 4B is Black Forest Labs's Apache 2.0 licensed compact image model. It delivers sub-second text-to-image, image editing, and multi-reference generation from a single checkpoint.
import { experimental_generateImage as generateImage } from 'ai';
const result = await generateImage({ model: 'bfl/flux-2-klein-4b', prompt: 'A red balloon on a wooden table.'});What To Consider When Choosing a Provider
Zero Data Retention
AI Gateway does not currently support Zero Data Retention for this model. See the documentation for models that support ZDR.Authentication
AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.
Apache 2.0 licensing means you can incorporate Klein 4B weights into commercial products, fork them, modify them, and redistribute them. That's a meaningful distinction for teams with open-source or compliance requirements. Check N/A for the managed API.
When to Use FLUX.2 [klein] 4B
Best For
Apache 2.0 licensing requirements:
Klein 4B is the only FLUX.2 model with unrestricted commercial use rights for commercial products and open-source projects
Sub-second latency:
Interactive design tools, live creative interfaces, and agentic visual loops where speed is a product requirement
One-model workflows:
Text-to-image, image editing, and multi-reference generation unified in a single checkpoint
Consider Alternatives When
Maximum output quality:
FLUX.2 Klein 9B or FLUX.2 Pro deliver higher fidelity
Masked region inpainting:
FLUX.1 Fill Pro is purpose-built for mask-based fill rather than generative or editing tasks
Conclusion
FLUX.2 [klein] 4B is the Apache 2.0 entry in the FLUX.2 lineup, capable of sub-second image generation and editing. If open licensing and a compact, fast model are the requirements, Klein 4B is the right starting point in the FLUX.2 family.
FAQ
Apache 2.0 permits unrestricted commercial use, modification, redistribution, and sublicensing of the model weights. Black Forest Labs adds no additional terms on top of the standard Apache 2.0 conditions. You can incorporate Klein 4B into commercial products or open-source projects without seeking separate permission.
The API version is the step-distilled variant, optimized for inference speed. The undistilled Klein 4B Base is available as open weights for workflows that need the full training signal rather than minimum generation latency.
Klein 4B handles text-to-image (T2I), image-to-image editing (I2I), and multi-reference generation in a single unified model. You don't need separate checkpoints for different task types.
Klein 4B is Apache 2.0, fully open for commercial and non-commercial use. Klein 9B is released under the FLUX Non-Commercial License, which restricts commercial deployment. For production commercial pipelines that need open licensing, Klein 4B is the appropriate choice.
Current pricing is shown on this page. AI Gateway routes across providers, and rates may vary by provider.