fa6d2efc9689
Remove Background
Try out this capability in Bria's sandbox
Description Initiates an asynchronous background removal job for a video.
Need real-time / low-latency background removal? See Streaming Background Removal for the WebSocket-based variant.
Response behavior:
-
Returns HTTP 202 with request_id and status_url
-
Check job status by polling status_url or by calling the Status Service with the request_id until a terminal status is returned
Supported input containers:
- .mp4, .mov, .webm, .avi, .gif
Supported input codecs:
- H.264, H.265 (HEVC), VP9, AV1, PhotoJPEG
Input attributes preserved in output:
-
Aspect Ratio and resolution (unless auto_zoom is enabled - see Auto Zoom below)
-
Frame Rate
-
Audio if present
Limits:
-
Max input duration: 60 seconds
-
Resolutions: Input resolution up to 16000x16000 (16K). Inputs larger than this return 413 Payload Too Large. Output resolution matches the input resolution. When auto_zoom is enabled, the output is cropped to the foreground subject and may be smaller than the input.
Background and transparency control:
-
background_color must be one of the predefined string values listed below. Hex values are not supported. Default is Transparent.
-
If background_color is Transparent, the selected output preset must support alpha. Otherwise the server responds with 422 Unprocessable Entity.
Output transparency support by preset:
-
Alpha supported: webm_vp9, mov_proresks, mkv_vp9, mkv_raw, gif, mov_h265 when encoded as HEVC with Alpha
-
Alpha not supported: mp4_h264, mp4_h265, mkv_h264, mkv_h265, avi_h264
Auto Zoom:
-
Set auto_zoom to true to automatically crop the output video to the foreground subject, creating a zoom-in effect.
-
The crop is calculated once for the entire video - the smallest rectangle that contains the subject across all frames - so the framing is stable throughout, with no per-frame movement.
-
If the subject moves across a large portion of the frame, the crop is minimal and the output may match the input framing.
-
When cropping is applied, the output resolution and aspect ratio differ from the input.
-
Enabling this option increases processing time.
Headers
Request body
Response
Accepted