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

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/expand",
    arguments={
        "image_url": "https://storage.googleapis.com/falserverless/model_tests/orange.png",
        "canvas_size": [
            1200,
            674
        ]
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)

Capabilities

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

API Reference

Input Schema

image_url
string
required
The URL of the input image.
canvas_size
list<integer>
required
The desired size of the final image, after the expansion. should have an area of less than 5000x5000 pixels.
aspect_ratio
Enum
The desired aspect ratio of the final image. Will be used over original_image_size and original_image_location if provided.Possible values: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9
original_image_size
list<integer>
The desired size of the original image, inside the full canvas. Ensure that the ratio of input image foreground or main subject to the canvas area is greater than 15% to achieve optimal results. Will be ignored if aspect_ratio is provided.
original_image_location
list<integer>
The desired location of the original image, inside the full canvas. Provide the location of the upper left corner of the original image. The location can also be outside the canvas (the original image will be cropped). Will be ignored if aspect_ratio is provided.
prompt
string
default:""
Text on which you wish to base the image expansion. This parameter is optional. Bria currently supports prompts in English only, excluding special characters. Default value: ""
seed
integer
You can choose whether you want your generated expension to be random or predictable. You can recreate the same result in the future by using the seed value of a result from the response. You can exclude this parameter if you are not interested in recreating your results. This parameter is optional.Range: 0 to 2147483647
negative_prompt
string
default:""
The negative prompt you would like to use to generate images. Default value: ""
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

image
Image
required
The generated image
seed
integer
required
Seed value used for generation.

Input Example

{
  "image_url": "https://storage.googleapis.com/falserverless/model_tests/orange.png",
  "canvas_size": [
    1200,
    674
  ],
  "original_image_size": [
    610,
    855
  ],
  "original_image_location": [
    301,
    -66
  ],
  "prompt": "",
  "negative_prompt": "",
  "sync_mode": false
}

Output Example

{
  "image": {
    "content_type": "image/png",
    "file_name": "afa402a35ea742cdb5c3e219b2b19bfb.png",
    "file_size": 1471342,
    "height": 674,
    "url": "https://v3.fal.media/files/koala/8np-spgxxG-I1r3cjthRV_afa402a35ea742cdb5c3e219b2b19bfb.png",
    "width": 1200
  }
}

Limitations

  • seed range: 0 to 2147483647