fal-ai/birefnet
fal-ai/birefnet is an 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.
Pricing
Price pending
Limits
- Runs
- In the background
- Returns
- image
- Longest queue wait
- 1 hour
- Run deadline
- 30 minutes
- Longest run, end to end
- 225 minutes
- Largest inline input
- 1 MB
- Largest input file
- 500 MB
- Largest output
- 5 GB
- Outputs per run
- 16
Input
| Field | Kind | Default | Description |
|---|---|---|---|
model | one 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:
|
operating_resolution | one of 1024x1024, 2048x2048 | 1024x1024 | The resolution to operate on. The higher the resolution, the more accurate the output will be for high res input images. |
output_mask | true or false | false | Whether to output the mask used to remove the background |
refine_foreground | true or false | true | Whether to refine the foreground using the estimated mask |
image_url required | URL or file | — | URL of the image to remove background from |
output_format | one of webp, png, gif | png | The 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"
}
}'