Skip to main content

Overview

The VideoBGRemoverClient handles all communication with the VideoBGRemover API for background removal operations. This is the API layer of the SDK - it handles authentication, job management, and credit tracking.
API Layer: This class makes HTTP requests to our servers and consumes credits. For local video composition (no credits), see Composition.

Constructor

Parameters

Methods

credits()

Check your current credit balance.
Returns: Promise<Credits>

Low-Level API Methods

These methods provide direct access to the REST API. Most users should use the high-level Video.removeBackground() method instead.

createJobFile()

Create a job for file upload.

createJobUrl()

Create a job for URL download.

startJob()

Start processing a job.

status()

Check job processing status.

wait()

Wait for a job to complete with polling.

deleteJob()

Delete a job and all associated files.
This action is permanent and cannot be undone. No credit refunds are provided.
Returns: { id: string, message: string }

Error Handling

The client throws specific exceptions for different error conditions:

Usage with Video Class

The recommended way to use the client is through the Video class:

Best Practices

Credit Management

Error Recovery

Timeout Handling