Black Forest Labs/flux-erase/Released May 2026

FLUX Erase

Mask-based object removal, no prompt needed

Commercial use
Image

About FLUX Erase

FLUX Erase removes whatever a mask covers and rebuilds the scene behind it, matching the surrounding lighting, texture and background so nothing looks patched. Objects, people, text, watermarks and whole compositions can be taken out. There is no prompt: the mask alone says what goes.

The mask is a black-and-white image at the same resolution as the input, white where pixels are to be removed and black where they are kept. A dilation setting expands the mask edge by up to 25 pixels before removal, which helps with soft-edged subjects and shadows. The output keeps the input's size.

The model was trained at about 1 megapixel across aspect ratios from 1:2 to 2:1, and inputs near that range give the best results.

Ready to build with FLUX Erase?

Try FLUX Erase in the Workbench to prompt it, compare outputs, and iterate on prompts without writing any code. When you're ready to ship, call the same model from our API and build your own apps on top of it.

curl -sSf -X POST https://hub.oxen.ai/api/ai/images/edit \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $OXEN_API_KEY" \
    -d '{
  "model": "flux-erase",
  "input_image": "https://hub.oxen.ai/api/repos/ox/Oxen-AI-Assets/file/main/images/ox_zoom_out_1926_1076.png",
  "mask_url": "https://hub.oxen.ai/api/repos/ox/Oxen-AI-Assets/file/main/images/ox_zoom_out_1926_1076.png",
  "dilate_pixels": 10,
  "safety_tolerance": 2
}'

Request parameters

Every field FLUX Erase accepts in the request body. See the API reference for response formats.

POSThttps://hub.oxen.ai/api/ai/images/edit
FieldTypeRequiredDefaultDescription
input_imagestring
uri
Yes
—
Image to clean up. The output keeps its size.
mask_urlstring
uri
Yes
—
Black-and-white mask image at the same resolution as the input. White pixels are removed, black pixels are kept.
dilate_pixelsintegerNo10Pixels to expand the mask edge by before removal. Helps cover soft edges and shadows.
Range: 0 – 25
seedinteger
nullable
No
—
safety_toleranceintegerNo2Safety filter strictness, 0 is strictest.
012345