Skip to main content
Endpoint: POST https://fal.run/bria/replace-background Endpoint ID: bria/replace-background

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(
    "bria/replace-background",
    arguments={},
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)

Capabilities

  • Text prompt input
  • Image input
  • Reproducible generation (seed)
  • Negative prompts
  • Synchronous mode

API Reference

Input Schema

prompt
string
Prompt for background replacement.
image_url
string
Reference image (file or URL). Default value: "https://v3b.fal.media/files/b/0a8bea8c/Mztgx0NG3HPdby-4iPqwH_a_coffee_machine_standing_in_the_kitchen.png"
seed
integer
default:"4925634"
Random seed for reproducibility. Default value: 4925634
steps_num
integer
default:"30"
Number of inference steps. Default value: 30
negative_prompt
string
default:""
Negative prompt for background replacement. Default value: ""
sync_mode
boolean
default:"false"
If true, returns the image directly in the response (increases latency).

Output Schema

image
Image
required
Generated image.
images
list<object>
Generated images.

Input Example

{
  "prompt": "On a smooth kitchen counter in front of a blue and white patterned ceramic tile wall. A yellow ceramic mug sits to the right. Shot from a straight-on front angle.",
  "image_url": "https://v3b.fal.media/files/b/0a8bea8c/Mztgx0NG3HPdby-4iPqwH_a_coffee_machine_standing_in_the_kitchen.png",
  "seed": 4925634,
  "steps_num": 30,
  "negative_prompt": "",
  "sync_mode": false
}

Output Example

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