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.'
});

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.