GET
/v1/schemas/fal/image/fal-ai%2Fbirefnet%2Fv2
Accept:
Request body
8 properties · 1 required · 0 $defs| property | type | description | constraints |
|---|---|---|---|
| image_url* | string | URL of the image to remove background from | |
| output_format | enum | The format of the output image | webp | png | gif · default: "png" |
| operating_resolution | enum | The 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. | 1024x1024 | 2048x2048 | 2304x2304 · default: "1024x1024" |
| refine_foreground | boolean | Whether to refine the foreground using the estimated mask | default: true |
| model | enum | 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 (H… | General Use (Light) | General Use (Light 2K) | General Use (Heavy) | Matting | Portrait | General Use (Dynamic) · default: "General Use (Light)" |
| mask_only | boolean | Whether 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. | default: false |
| output_mask | boolean | Whether to output the mask used to remove the background | default: false |
| sync_mode | boolean | If `True`, the media will be returned as a data URI and the output data won't be available in the request history. | default: false |
Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"fal","endpointId":"fal-ai/birefnet/v2","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}