By · · Updated

BiRefNet v2: Image and Video Background Removal, Price and API

Remove image or video backgrounds with BiRefNet v2. Compare masks, output formats, operating resolution and compute-time pricing.

An amber perfume bottle on pale stone with leaf shadows behind it.

BiRefNet v2 separates foreground subjects from image or video backgrounds, with mask and foreground-refinement controls. On Raywake, both operations cost $0.01 per compute second, with a maximum of $0.28 per image run or $0.83 per video run. Operating-resolution choices are 1024x1024, 2048x2048 and 2304x2304. Compute seconds mean processing time, not the running time of a source video.

Use BiRefNet v2 for images or BiRefNet v2 for video according to the material you need to isolate. A product cutout and a moving presenter share a background-removal goal, but require different output decisions. Prices and settings are as of 31 October 2026.

BiRefNet v2 at a glance

SettingImage operationVideo operation
Required inputimage_urlvideo_url
Default selectionGeneral Use (Light)General Use (Light)
Operating resolution1024x1024, 2048x2048, 2304x2304Same choices
Default operating resolution1024x10241024x1024
Include maskoutput_maskoutput_mask
Mask-only inputmask_onlyNot listed
Refine foregroundTrue by defaultTrue by default
Maximum per run$0.28$0.83

How much does BiRefNet v2 cost?

Both entries use compute-time pricing. Keep the rate and maximum together when communicating an estimate.

OperationCompute-time rateMaximum per run
Image background removal$0.01 per compute second$0.28
Video background removal$0.01 per compute second$0.83

The source video's duration is not a direct multiplier for this table. A video second and a compute second measure different things. Use a quote to budget the run instead of estimating its cost from clip length.

Request a quote for the actual operation and settings. If you change operating resolution or output choices, treat that as a new request to review.

Do you need a cutout or a mask?

A cutout is useful when the next step is placing a subject on another background. A mask is useful when you want to control that separation in an editor. It represents the area to retain or remove rather than replacing the whole creative workflow.

The image operation offers both output_mask and mask_only, each defaulting to false. Use these fields deliberately according to whether you need the mask in addition to the result or as the main output. Video lists output_mask but does not list mask_only.

The image output choices are webp, png and gif, with png as the default. Video has its own output field and format names. Do not copy an image's output_format into a video request.

Which model and operating resolution should you choose?

Both operations expose General Use (Light), General Use (Light 2K), General Use (Heavy), Matting, Portrait and General Use (Dynamic). These are values of the inner model input, distinct from the endpoint ID.

Start with the default unless your material gives you a reason to compare another selection. A portrait should be inspected around hair and ears; a product cutout around glass, handles and small gaps.

Operating resolution is a processing setting. Do not describe it as a guaranteed final output dimension. Keep it fixed while comparing model selections so you can identify which change affected the result. refine_foreground is true by default in both operations.

How to call BiRefNet v2 through the API

The example requests an image quote with the default model and operating resolution, and asks for a mask alongside the background-removal result.

curl --fail-with-body https://api.raywake.com/v1/quotes \
  -H "Authorization: Bearer $RAYWAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"birefnet/v2","input":{"image_url":"https://example.com/product.jpg","model":"General Use (Light)","operating_resolution":"1024x1024","output_format":"png","output_mask":true}}'

For video, use birefnet/v2/video and replace image_url with video_url. Its video_output_type choices are X264 (.mp4), VP9 (.webm), PRORES4444 (.mov) and GIF (.gif). The default is X264 (.mp4).

Video also offers video_quality values low, medium, high and maximum, defaulting to high. video_write_mode offers fast, balanced and small, defaulting to balanced. Match the requested output to your editor and check the result rather than assuming every format handles transparency identically. The quotes reference covers the response flow.

What should you check before compositing?

View the isolated subject against both a light and dark background. This makes unwanted edge fringes and missing fine details easier to notice. Check holes within objects as well as the outside silhouette.

For video, watch the whole clip. A clean still frame does not show whether an edge flickers or disappears during motion. Inspect fast movement, hair and changing overlap with other objects. These are practical review steps, not claims that a specific selection eliminates all artifacts.

Common questions

Is the video price per second of footage?

No. You pay per compute second, with a maximum per run. Do not multiply the rate by source duration.

Can I request just an image mask?

Yes. The image operation includes mask_only. That field is not listed for video.

Does video use the same URL field?

No. Images use image_url and video uses video_url.

Is a text prompt required?

Neither operation requires a prompt. The required input is the source media URL.

Remove a background with BiRefNet v2
← All articles