> ## 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.

# Installation Guide | Install Video Background Remover SDK

> Install VideoBGRemover SDK for Python and Node.js. Complete setup guide with FFmpeg configuration and API key setup for video background removal.

## Choose Your SDK

The VideoBGRemover SDKs provide a complete solution for background removal and video composition. Choose the SDK that matches your development environment:

<CardGroup cols={2}>
  <Card title="Node.js SDK" icon="js" href="#nodejs-sdk">
    TypeScript-first SDK for Node.js applications
  </Card>

  <Card title="Python SDK" icon="python" href="#python-sdk">
    Pythonic SDK with type hints and validation
  </Card>
</CardGroup>

## Installation

### Requirements

<CodeGroup>
  ```bash Node.js theme={"dark"}
  # Requirements:
  # - Node.js 16+
  # - FFmpeg (required for video composition)
  # - VideoBGRemover API key

  npm install @videobgremover/sdk
  ```

  ```bash Python theme={"dark"}
  # Requirements:
  # - Python 3.9+
  # - FFmpeg (required for video composition)
  # - VideoBGRemover API key

  pip install videobgremover
  ```
</CodeGroup>

### Verify Installation

<CodeGroup>
  ```typescript Node.js theme={"dark"}
  import { VideoBGRemoverClient, Video, Background, Composition } from '@videobgremover/sdk'

  // Check if FFmpeg is available
  import { MediaContext } from '@videobgremover/sdk'
  const ctx = new MediaContext()
  console.log('FFmpeg available:', ctx.checkWebmSupport())
  ```

  ```python Python theme={"dark"}
  from videobgremover import VideoBGRemoverClient, Video, Background, Composition
  from videobgremover import MediaContext

  # Check if FFmpeg is available
  ctx = MediaContext()
  print('FFmpeg available:', ctx.check_webm_support())
  ```
</CodeGroup>

## FFmpeg Installation

The SDKs require FFmpeg for video composition operations. Here's how to install it:

<CodeGroup>
  ```bash macOS theme={"dark"}
  # Using Homebrew (recommended)
  brew install ffmpeg

  # Verify installation
  ffmpeg -version
  ffprobe -version
  ```

  ```bash Ubuntu/Debian theme={"dark"}
  # Using apt
  sudo apt update
  sudo apt install ffmpeg

  # Verify installation
  ffmpeg -version
  ffprobe -version
  ```

  ```cmd Windows theme={"dark"}
  # 1. Download FFmpeg from https://ffmpeg.org/download.html
  # 2. Extract to a folder (e.g., C:\ffmpeg)
  # 3. Add C:\ffmpeg\bin to your PATH environment variable
  # 4. Verify installation:

  ffmpeg -version
  ffprobe -version
  ```

  ```dockerfile Docker theme={"dark"}
  # Add to your Dockerfile
  RUN apt-get update && apt-get install -y ffmpeg

  # Or use a base image with FFmpeg
  FROM node:18-alpine
  RUN apk add --no-cache ffmpeg
  ```
</CodeGroup>

## API Key Setup

Get your API key from the [VideoBGRemover Dashboard](https://videobgremover.com/api-management):

<Steps>
  <Step title="Create Account">
    Sign up at [videobgremover.com](https://videobgremover.com)
  </Step>

  <Step title="Purchase Credits">
    Buy credits for video processing
  </Step>

  <Step title="Generate API Key">
    Create an API key in the [API Management](https://videobgremover.com/api-management) dashboard
  </Step>
</Steps>

### Environment Setup

<CodeGroup>
  ```bash Node.js theme={"dark"}
  # Set environment variable
  export VIDEOBGREMOVER_API_KEY="vbr_your_api_key_here"

  # Or use .env file
  echo "VIDEOBGREMOVER_API_KEY=vbr_your_api_key_here" > .env
  ```

  ```bash Python theme={"dark"}
  # Set environment variable
  export VIDEOBGREMOVER_API_KEY="vbr_your_api_key_here"

  # Or use .env file
  echo "VIDEOBGREMOVER_API_KEY=vbr_your_api_key_here" > .env
  ```
</CodeGroup>

### Usage in Code

<CodeGroup>
  ```typescript Node.js theme={"dark"}
  // In your code
  const client = new VideoBGRemoverClient(process.env.VIDEOBGREMOVER_API_KEY!)
  ```

  ```python Python theme={"dark"}
  import os
  from videobgremover import VideoBGRemoverClient

  # In your code
  client = VideoBGRemoverClient(os.getenv("VIDEOBGREMOVER_API_KEY"))
  ```
</CodeGroup>

## Verify Everything Works

Test your complete setup with this simple example:

<CodeGroup>
  ```typescript Node.js theme={"dark"}
  import { VideoBGRemoverClient } from '@videobgremover/sdk'

  async function test() {
    const client = new VideoBGRemoverClient(process.env.VIDEOBGREMOVER_API_KEY!)
    
    // Check credits
    const credits = await client.credits()
    console.log(`✅ API connected. Credits: ${credits.remainingCredits}`)
    
    // Check FFmpeg
    const ctx = new MediaContext()
    const hasWebm = ctx.checkWebmSupport()
    console.log(`✅ FFmpeg ready. WebM support: ${hasWebm}`)
  }

  test()
  ```

  ```python Python theme={"dark"}
  from videobgremover import VideoBGRemoverClient, MediaContext
  import os

  def test():
      client = VideoBGRemoverClient(os.getenv("VIDEOBGREMOVER_API_KEY"))
      
      # Check credits
      credits = client.credits()
      print(f"✅ API connected. Credits: {credits.remaining_credits}")
      
      # Check FFmpeg
      ctx = MediaContext()
      has_webm = ctx.check_webm_support()
      print(f"✅ FFmpeg ready. WebM support: {has_webm}")

  test()
  ```
</CodeGroup>

## What's Next?

<CardGroup cols={2}>
  <Card title="Remove Video Backgrounds" icon="scissors" href="/video-background-removal/overview">
    Start removing backgrounds from your videos using AI
  </Card>

  <Card title="Create Video Compositions" icon="layers" href="/video-composition/overview">
    Layer videos with custom backgrounds and effects
  </Card>
</CardGroup>
