Skip to main content

Choose Your Approach

There are two main ways to remove backgrounds from videos:

🛠️ SDK Method

Best for: Complete workflows, video composition Language: Node.js, Python Features: Automatic error handling, progress tracking

🌐 Direct API

Best for: Simple scripts, custom integrations Language: Any (HTTP requests) Features: Full control, webhook integration
The easiest way to get started with background removal:

SDK Features

  • Automatic Error Handling: SDK catches and explains common errors
  • Progress Tracking: Optional callbacks for processing status
  • Format Selection: Easy format configuration
  • File Management: Handles uploads and downloads automatically

Direct API Method

For custom integrations and maximum control:

URL Workflow

Perfect when your videos are already hosted online:
1

Create Job from URL

Response: Job ID with uploaded status (ready to process)
2

Start Processing

Credits deducted here based on video length
3

Monitor & Download

Poll until status is completed, then download from provided URLs

Real-time Notifications with Webhooks

Instead of polling the status endpoint, get instant notifications when processing completes:
Webhook Payload:
Your webhook endpoint must return a 2xx status code within 30 seconds. For detailed webhook implementation, see the webhook deliveries endpoint documentation.

File Upload Workflow

For local video files:
1

Create Job

Response: Upload URL and job ID
2

Upload Video

Note: This is a direct upload to cloud storage
3

Start Processing

Credits deducted here based on video length
4

Monitor & Download

Poll until status is completed, then download from provided URLs

Complete Examples

Error Handling

Common Issues

API-Specific Errors

Background Options with cURL

Here are the correct cURL commands for different background types:

Format Selection

Choose the format that best fits your workflow: Note: For detailed technical usage of each format, see the Output Formats Guide.

Performance Tips

For Large Files

  • Use URL workflow for files >100MB
  • Process long videos in segments
  • Consider reducing resolution before processing

For Batch Processing

  • Process videos sequentially, not in parallel
  • Implement retry logic for network issues
  • Monitor credit usage to avoid depletion

For Production Use

  • Use webhooks for real-time notifications (see above)
  • Use background threads for processing
  • Implement proper error handling and retry logic
  • Store job IDs for status tracking
  • Monitor your credit usage and balance

What’s Next?

🎨 Add Custom Backgrounds

Layer your transparent video with colors, images, or videos

📖 Output Formats Guide

Technical details for using different transparent video formats