Hypervideo Documentation

Generate and play transparent videos, everywhere.

Transparent Video Formats

Hypervideo removes backgrounds from videos and outputs them in multiple transparent formats — WebP, APNG, WebM, MOV, and Stacked Alpha. Each has trade-offs: WebP gives the smallest files, APNG works in <img> tags on iOS, WebM is fast to process but Chrome-only. See the Output Formats page for a full comparison.

What is Stacked Alpha Video?

Safari, iOS, and most Apple platforms don't natively support transparent video — WebM with alpha doesn't work, and ProRes is too large for the web. HEVC with alpha does work on Apple devices, but can only be encoded locally on macOS hardware — it can't be processed on cloud servers. Stacked alpha solves this by encoding both color and transparency into a single standard H.264 video:

  • Top half — the original RGB color frames
  • Bottom half — a grayscale alpha mask (white = opaque, black = transparent)

Because it's just H.264, it plays on every platform — web, iOS, Android, desktop. Our open-source player SDKs (React, Expo, Swift) use a GPU shader (WebGL or Metal) to composite both halves in real-time, producing transparent output on top of any background.

Stacked alpha files are small (5-10MB for a 6 second clip), work cross-platform without codec compatibility issues, and the player is a single lightweight component. It's the recommended format when you need transparent video everywhere.

Quick Start

Install the SDK and remove your first video background in under a minute.

1. Install

bash
npm install @hypervideo-dev/sdk

2. Get an API Key

Sign in at hypervideo.dev/keys and create an API key. Or use the CLI:

bash
npx @hypervideo-dev/cli login

3. Remove a Video Background

typescript
import { Hypervideo } from '@hypervideo-dev/sdk';
const client = new Hypervideo({ apiKey: 'hc_...' });
const result = await client.video.removeBackground({
file: videoFile,
formats: ['webp', 'stacked-alpha'],
});
console.log(result.outputs[0].url);

4. Play Transparent Video

tsx
import { StackedAlphaVideo } from '@hypervideo-dev/react';
<StackedAlphaVideo
src="/mascot-stacked.mp4"
width={384}
height={384}
autoPlay
loop
muted
/>

Explore

Authentication

All API endpoints require Bearer token authentication:

bash
Authorization: Bearer YOUR_API_KEY

API keys start with hc_. Get yours from the API Keys page or via hypervideo login.

Response Format

All endpoints return JSON with a consistent shape:

json
// Success
{
"success": true,
"data": { ... }
}
// Error
{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Description"
}
}