FLUX Erase overview
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
| Usage | Price | Unit |
|---|---|---|
| Image generation | $0.034 | per 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.
| Model | Per Megapixel |
|---|---|
| $0.034 | |
| $0.014 | |
| $0.015 | |
| $0.015 | |
| $0.05 |
How to use the FLUX Erase API
View docsBuild with your agent
Give your agent the model details, code and documentation.
1Get your API key
Create API keyexport 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"
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "blackforestlabs/flux-erase",
"image_url": "https://example.com/input.jpg",
"mask_url": "https://example.com/input.mp3"
}
response = requests.post("https://api.aimlapi.com/v1/images/generations", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = 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",
"image_url": "https://example.com/input.jpg",
"mask_url": "https://example.com/input.mp3"
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());Related articles
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.



.webp)