Skip to main content
Endpoint: POST https://fal.run/fal-ai/bria/eraser Endpoint ID: fal-ai/bria/eraser

Try it in the Playground

Run this model interactively with your own prompts.

Quick Start

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(
    "fal-ai/bria/eraser",
    arguments={
        "image_url": "https://storage.googleapis.com/falserverless/bria/bria_eraser_img.png",
        "mask_url": "https://storage.googleapis.com/falserverless/bria/bria_eraser_mask.png"
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)

Capabilities

  • Image input
  • Inpainting (mask support)
  • Synchronous mode

API Reference

Input Schema

image_url
string
required
Input Image to erase from
mask_url
string
required
The URL of the binary mask image that represents the area that will be cleaned.
mask_type
MaskTypeEnum
default:"manual"
You can use this parameter to specify the type of the input mask from the list. ‘manual’ opttion should be used in cases in which the mask had been generated by a user (e.g. with a brush tool), and ‘automatic’ mask type should be used when mask had been generated by an algorithm like ‘SAM’. Default value: "manual"Possible values: manual, automatic
sync_mode
boolean
default:"false"
If True, the media will be returned as a data URI and the output data won’t be available in the request history.
preserve_alpha
boolean
default:"false"
If set to true, attempts to preserve the alpha channel of the input image.

Output Schema

image
Image
required
The generated image

Input Example

{
  "image_url": "https://storage.googleapis.com/falserverless/bria/bria_eraser_img.png",
  "mask_url": "https://storage.googleapis.com/falserverless/bria/bria_eraser_mask.png",
  "mask_type": "manual",
  "sync_mode": false,
  "preserve_alpha": false
}

Output Example

{
  "image": {
    "content_type": "image/png",
    "url": "https://storage.googleapis.com/falserverless/bria/bria_eraser_res.png"
  }
}

Limitations

  • mask_type restricted to: manual, automatic