Flux Fill Pro icon

Flux Fill Pro API

Black Forest Labs' image-editing model from the Flux.1 Tools suite (Nov 2024), a state-of-the-art inpainting and outpainting model that edits and extends existing images rather than generating them from scratch.

Integrate Flux Fill Pro with a single API call — one key, one unified endpoint, and shared billing across every model on Apiframe.

model: "flux-fill-pro"

What's special about Flux Fill Pro

Built for editing, not generation

While most Flux models create images from text, Fill Pro is purpose-built to work with images that already exist, whether real photos or AI-generated ones.

Inpainting with a mask and a prompt

Paint over the area you want to change, describe what should go there, and it fills, replaces, or removes content to match.

Outpainting and canvas extension

It can extend an image beyond its original borders, continuing the scene naturally for wider crops or new aspect ratios.

Seamless blending

Edits integrate naturally with the original, preserving lighting, perspective, texture, and overall context.

Works on real and generated images

The same model repairs photographs, refines AI outputs, and adds new extensions that blend cleanly.

State-of-the-art results

In Black Forest Labs' benchmarks it outperformed competing inpainting tools, including Ideogram 2.0 and popular open-source variants.

Prompts to try with Flux Fill Pro

Example prompts you can run through the Flux Fill Pro API on Apiframe.

Mask the old sign on the storefront and replace it with a clean blue sign reading 'OPEN'.

Remove the parked car from the driveway and fill the space with matching pavement.

Extend this portrait outward to a wider 16:9 frame, continuing the background naturally.

Paint over the model's jacket and change it to a tan trench coat, keeping the lighting consistent.

Fill the empty wall behind the sofa with a large framed landscape painting.

Expand the top of this product photo to add headroom for a banner headline.

Overview

Endpoint
POST /v2/images/edit
Model ID
flux-fill-pro
Params key
fluxFillParams
Modality
Image
Provider
Black Forest Labs
Avg. completion
~15s

Capabilities

Image inputSupported
Avg. time~15s

Quick start

Send a single POST /v2/images/edit request with your API key to generate with Flux Fill Pro. The call returns a jobId you can poll or receive via webhook.

curl -X POST https://api.apiframe.ai/v2/images/edit \
  -H "X-API-Key: afk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
        "prompt": "a sleek silver sports car on a coastal highway at sunset, hyper-realistic",
        "model": "flux-fill-pro",
        "fluxFillParams": {
            "image": "https://example.com/input.jpg",
            "mode": "inpaint",
            "mask": "https://example.com/input.jpg",
            "outpaint": "Zoom out 1.5x"
        }
    }'
import requests

response = requests.post(
    "https://api.apiframe.ai/v2/images/edit",
    headers={
        "X-API-Key": "afk_your_api_key_here",
        "Content-Type": "application/json",
    },
    json={
        "prompt": "a sleek silver sports car on a coastal highway at sunset, hyper-realistic",
        "model": "flux-fill-pro",
        "fluxFillParams": {
            "image": "https://example.com/input.jpg",
            "mode": "inpaint",
            "mask": "https://example.com/input.jpg",
            "outpaint": "Zoom out 1.5x"
        }
    },
)
print(response.json())  # { "jobId": "...", "status": "QUEUED" }
const response = await fetch("https://api.apiframe.ai/v2/images/edit", {
  method: "POST",
  headers: {
    "X-API-Key": "afk_your_api_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "prompt": "a sleek silver sports car on a coastal highway at sunset, hyper-realistic",
    "model": "flux-fill-pro",
    "fluxFillParams": {
      "image": "https://example.com/input.jpg",
      "mode": "inpaint",
      "mask": "https://example.com/input.jpg",
      "outpaint": "Zoom out 1.5x"
    }
  }),
});
const { jobId } = await response.json();
console.log(jobId);

Response & job lifecycle

Generation is asynchronous. A successful submission returns 202 Accepted with a jobId. Poll GET /v2/jobs/{id} (or supply a webhook_url) until the status is COMPLETED; the result field then holds the output URL(s).

1. Submission response (202)

{
  "jobId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "status": "QUEUED"
}

2. Poll for the result

curl https://api.apiframe.ai/v2/jobs/JOB_ID \
  -H "X-API-Key: afk_your_api_key_here"
import requests, time

while True:
    job = requests.get(
        "https://api.apiframe.ai/v2/jobs/JOB_ID",
        headers={"X-API-Key": "afk_your_api_key_here"},
    ).json()
    if job["status"] in ("COMPLETED", "FAILED"):
        break
    time.sleep(2)
print(job["result"])
let job;
do {
  await new Promise((r) => setTimeout(r, 2000));
  job = await fetch("https://api.apiframe.ai/v2/jobs/JOB_ID", {
    headers: { "X-API-Key": "afk_your_api_key_here" },
  }).then((r) => r.json());
} while (job.status !== "COMPLETED" && job.status !== "FAILED");
console.log(job.result);

Input schema

Request parameters accepted by the Flux Fill Pro endpoint. Model-specific options are nested under the params object shown below.

Parameter Type Required Default Allowed / range Description
prompt string required Text description of what to generate.
model string required "flux-fill-pro" "flux-fill-pro" The model identifier for this endpoint.
fluxFillParams.image string (URL) optional Source image (URL)
fluxFillParams.mode string optional "inpaint" "inpaint", "outpaint" Mode
fluxFillParams.mask string (URL) optional White = repaint, black = keep. Required for inpaint.
fluxFillParams.outpaint string optional "Zoom out 1.5x" "Zoom out 1.5x", "Zoom out 2x", "Make square", "Left outpaint", "Right outpaint", "Top outpaint", "Bottom outpaint" Required for outpaint mode.
fluxFillParams.prompt string optional Prompt
fluxFillParams.prompt_upsampling boolean optional false Prompt upsampling
fluxFillParams.steps number optional 50 min 1, max 50, step 1 Steps
fluxFillParams.guidance number optional 3 min 2, max 5, step 0.1 Guidance
fluxFillParams.safety_tolerance number optional 2 min 1, max 6, step 1 1 = strictest, 6 = most permissive.
fluxFillParams.output_format string optional "jpg" "jpg", "png" Output format
fluxFillParams.seed number optional step 1 Reuse a number to reproduce the same result.

Frequently Asked Questions

Common questions about the Flux Fill Pro API.

What does Flux Fill Pro actually do?

It handles inpainting and outpainting, meaning it edits masked areas inside an image and extends images beyond their original borders.

What is the difference between inpainting and outpainting?

Inpainting fills or changes a region inside the image, while outpainting adds new content outward past the edges.

Does it work on real photos or only AI images?

Both. It edits and extends real and AI-generated images alike.

How is Fill Pro different from Fill Dev?

Pro is the commercial, API-hosted model built for maximum performance, while Dev is the open-access, non-commercial variant with downloadable weights.

Do you need a mask to use it?

For inpainting, yes, a mask marks the area to edit alongside your text prompt. Outpainting extends the canvas instead.

Where can you access it?

Through Apiframe, as well as the BFL API and major hosting partners.

Still have questions?

Start building with the Flux Fill Pro API

Get your API key and integrate Flux Fill Pro in minutes — Pay-as-you-go.

Free credits to start
One API for every model
Webhooks, SDKs & idempotency
No provider account required

Questions? Join our Discord or contact sales.