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.
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" 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.
Paint over the area you want to change, describe what should go there, and it fills, replaces, or removes content to match.
It can extend an image beyond its original borders, continuing the scene naturally for wider crops or new aspect ratios.
Edits integrate naturally with the original, preserving lighting, perspective, texture, and overall context.
The same model repairs photographs, refines AI outputs, and adds new extensions that blend cleanly.
In Black Forest Labs' benchmarks it outperformed competing inpainting tools, including Ideogram 2.0 and popular open-source variants.
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.
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);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).
{
"jobId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"status": "QUEUED"
}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);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. |
Common questions about the Flux Fill Pro API.
It handles inpainting and outpainting, meaning it edits masked areas inside an image and extends images beyond their original borders.
Inpainting fills or changes a region inside the image, while outpainting adds new content outward past the edges.
Both. It edits and extends real and AI-generated images alike.
Pro is the commercial, API-hosted model built for maximum performance, while Dev is the open-access, non-commercial variant with downloadable weights.
For inpainting, yes, a mask marks the area to edit alongside your text prompt. Outpainting extends the canvas instead.
Through Apiframe, as well as the BFL API and major hosting partners.
Still have questions?
Get your API key and integrate Flux Fill Pro in minutes — Pay-as-you-go.
Questions? Join our Discord or contact sales.