FLUX Erase API

blackforestlabs/flux-erase
Removes masked content from an image.
Output
$0.034 / MP (variable)
Released
Jun 12, 2026

Overview

What is FLUX Erase API?

Removes masked content from an image.

Technical Specifications
- Supported inputs: Image, Text
- Output: Image
- Endpoint: /images/generations

Performance Benchmarks
[embed]

FLUX Erase API Pricing
- Pricing on request

Where to Use FLUX Erase

High-volume image generation
Produce product visuals, thumbnails, and marketing assets programmatically at scale.

Creative and concept art
Turn text prompts into illustrations, mockups, and design explorations.

Image editing and variations
Provide a reference image to guide edits, restyles, or variations.

Code Sample
[embed]

Use cases

Remove objects from photos via API, with mask-driven cleanup and coherent scene reconstruction. It is documented as useful for product photography cleanup, removing unwanted elements, scene simplification, and privacy-aware image editing.

Erase text or other marked content from images while reconstructing the background behind it. It is described as handling objects, people, text, and anything else defined by the mask.

Clean up unwanted details in images, including shadows and subtle traces left behind by the removed content. It is presented as suited to removing objects, text, watermarks, distractions, and other elements from an image.

Use image + mask workflows to leave a clean, coherent result that matches nearby structure, lighting, texture, and scene context. It is described as reconstructing the scene underneath the erased area in a single call.

How to use FLUX Erase API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to blackforestlabs/flux-erase.
import requests

r = requests.post(
    "https://api.aimlapi.com/v1/images/generations",
    headers={"Authorization": "Bearer " + AIMLAPI_KEY},
    json={
      "model": "blackforestlabs/flux-erase",
      "prompt": "A cat holding a sign that says hello"
    },
)
print(r.json())
const r = await fetch("https://api.aimlapi.com/v1/images/generations", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "model": "blackforestlabs/flux-erase",
    "prompt": "A cat holding a sign that says hello"
  }),
});
console.log(await r.json());
curl -X POST https://api.aimlapi.com/v1/images/generations \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"blackforestlabs/flux-erase","prompt":"A cat holding a sign that says hello"}'

OpenAI-compatible — swap the base URL and it works with your existing SDK.

FLUX Erase API Pricing

TypePrice
Output
$0.034 / MP (variable)

FLUX Erase vs other models

ModelInputOutputContextBest for
FLUX Erase
This page
$0.034 / MP (variable)
Image generation at scale
$0.25 / 1M tokens
$60 / 1M tokens
128K tokens
Image generation at scale
$5 / 1M tokens
$30 / 1M tokens
Image generation at scale
$0.25 / gen
Image generation at scale
$0.015 / MP (variable)
Image generation at scale

Frequently asked questions

FLUX Erase takes image, text as input and returns image.

FLUX Erase is priced at $0.0442 / MP (variable).

FLUX Erase is billed per generation — a fixed charge per output rather than by prompt length.

Yes, FLUX Erase accepts image input as well as a text prompt.

FLUX Erase was built by Black Forest Labs.

Send a request to https://api.aimlapi.com/v1/images/generations with blackforestlabs/flux-erase as the model id.

Yes. FLUX Erase is served through AI/ML API, so the same key and endpoint format used for other models applies.

It removes masked content from an image.

Start building with FLUX Erase

Get API Key
1000+ models, one API.