Skip to content

FLUX.2 [flex]

FLUX.2 [flex] is Black Forest Labs's developer-tunable image generation model. It exposes direct control over inference steps and guidance scale, letting you trade typography accuracy and fine detail against generation speed within a single model.

Image Gen
index.ts
import { experimental_generateImage as generateImage } from 'ai';
const result = await generateImage({
model: 'bfl/flux-2-flex',
prompt: 'A red balloon on a wooden table.'
});

Playground

Try out FLUX.2 [flex] by Black Forest Labs. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.

Providers

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.

Provider
Context
Latency
Throughput
Input
Output
Cache
Web Search
Per Query
Capabilities
ZDR
No Training
Release Date
Black Forest Labs
Legal:Terms
Privacy
Throughput

P50 throughput on live AI Gateway traffic, in tokens per second (TPS). Visit the docs for more info.

Latency

P50 time to first token (TTFT) on live AI Gateway traffic, in milliseconds. View the docs for more info.

More models by Black Forest Labs

Model
Context
Latency
Throughput
Input
Output
Cache
Web Search
Per Query
Capabilities
Providers
ZDR
No Training
Release Date
512
bfl logo
06/01/2025
512
bfl logo
prodia logo
06/01/2025
bfl logo
10/01/2024
bfl logo
bfl logo
67K
bfl logo

About FLUX.2 [flex]

FLUX.2 [flex] belongs to the FLUX.2 family from Black Forest Labs. Other FLUX.2 variants optimize for a fixed quality level. Flex gives you direct control over the number of inference steps and the guidance scale.

The FLUX.2 architecture pairs a Mistral-3 24B vision-language model (VLM) with a rectified flow transformer retrained on a new variational autoencoder (VAE). The VLM contributes real-world knowledge and contextual understanding, producing more coherent scenes, correct spatial logic, and reliable typography. FLUX.2 supports multi-reference input with up to 10 reference images and image editing at resolutions up to 4 megapixels.

Flex's role in the lineup is explicit parameter control. If you build workflows that span multiple quality tiers (a quick draft view and a high-fidelity export, for example), you can use one Flex endpoint and change the steps value instead of switching models. That makes Flex a natural fit for tools, pipelines, and interfaces that expose a quality dial to end users.

What To Consider When Choosing a Provider

  • Configuration: Because FLUX.2 [flex] exposes the steps parameter, you can run a quick low-step pass to validate a composition before you commit to a full-quality render. That cuts iteration cost during prompt development. Compare N/A against other FLUX.2 tiers.
  • 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.

When to Use FLUX.2 [flex]

Best For

  • Configurable quality-speed tradeoff: Single model that supports draft previews at six steps and final renders at 50 steps
  • Typography accuracy: Applications like UI mockup generation or infographic creation where fine text legibility matters
  • Iterative prompt development: Rapid low-step passes validate composition before committing to full-quality generation
  • Quality slider interfaces: Developer tools that expose a quality control mapped to inference step count

Consider Alternatives When

  • Maximum automatic quality: FLUX.2 Pro handles this with tuned default parameters when you don't want to manage inference parameters
  • Image inpainting: FLUX.1 Fill Pro is purpose-built for masked region fill tasks
  • Real-time generation: FLUX.2 Klein is optimized for sub-second interactive speed

Conclusion

FLUX.2 [flex] gives you direct control over inference steps and guidance scale. Choose it when your application needs to tune the quality-speed tradeoff at runtime rather than commit to a fixed output tier. Its strength in text rendering and fine detail makes it especially useful for structured visual content like UI mockups and infographics.

Frequently Asked Questions

  • What parameter makes FLUX.2 [flex] different from other FLUX.2 models?

    Flex exposes the steps parameter, which controls the number of diffusion inference steps. Fewer steps produce faster outputs with softer details. More steps yield sharper typography and finer image detail. This runtime tuning is Flex's core differentiator within the FLUX.2 family.

  • Does FLUX.2 [flex] support image editing as well as text-to-image generation?

    Yes. All FLUX.2 variants, including Flex, support image editing from text and multiple references in a single model.

  • How many reference images can FLUX.2 [flex] accept?

    Up to 10 simultaneous reference images. Use them to keep character, product, and style aligned across generations.

  • What resolution does FLUX.2 [flex] support?

    Up to 4 megapixels. All FLUX.2 models share this resolution ceiling for both generation and editing.

  • When should I use Flex instead of FLUX.2 Pro?

    Use Flex when you need explicit control over the steps parameter to tune quality vs. speed at request time. Use FLUX.2 Pro when you want maximum automatic image quality without managing inference parameters.

  • Is FLUX.2 [flex] a pure image generation model?

    Yes. FLUX.2 [flex] is a dedicated image generation model (a rectified-flow transformer), not a multimodal large language model (LLM). It doesn't process conversation history and has no context window for chat. Use generateImage from the AI SDK to send requests.

  • What does FLUX.2 [flex] cost per image?

    Pricing appears on this page and updates as providers adjust their rates. AI Gateway routes traffic through the configured provider.