# FLUX.1 Fill [pro]

FLUX.1 Fill [pro] is Black Forest Labs's purpose-built inpainting model. It fills masked regions of images from text prompts while maintaining coherent lighting, texture, and stylistic continuity with the surrounding unmasked content.

- **Model ID:** `bfl/flux-pro-1.0-fill`
- **Type:** image
- **Providers:** bfl
- **Context window:** Not applicable
- **Maximum output tokens:** 0
- **Pricing:** $0.05/image
- **Canonical page:** https://vercel.com/ai-gateway/models/flux-pro-1.0-fill

## Supported parameters

- **Parameters:** `seed`
- **Operations:** `inpainting`, `outpainting`
- **Input modalities:** `text`, `image`
- **Output modalities:** `image`
- **Aspect ratios:** Not reported
- **Resolutions:** Not reported
- **Durations:** Not reported
- **Frame rates:** Not reported
- **Maximum outputs per request:** Not reported
- **Maximum input images:** Not reported
- **Input image formats:** `png`, `webp`, `jpeg`
- **Maximum input image size:** Not reported

## Example

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

## About

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

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.

## When to use

### 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 where the edge of an existing image is masked and new background content must be generated to extend the scene
- E-commerce and product photography cleanup where distracting elements, shadows, or artifacts in a product shot need to be filled cleanly
- 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

- The edit is instruction-based rather than mask-based ("change the color of the hat" instead of masking a region). Kontext Pro or Kontext Max handle instruction-based local edits better
- Multi-reference character consistency across scenes is the goal. Kontext Pro or FLUX.2 Pro with multi-reference input are better suited
- Sub-second real-time generation or editing speed is required. FLUX.2 Klein handles interactive latency better than a fill-specialized model

## 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

- **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

## Frequently asked questions

### What is the difference between inpainting and instruction-based image editing?

Inpainting takes an image plus a mask and generates pixels for the masked region only. Instruction-based editing takes an image plus natural language and changes the image without a pixel mask. Fill Pro is built for the first pattern; Kontext Pro and Max target the second.

### What does FLUX.1 Fill [pro] cost per image?

See the pricing section on this page for today's rates. AI Gateway exposes each provider's pricing for FLUX.1 Fill [pro].

### What inputs does FLUX.1 Fill [pro] require?

An input image, a mask defining the region to fill, and a text prompt describing the desired content for the masked area. This is the standard inpainting input format.

### Can Fill Pro be used for background extension (outpainting)?

Yes. By placing the mask at the border or edge of an image, Fill Pro can generate new background content that extends the scene, a technique called outpainting.

### How does Fill Pro differ from the Kontext models?

Fill Pro is specialized for mask-based inpainting, generating content for a defined region. The Kontext models (Pro and Max) are specialized for text-instruction-based editing that understands the full image context and makes modifications described in natural language, without requiring an explicit pixel mask.

### Is FLUX.1 Fill [pro] a chat or language model?

No. Fill Pro is a dedicated image generation model, not a language model or multimodal LLM. Use `generateImage` from the AI SDK; it processes image and mask inputs to produce image outputs.

### Does FLUX.1 Fill [pro] support generating completely new images without an inpainting mask?

Fill Pro is purpose-built for inpainting. For text-to-image generation without an existing image, use FLUX.1 Pro, FLUX.2 Pro, or other members of the FLUX family.

## Links

- [Model page](https://vercel.com/ai-gateway/models/flux-pro-1.0-fill)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
- [Provider model documentation](https://docs.bfl.ai/flux_tools/flux_1_fill)
- [Provider pricing](https://bfl.ai/pricing)


If you encounter incorrect information, can’t find what you need, need a capability Vercel doesn’t currently offer, or have any other feedback to report, please do it by following the instructions at https://vercel.com/feedback.md.
