Flux V1 Pro Erase
Playground
Try it on WavespeedAI!FLUX.1 Pro Erase is a fast AI object removal and image inpainting model that removes objects from images using a black-and-white mask, then fills the selected area with natural, context-aware detail. Ready-to-use REST inference API for object removal, photo cleanup, product image editing, background repair, creative retouching, marketing assets, and professional image editing workflows with simple integration, no coldstarts, and affordable pricing.
Features
WaveSpeed AI FLUX V1 Pro Erase
WaveSpeed AI FLUX V1 Pro Erase removes selected elements from an image using a mask, then fills the masked region with regenerated content that blends naturally with the surrounding scene. It is suitable for object removal, cleanup, retouching, and image refinement workflows.
Why Choose This?
-
Mask-based object removal Remove unwanted objects, distractions, or visual clutter from an image with a dedicated mask input.
-
Clean scene-aware fill Regenerate the selected region so it blends with the surrounding image content.
-
Simple erase workflow Upload an image, provide a mask, adjust dilation, and generate a cleaned result.
-
Flexible edge expansion Use
dilate_pixelsto slightly expand the masked region for smoother inpainting boundaries. -
Multiple output formats Export the result in supported formats such as
jpeg. -
Production-ready API Suitable for photo cleanup, product image refinement, background editing, and visual post-processing workflows.
Parameters
| Parameter | Required | Description |
|---|---|---|
| image | Yes | Input image to edit. |
| mask_image | Yes | Mask image indicating the region to erase and regenerate. |
| dilate_pixels | No | Number of pixels to expand the mask before regeneration. Default: 10. |
| output_format | No | Output image format, such as jpeg. |
How to Use
- Upload your image — provide the source image you want to clean up.
- Upload the mask — mark the object or region you want to erase.
- Adjust mask dilation (optional) — use
dilate_pixelsto slightly expand the masked area for cleaner blending. - Choose output format (optional) — select the format that best fits your workflow.
- Submit — run the model and download the cleaned image.
Example Use Case
Remove small desk objects from a workspace photo so the final scene looks cleaner and more minimal.
Pricing
Just $0.08 per image.
Billing Rules
- Each erase request costs $0.08
- Pricing is fixed per image
dilate_pixelsandoutput_formatdo not affect pricing
Best Use Cases
- Object removal — Remove unwanted items, clutter, or distractions from photos.
- Photo cleanup — Refine scenes for cleaner presentations and commercial use.
- Product image retouching — Remove background props or accidental objects from listings and ads.
- Creative editing — Clear space in an image before adding other edits or design elements.
- Workflow preparation — Clean up images before downstream compositing or publishing.
Pro Tips
- Use a precise mask for better removal quality.
- Slightly increase
dilate_pixelswhen edges need smoother blending. - Avoid masking too much of the image at once unless the surrounding context is strong.
- Use the cleanest source image possible for more natural regeneration.
- Export as
jpegfor convenience, or choose another format when your workflow needs it.
Notes
- Both
imageandmask_imageare required. dilate_pixelsdefaults to10.- Pricing is fixed at $0.08 per image.
- Better masks generally produce cleaner erase results.
Related Models
- WaveSpeed AI image editing workflows — Useful when you need broader prompt-based transformations instead of object removal only.
- WaveSpeed AI inpainting workflows — Useful when you want more general masked-region regeneration tasks.
- WaveSpeed AI text-to-image workflows — Useful when you need fresh image generation rather than editing an existing image.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
# Submit the task
curl --location --request POST "https://api.wavespeed.ai/api/v3/wavespeed-ai/flux-v1-pro/erase" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}" \
--data-raw '{
"dilate_pixels": 10,
"output_format": "jpeg"
}'
# Get the result
curl --location --request GET "https://api.wavespeed.ai/api/v3/predictions/${requestId}/result" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}"
Parameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| image | string | Yes | - | The input image to erase content from. | |
| mask_image | string | Yes | - | Black/white mask image. White pixels mark the region to erase, black pixels mark the region to keep. The mask must match the input image dimensions. | |
| dilate_pixels | integer | No | 10 | 0 ~ 100 | Number of pixels to expand the mask edges by. Higher values can produce cleaner erase results around the masked region. |
| output_format | string | No | jpeg | jpeg, png | The format of the generated image. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Array of URLs to the generated content (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction, the ID of the prediction to get |
| data.model | string | Model ID used for the prediction |
| data.outputs | string | Array of URLs to the generated content. |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |