Documentation Index
Fetch the complete documentation index at: https://docs.videobgremover.com/llms.txt
Use this file to discover all available pages before exploring further.
1. Install the SDK
Choose your development environment and install the VideoBGRemover SDK:
Node.js SDK
TypeScript-first SDK for Node.js applications
Python SDK
Pythonic SDK with type hints and validation
Node.js Installation
npm install @videobgremover/sdk
Python Installation
pip install videobgremover
FFmpeg Installation (Required)
The SDK requires FFmpeg for video composition operations:
2. Get Your API Key
You’ll need an API key for background removal:
Purchase credits
Buy credits for video processing. Pricing is based on video duration.
3. Remove Backgrounds
Now you’re ready to remove backgrounds from videos:
// Perfect for: Node.js apps, TypeScript projects
import { VideoBGRemoverClient, Video } from '@videobgremover/sdk'
const client = new VideoBGRemoverClient('vbr_your_api_key')
const video = Video.open('https://example.com/video.mp4')
// Remove background (handles everything automatically)
const transparent = await video.removeBackground(client)
console.log('Background removed! Format:', transparent.getFormat())
4. Create Compositions
After removing backgrounds, create professional video compositions:
import {
Background,
Composition,
EncoderProfile,
Anchor,
SizeMode
} from '@videobgremover/sdk'
// 1. Create custom background
const background = Background.fromColor('#FF0000', 1920, 1080, 30)
// 2. Create composition
const composition = new Composition(background)
// 3. Add your transparent video
composition.add(transparent, 'main_video')
.at(Anchor.CENTER)
.size(SizeMode.CONTAIN)
// 4. Export final video (local FFmpeg processing)
await composition.toFile('final.mp4', EncoderProfile.h264())
console.log('✅ Composition created: final.mp4')
5. Complete End-to-End Example
Here’s a complete workflow from background removal to final video:
import {
VideoBGRemoverClient,
Video,
Background,
Composition,
EncoderProfile,
Anchor,
SizeMode
} from '@videobgremover/sdk'
async function completeWorkflow() {
// 1. Remove background (API call - uses credits)
const client = new VideoBGRemoverClient('vbr_your_api_key')
const video = Video.open('https://example.com/person.mp4')
const transparent = await video.removeBackground(client)
// 2. Create composition (local FFmpeg - no credits)
const background = Background.fromImage('office.jpg', 30)
const comp = new Composition(background)
// 3. Position and layer
comp.add(transparent, 'person')
.at(Anchor.CENTER)
.size(SizeMode.CONTAIN)
.opacity(0.95)
// 4. Export final video
await comp.toFile('person_in_office.mp4', EncoderProfile.h264())
console.log('✅ Complete! Person now appears in office background.')
}
completeWorkflow()
6. What’s Next?
🎬 Background Removal Guide
Complete guide to removing backgrounds with different methods
🎨 Video Composition Guide
Learn to create professional compositions with custom backgrounds
🛠️ Composition Builder
Visual tool to design compositions
📖 Installation Guide
Detailed SDK installation and FFmpeg setup
🍳 Complete Examples
See end-to-end examples and common patterns
📖 API Reference
Explore the complete API and SDK documentation