FLUX.1 Fill [pro]
FLUX.1 Fill [pro] is Black Forest Labs's dedicated inpainting model. It fills masked regions of images using text instructions while preserving the coherence, lighting, and style of the surrounding content.
import { experimental_generateImage as generateImage } from 'ai';
const result = await generateImage({ model: 'bfl/flux-pro-1.0-fill', prompt: 'A red balloon on a wooden table.'});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 |
|---|
More models by Black Forest Labs
| Model |
|---|
About FLUX.1 Fill [pro]
FLUX.1 Fill [pro] is a specialized model within Black Forest Labs's FLUX.1 lineup, available through AI Gateway since October 1, 2024 as part of the image-only model expansion. Unlike the Kontext models that focus on instruction-based editing, Fill Pro is specifically engineered for inpainting: generating content for a defined masked area within an existing image.
Inpainting requires a model that simultaneously understands the unmasked context (colors, textures, lighting direction, perspective, stylistic character) and generates new content for the masked region that blends seamlessly. FLUX.1 Fill [pro] treats this as its primary function, making it more appropriate for mask-based fill workflows than general-purpose editing models.
Practical applications include object removal and replacement, background extension (outpainting), e-commerce product photo cleanup, and generative content insertion (placing a new element by masking its target region and describing it in a text prompt).
What To Consider When Choosing a Provider
- Configuration: Inpainting workflows typically involve user-defined masks, so request shapes vary. Per-request cost tracking in AI Gateway helps you monitor spend on variable-complexity fill operations. See $0.05 for list pricing.
- 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.1 Fill [pro]
Best for
- Object removal and replacement: Workflows where a specific element must be erased and replaced with contextually appropriate generated content
- Background completion and outpainting: Masking the edge of an existing image to generate new background content that extends the scene
- E-commerce product cleanup: Filling distracting elements, shadows, or artifacts cleanly in product photography
- Generative object insertion: Placing a new element into an image by masking the target region and describing the desired content in a text prompt
Consider alternatives when
- Instruction-based edits: Kontext Pro or Kontext Max handle local edits like "change the color of the hat" better when no mask is used
- Multi-reference consistency: Kontext Pro or FLUX.2 Pro with multi-reference input are better suited for character consistency across scenes
- Real-time interactive speed: FLUX.2 Klein handles sub-second latency better than a fill-specialized model
Conclusion
FLUX.1 Fill [pro] brings a dedicated inpainting architecture to AI Gateway. For applications that need to remove objects, extend backgrounds, or insert new content into photographs and designs, Fill Pro is the purpose-built choice in the FLUX family.