bfl/flux-pro/1.0/erase
Flux Pro 1.0 Erase by BFL - AI-powered image editing, style transfer, and transformation. Edit photos with natural language instructions, remove backgrounds, change styles, and enhance images effortlessly.
PNG, JPEG, WebP, or GIF · 20 MiB maximum
PNG, JPEG, WebP, or GIF · 20 MiB maximum
Example output — click Run to generate your own
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
https://api.sandbase.ai/v1/runbfl/flux-pro/1.0/eraseInput Schema
4 parameters · 1 required · 3 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
image | string | Required | The URL of the input image to erase content from. |
mask | string | Optional | The URL of a black/white mask image where white (255) marks pixels to erase and black (0) marks pixels to keep. Needs to match the dimensions of the input image. |
dilate_pixels | integer | Optional | Number of pixels to expand the mask edges by. Higher values produce cleaner erase results around the masked region. · Min: 0 · Max: 100 · Default: 10 |
output_format | string | Optional | The format of the generated image. · Options: jpeg, png · Default: "jpeg" jpegpng |
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom the completed response
Code Examples
Ready-to-run snippets
# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "bfl/flux-pro/1.0/erase",
"mask": "https://static.sandbase.ai/examples/bfl/flux-pro/1.0/erase/input_mask_1.jpeg",
"image": "https://static.sandbase.ai/examples/bfl/flux-pro/1.0/erase/input_image_0.jpeg",
"dilate_pixels": 10,
"output_format": "jpeg",
"prompt": "a beautiful sunset over mountains"
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"API README
Flux Pro Erase
Flux Pro Erase is a image generation and editing workflow in the FLUX family. Flux Pro 1.0 Erase by BFL - AI-powered image editing, style transfer, and transformation. Edit photos with natural language instructions, remove backgrounds, change styles, and enhance images effortlessly. It is designed to translate deliberate creative direction and supplied reference material into a coherent production asset, with attention to subject identity, composition, visual detail, and the specific transformation implied by this exact route.
Use this route when the project needs clean object removal and background recovery. Describe the intended result, what must remain recognizable, and the required composition, lighting, materials, atmosphere, and finish; keep technical delivery choices in the schema fields below.
Highlights
- Object removal. Eliminates the masked subject or region identified in a supplied image.
- Context-aware fill. Reconstructs the revealed background so it agrees with surrounding texture, perspective, and lighting.
- Mask-directed precision. Confines removal to the intended region while preserving unrelated content.
- Natural boundary recovery. Blends the regenerated area into neighboring pixels without leaving a conspicuous cutout.
Pricing
| Configuration | Billing unit | Price |
|---|---|---|
| Base generation | Per request | $0.03 |
When to Use
| ✅ Good fit | ❌ Consider alternatives |
|---|---|
| The project needs this exact FLUX capability | The intended task belongs to a different media workflow |
| Required source and control media are available | Necessary assets or usage rights are unavailable |
| Creative direction can state change and preservation goals | Output must be deterministic at pixel or frame level |
| Supported dimensions and formats match final delivery | Placement requires unsupported specifications |
| An asynchronous generated result fits production | A live frame-synchronous response is mandatory |
Prompt Guide
Lead with the main subject and action, then specify composition, context, lighting, materials, style, typography, and atmosphere. For editing, identify each source and clearly separate the requested transformation from the subjects, regions, geometry, or identity that must remain unchanged.
{
"image": "https://example.com/reference.png",
"mask": "https://example.com/reference.png",
"dilate_pixels": 10,
"output_format": "jpeg"
}
Technical Specs
| Spec | Value |
|---|---|
| Model ID | bfl/flux-pro/1.0/erase |
| Input fields | mask (string)<br>image (string)<br>dilate_pixels (integer; 0–100)<br>output_format (string; jpeg, png) |
| Required input | image |
| Output fields | url, content_type |
| Execution | Asynchronous job |
Related Models
bfl/flux-1/dev/editbfl/flux-1/dev/image-to-imagebfl/flux-1/dev

