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

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/genfill",
    arguments={
        "image_url": "https://storage.googleapis.com/falserverless/bria/bria_genfill_img.png",
        "mask_url": "https://storage.googleapis.com/falserverless/bria/bria_genfill_mask.png",
        "prompt": "A red delicious cherry"
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)

Capabilities

  • Image input
  • Inpainting (mask support)
  • Text prompt input
  • Negative prompts
  • Reproducible generation (seed)
  • Batch generation
  • 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.
prompt
string
required
The prompt you would like to use to generate images.
negative_prompt
string
default:""
The negative prompt you would like to use to generate images. Default value: ""
seed
integer
The same seed and the same prompt given to the same version of the model will output the same image every time.Range: 0 to 2147483647
num_images
integer
default:"1"
Number of Images to generate. Default value: 1Range: 1 to 4
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.

Output Schema

images
list<Image>
required
Generated Images
seed
integer
required
Seed value used for generation.

Input Example

{
  "image_url": "https://storage.googleapis.com/falserverless/bria/bria_genfill_img.png",
  "mask_url": "https://storage.googleapis.com/falserverless/bria/bria_genfill_mask.png",
  "prompt": "A red delicious cherry",
  "negative_prompt": "",
  "num_images": 1,
  "sync_mode": false
}

Output Example

{
  "images": [
    {
      "content_type": "image/png",
      "file_name": "a0d138e6820c4ad58f1fd3c758f16047.png",
      "file_size": 1064550,
      "height": 768,
      "url": "https://storage.googleapis.com/falserverless/bria/bria_genfill_res.png",
      "width": 1024
    }
  ]
}

Limitations

  • seed range: 0 to 2147483647
  • num_images range: 1 to 4