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

# Quick Start Guide | Remove Video Background in 5 Minutes

> Quickstart guide to remove video backgrounds with AI. Learn API and SDK basics for video background removal with code examples and best practices.

## 1. Install the SDK

Choose your development environment and install the VideoBGRemover SDK:

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

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

### Node.js Installation

<CodeGroup>
  ```bash npm theme={"dark"}
  npm install @videobgremover/sdk
  ```

  ```bash yarn theme={"dark"}
  yarn add @videobgremover/sdk
  ```

  ```bash pnpm theme={"dark"}
  pnpm add @videobgremover/sdk
  ```
</CodeGroup>

### Python Installation

<CodeGroup>
  ```bash pip theme={"dark"}
  pip install videobgremover
  ```

  ```bash poetry theme={"dark"}
  poetry add videobgremover
  ```

  ```bash pipenv theme={"dark"}
  pipenv install videobgremover
  ```
</CodeGroup>

### FFmpeg Installation (Required)

The SDK requires FFmpeg for video composition operations:

<CodeGroup>
  ```bash macOS theme={"dark"}
  brew install ffmpeg
  ```

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

  ```bash Windows theme={"dark"}
  # Download from https://ffmpeg.org/download.html
  # Add to PATH environment variable
  ```
</CodeGroup>

## 2. Get Your API Key

You'll need an API key for background removal:

<Steps>
  <Step title="Sign up for an account">
    Visit [videobgremover.com](https://videobgremover.com) and create an account.
  </Step>

  <Step title="Purchase credits">
    Buy credits for video processing. Pricing is based on video duration.
  </Step>

  <Step title="Create an API key">
    Go to [API Management](https://videobgremover.com/api-management) and create your first API key.
  </Step>
</Steps>

## 3. Remove Backgrounds

Now you're ready to remove backgrounds from videos:

<CodeGroup>
  ```typescript Node.js theme={"dark"}
  // 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())
  ```

  ```python Python theme={"dark"}
  # Perfect for: Python apps, data science, automation

  from videobgremover import VideoBGRemoverClient, Video

  client = VideoBGRemoverClient('vbr_your_api_key')
  video = Video.open('https://example.com/video.mp4')

  # Remove background (handles everything automatically)
  transparent = video.remove_background(client)

  print(f'Background removed! Format: {transparent.format}')
  ```

  ```bash cURL theme={"dark"}
  # Perfect for: Simple scripts, webhooks, any language

  # 1. Create job from URL
  JOB_RESPONSE=$(curl -s -X POST https://api.videobgremover.com/v1/jobs \
    -H "X-Api-Key: vbr_your_api_key" \
    -d '{"video_url": "https://example.com/video.mp4"}')

  JOB_ID=$(echo $JOB_RESPONSE | jq -r '.id')

  # 2. Start processing
  curl -X POST https://api.videobgremover.com/v1/jobs/$JOB_ID/start \
    -H "X-Api-Key: vbr_your_api_key" \
    -d '{"background": {"type": "transparent", "transparent_format": "webm_vp9"}}'

  # 3. Check status
  curl -X GET https://api.videobgremover.com/v1/jobs/$JOB_ID/status \
    -H "X-Api-Key: vbr_your_api_key"
  ```
</CodeGroup>

## 4. Create Compositions

After removing backgrounds, create professional video compositions:

<CodeGroup>
  ```typescript Node.js theme={"dark"}
  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')
  ```

  ```python Python theme={"dark"}
  from videobgremover import (
      Background,
      Composition,
      EncoderProfile,
      Anchor,
      SizeMode
  )

  # 1. Create custom background
  background = Background.from_color('#FF0000', 1920, 1080, 30)

  # 2. Create composition
  composition = 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)
  composition.to_file('final.mp4', EncoderProfile.h264())

  print('✅ Composition created: final.mp4')
  ```
</CodeGroup>

## 5. Complete End-to-End Example

Here's a complete workflow from background removal to final video:

<CodeGroup>
  ```typescript Node.js theme={"dark"}
  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()
  ```

  ```python Python theme={"dark"}
  from videobgremover import (
      VideoBGRemoverClient, Video, Background, Composition,
      EncoderProfile, Anchor, SizeMode
  )

  def complete_workflow():
      # 1. Remove background (API call - uses credits)
      client = VideoBGRemoverClient('vbr_your_api_key')
      video = Video.open('https://example.com/person.mp4')
      transparent = video.remove_background(client)

      # 2. Create composition (local FFmpeg - no credits)
      background = Background.from_image('office.jpg', fps=30)
      comp = Composition(background)

      # 3. Position and layer
      comp.add(transparent, 'person') \
          .at(Anchor.CENTER) \
          .size(SizeMode.CONTAIN) \
          .opacity(0.95)

      # 4. Export final video
      comp.to_file('person_in_office.mp4', EncoderProfile.h264())

      print('✅ Complete! Person now appears in office background.')

  complete_workflow()
  ```
</CodeGroup>

## 6. What's Next?

<CardGroup cols={2}>
  <Card title="🎬 Background Removal Guide" icon="scissors" href="/video-background-removal/guide">
    Complete guide to removing backgrounds with different methods
  </Card>

  <Card title="🎨 Video Composition Guide" icon="layers" href="/video-composition/overview">
    Learn to create professional compositions with custom backgrounds
  </Card>

  <Card title="🛠️ Composition Builder" icon="wand-magic-sparkles" href="https://videobgremover.com/composition-builder">
    Visual tool to design compositions
  </Card>

  <Card title="📖 Installation Guide" icon="download" href="/installation">
    Detailed SDK installation and FFmpeg setup
  </Card>

  <Card title="🍳 Complete Examples" icon="book" href="/examples">
    See end-to-end examples and common patterns
  </Card>

  <Card title="📖 API Reference" icon="code" href="/api-reference/introduction">
    Explore the complete API and SDK documentation
  </Card>
</CardGroup>
