Skip to content

fal.ai · Background removal

BiRefNet v2

BiRefNet v2, background removal, served by fal.ai. The OpenAPI schema for the fal-ai/birefnet/v2 queue. Price: Page states $0 per compute second at the time of writing.

Free fal.aiImagefal/birefnet-v2Active

Use this tool with your agent

Give this to your agent
Use my connected Agentik MCP server. I want to use the tool fal/birefnet-v2 (BiRefNet v2, background removal). Call inspect_tool with {"tool_id": "fal/birefnet-v2"} first and tell me the price before anything runs. Ask me for the inputs it needs; never invent values, IDs or file URLs. When I confirm, call run_tool with tool_id "fal/birefnet-v2" and my inputs, follow it with get_run if it is still running, and give me the result and the price Agentik reports. If the tool is unavailable, say so and use discover_tools to propose an alternative.
Show the prompt

Paste it into Claude, ChatGPT or Codex: your agent takes it from there, and shows the price before it runs.

Parameters

NameTypeRequiredDescription
refine_foregroundbooleanNoWhether to refine the foreground using the estimated mask
image_urlstringYesURL of the image to remove background from
output_maskbooleanNoWhether to output the mask used to remove the background
output_formatstringNoThe format of the output image Options: webp, png, gif.
mask_onlybooleanNoWhether to return only the segmentation mask without applying it to the image. When set to `True`, only the mask will be returned and foreground refinement will be skipped. Useful for reducing computation and data transfer when only the mask is needed.
modelstringNo Model to use for background removal. The 'General Use (Light)' model is the original model used in the BiRefNet repository. The 'General Use (Light 2K)' model is the original model used in the BiRefNet repository but trained with 2K images. The 'General Use (Heavy)' model is a slower but more accurate model. The 'Matting' model is a model trained specifically for matting images. The 'Portrait' model is a model trained specifically for portrait images. The 'General Use (Dynamic)' model supports dynamic resolutions from 256x256 to 2304x2304. The 'General Use (Light)' model is recommended for most use cases. The corresponding models are as follows: - 'General Use (Light)': BiRefNet - 'General Use (Light 2K)': BiRefNet_lite-2K - 'General Use (Heavy)': BiRefNet_lite - 'Matting': BiRefNet-matting - 'Portrait': BiRefNet-portrait - 'General Use (Dynamic)': BiRefNet_dynamic Options: General Use (Light), General Use (Light 2K), General Use (Heavy), Matting, Portrait, General Use (Dynamic).
operating_resolutionstringNoThe resolution to operate on. The higher the resolution, the more accurate the output will be for high res input images. The '2304x2304' option is only available for the 'General Use (Dynamic)' model. Options: 1024x1024, 2048x2048, 2304x2304.

How your agent calls it

First inspect_tool for the current schema and price, then run_tool with the published example after confirming your inputs:

{
  "tool_id": "fal/birefnet-v2",
  "input": {
    "image_url": "https://storage.googleapis.com/falserverless/example_outputs/nano-banana-2-t2i-output.png"
  }
}

Price and billing

Price
Free
Model
Per call
Detail
No charge per call. A workspace is still needed so your agent can call it.
  • The provider’s price, 0% markup.
  • One prepaid balance for every provider; your agent sees the price before it runs.
  • Pay for measured usage; unused reservations are released.