FLUX Erase API

Removes masked content from an image.

Modalities
Image, TextImage
Price
$0.034per Megapixel
Model type
Image generation
Released
Jun 12, 2026

FLUX Erase overview

Sample FLUX Erase image generated through AI/ML API: Change the rain to falling snow and make the lettering on the glass read CLOSED. Keep everything else the same

FLUX Erase specs

Model ID
blackforestlabs/flux-erase
Developer
Black Forest Labs
Input
Image, Text
Output
Image
Endpoint
POST https://api.aimlapi.com/v1/images/generations

Removes masked content from an image.

FLUX Erase API Pricing
- Pricing on request

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.

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.

FLUX Erase API pricing

FLUX Erase pricing in US dollars
UsagePriceUnit
Image generation$0.034per Megapixel

The final price depends on request parameters such as resolution or duration.

Prices from the AI/ML API price list, checked on Nov 4, 2026.

FLUX Erase vs other image models: prices

AI/ML API rates for 5 models, per Megapixel.

AI/ML API prices in USD per Megapixel
ModelPer Megapixel
FLUX Erase$0.034
FLUX.2 Klein 4B$0.014
FLUX.2 Klein 9B$0.015
FLUX.2 Klein 9B Preview$0.015
FLUX.2 Flex$0.05

How to use the FLUX Erase API

View docs

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/images/generations' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "blackforestlabs/flux-erase",
  "image_url": "https://example.com/input.jpg",
  "mask_url": "https://example.com/input.mp3"
}'

Related articles

All posts

FLUX Erase FAQ

What inputs and outputs does FLUX Erase support?

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

How much does FLUX Erase cost?

FLUX Erase costs $0.034 per Megapixel on AI/ML API, billed as you go with no subscription.

How is FLUX Erase billed?

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

Can FLUX Erase take an existing image as input?

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

Who created FLUX Erase?

FLUX Erase was built by Black Forest Labs.

How do I call FLUX Erase on AI/ML API?

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

Is FLUX Erase available through a single API key?

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

What does FLUX Erase actually do to an image?

It removes masked content from an image.

What is the FLUX Erase model ID?

Use blackforestlabs/flux-erase as the model parameter. Requests go to https://api.aimlapi.com/v1/images/generations with your AI/ML API key.

Start building with FLUX Erase

FLUX Erase API

blackforestlabs/flux-erase

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/images/generations' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "blackforestlabs/flux-erase",
  "image_url": "https://example.com/input.jpg",
  "mask_url": "https://example.com/input.mp3"
}'