# Bria Eraser (FIBO-Edit-1.5)

> Bria Eraser removes what a mask covers and fills in the scene behind it, in one of two modes picked with `composite`. Context aware, the default, also removes the shadow or reflection the object casts outside the mask. Pixel perfect rebuilds only the masked area and keeps everything outside the mask as it was. Built on Bria's FIBO-Edit-1.5, trained on licensed data for commercial use.


## Overview

- **Endpoint**: `https://fal.run/bria/fibo-edit-1.5/eraser`
- **Model ID**: `bria/fibo-edit-1.5/eraser`
- **Category**: image-to-image
- **Kind**: inference
**Description**: Paint a mask over a bike on a sunny street and most erasers take the bike and leave its shadow on the road, cast by nothing. Bria Eraser takes the shadow with it, and you mask only the bike. The same goes for a reflection: mask a kayak on a still lake and its reflection leaves too.

Sometimes you need the opposite. When you retouch 4K catalog photos, everything outside the mask has to stay exactly as it was. So the same mask works in two modes, picked with one parameter, `composite`. Context aware (`false`, the default) removes the object and what it casts on the scene. Pixel perfect (`true`) rebuilds only the masked area, blends it in through a feathered edge, and keeps everything outside the mask as it was, at the input's full resolution.

The result comes back at the input's own size, tested at 3072x3840 in and out. Set `preserve_alpha` and a transparent input keeps its alpha channel. Built on FIBO-Edit-1.5, trained on licensed data only, $0.04 per image.

**Tags**: object removal, AI eraser, remove object from photo, shadow removal, reflection removal, inpainting, photo retouching, e-commerce, 4K, commercial use, licensed AI



## Pricing

Your request will cost **$0.04** per image.

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`image_url`** (`string`, _required_):
  The image to erase from.
  - Examples: "https://labs-assets.bria.ai/api-examples/fibo-edit-1.5-eraser/coffee_cup_input.jpg"

- **`mask_url`** (`string`, _required_):
  A binary mask the same size as the image. White marks what to remove, black what to keep. Send it lossless -- a JPEG mask's compression noise on nominally black pixels reads as more to erase.
  - Examples: "https://labs-assets.bria.ai/api-examples/fibo-edit-1.5-eraser/coffee_cup_mask.png"

- **`mask_type`** (`MaskTypeEnum`, _optional_):
  How the mask was made. Accepted for compatibility with the SDXL eraser, where it selects how far the mask is grown; this model is trained on the exact silhouette and does not grow it. Default value: `"manual"`
  - Default: `"manual"`
  - Options: `"manual"`, `"automatic"`

- **`composite`** (`boolean`, _optional_):
  Pick the erase mode. False (default), context aware: removes the object and also the shadow or reflection it casts outside the mask. True, pixel perfect: only the masked area is rebuilt, and everything outside the mask stays as it was, at full resolution.
  - Default: `false`

- **`sync_mode`** (`boolean`, _optional_):
  If true, returns the image directly in the response (increases latency).
  - Default: `false`

- **`preserve_alpha`** (`boolean`, _optional_):
  Keep the input's transparency. The model works in RGB, so the alpha channel is not regenerated -- the original's own is carried through onto the result.
  - Default: `false`

- **`seed`** (`integer`, _optional_):
  Reuse the seed from a previous response to recreate that result. Omit it for a random one, which is reported in the response either way.
  - Range: `0` to `2147483647`



**Required Parameters Example**:

```json
{
  "image_url": "https://labs-assets.bria.ai/api-examples/fibo-edit-1.5-eraser/coffee_cup_input.jpg",
  "mask_url": "https://labs-assets.bria.ai/api-examples/fibo-edit-1.5-eraser/coffee_cup_mask.png"
}
```

**Full Example**:

```json
{
  "image_url": "https://labs-assets.bria.ai/api-examples/fibo-edit-1.5-eraser/coffee_cup_input.jpg",
  "mask_url": "https://labs-assets.bria.ai/api-examples/fibo-edit-1.5-eraser/coffee_cup_mask.png",
  "mask_type": "manual"
}
```


### Output Schema

The API returns the following output format:

- **`image`** (`Image`, _required_):
  The image with the masked region erased.

- **`seed`** (`integer`, _required_):
  The seed used, so the result can be reproduced.



**Example Response**:

```json
{
  "image": {
    "url": "",
    "content_type": "image/png",
    "file_name": "z9RV14K95DvU.png",
    "file_size": 4404019,
    "width": 1024,
    "height": 1024
  }
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/bria/fibo-edit-1.5/eraser \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "image_url": "https://labs-assets.bria.ai/api-examples/fibo-edit-1.5-eraser/coffee_cup_input.jpg",
     "mask_url": "https://labs-assets.bria.ai/api-examples/fibo-edit-1.5-eraser/coffee_cup_mask.png"
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "bria/fibo-edit-1.5/eraser",
    arguments={
        "image_url": "https://labs-assets.bria.ai/api-examples/fibo-edit-1.5-eraser/coffee_cup_input.jpg",
        "mask_url": "https://labs-assets.bria.ai/api-examples/fibo-edit-1.5-eraser/coffee_cup_mask.png"
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

```javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("bria/fibo-edit-1.5/eraser", {
  input: {
    image_url: "https://labs-assets.bria.ai/api-examples/fibo-edit-1.5-eraser/coffee_cup_input.jpg",
    mask_url: "https://labs-assets.bria.ai/api-examples/fibo-edit-1.5-eraser/coffee_cup_mask.png"
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);
```


## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/bria/fibo-edit-1.5/eraser)
- [API Documentation](https://fal.ai/models/bria/fibo-edit-1.5/eraser/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=bria/fibo-edit-1.5/eraser)

### fal.ai Platform

- [Platform Documentation](https://fal.ai/docs/documentation)
- [Python Client](https://fal.ai/docs/api-reference/client-libraries/python)
- [JavaScript Client](https://fal.ai/docs/api-reference/client-libraries/javascript)

### Other agent-readable surfaces

This file covers one model. To find anything else:

- [Platform overview](https://fal.ai/llms.txt): Entry points and representative endpoint IDs
- [Documentation index](https://fal.ai/docs/llms.txt): Every documentation page
- [Full documentation text](https://fal.ai/docs/llms-full.txt): The whole documentation inlined
- Any other model: `https://fal.ai/models/<endpoint-id>/llms.txt`
