falImage to imageComing soon

fal-ai/birefnet

fal-ai/birefnet is an image to image tool from fal that runs in the background and returns images. Coming soon: listed with its price, not yet open to runs.

This tool is listed but not yet available to run.

Price pending

Pricing

Price pending.

Limits

Runs
In the background
Returns
image
Longest queue wait
3600s
Run deadline
1800s
Largest inline input
1024 KB
Largest input file
500 MB
Largest output
4768 MB
Outputs per run
16

Input

FieldKindDefaultDescription
modelone of
General Use (Light), General Use (Heavy), Portrait
General Use (Light) Model to use for background removal. The 'General Use (Light)' model is the original model used in the BiRefNet repository. The 'General Use (Heavy)' model is a slower but more accurate model. The 'Portrait' model is a model trained specifically for portrait images. The 'General Use (Light)' model is recommended for most use cases. The corresponding models are as follows: - 'General Use (Light)': BiRefNet-DIS_ep580.pth - 'General Use (Heavy)': BiRefNet-massive-epoch_240.pth - 'Portrait': BiRefNet-portrait-TR_P3M_10k-epoch_120.pth
operating_resolutionone of
1024x1024, 2048x2048
1024x1024The resolution to operate on. The higher the resolution, the more accurate the output will be for high res input images.
output_masktrue or falsefalseWhether to output the mask used to remove the background
refine_foregroundtrue or falsetrueWhether to refine the foreground using the estimated mask
image_url requiredURL or file—URL of the image to remove background from
output_formatone of
webp, png, gif
pngThe format of the output image

Same request in code

curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "fal",
    "model": "fal-ai/birefnet",
    "input": {
      "image_url": "https://storage.googleapis.com/falserverless/example_inputs/birefnet-input.jpeg"
    }
  }'