PlayVideo Video API Documentation
Simple video hosting for developers. Upload, transcode, and stream video with one API call.
Quick Start
Get your first video streaming in 60 seconds:
# 1. Get your API key from the dashboard
# /dashboard/api-keys
# 2. Upload a video
curl -X POST https://api.playvideo.dev/v1/videos \
-H "Authorization: Bearer play_live_your_api_key" \
-F "[email protected]" \
-F "collection=my-app"
# 3. Get the HLS stream URL from the response
# { "video": { "id": "xxx", "playlistUrl": "https://..." } }
Why PlayVideo?
| Feature | PlayVideo | Others |
|---|---|---|
| Time to first video | < 60 seconds | 10-30 minutes |
| API endpoints to learn | ~10 | 50+ |
| Pricing | Simple, flat | Calculator required |
| Encoding cost | Free | Free-$$$$ |
| Bandwidth cost | Cheap | Expensive |
| Self-hosting | Yes | No |
Core Concepts
Collections
Collections are like folders for organizing your videos. Create one per project, customer, or category.
await bb.collections.create({ name: 'Tutorial Videos' });
Videos
Upload any video format. We transcode it to HLS for universal playback on any device.
const video = await bb.videos.upload({
file: './video.mp4',
collection: 'tutorial_videos'
});
Streaming
Every video gets an HLS playlist URL that works with any video player.
<video src="https://cdn.playvideo.dev/.../playlist.m3u8" controls></video>
SDKs & Tools
Guides
- Getting Started - Your first video in 5 minutes
- Authentication - API keys and security
- Uploading Videos - Upload methods and best practices
- Playing Videos - Video players and embedding
- Webhooks - Real-time notifications
- Self-Hosting - Deploy on your infrastructure
Framework Guides
- Next.js - Add video to Next.js apps
- React - Video components for React
- Vue - Vue.js integration
- Remix - Remix video handling