API Documentation
Integrate StreamStack into your application with our REST API.
Authentication
All API requests require an API key passed via the Authorization header.
Authorization: Bearer YOUR_API_KEY
Generate API keys from the StreamStack Dashboard → API Keys section. Each key is scoped to a single tenant.
Media
List videos
GET /api/v1/media Accept: application/json
Returns paginated list of videos with status, duration, resolution, and URLs.
Get video details
GET /api/v1/media/{uuid}
Accept: application/json
Delete video
DELETE /api/v1/media/{uuid}
Authorization: Bearer YOUR_API_KEY
Permanently deletes the video, all transcoded versions, HLS segments, and thumbnails.
Upload
Direct upload (presigned URL)
POST /api/v1/upload/presign
Content-Type: application/json
{
"title": "My Video",
"filename": "video.mp4",
"content_type": "video/mp4"
}
Returns a presigned URL for direct upload to object storage. Maximum file size: 100 MB via panel, unlimited via API.
Upload from URL
POST /api/v1/upload/url
Content-Type: application/json
{
"title": "My Video",
"url": "https://example.com/video.mp4"
}
Transcode
Transcoding starts automatically after upload. Available profiles:
| Profile | Resolution | Bitrate | Preset |
|---|---|---|---|
| 8K | 7680×4320 | 40 Mbps | slow |
| 4K | 3840×2160 | 18 Mbps | slow |
| 1080p | 1920×1080 | 5 Mbps | fast |
| 720p | 1280×720 | 2.5 Mbps | fast |
| 480p | 854×480 | 1.2 Mbps | fast |
| 360p | 640×360 | 600 kbps | fast |
Output: HLS (MPEG-TS segments) with AES-128 encryption. Adaptive bitrate with automatic quality selection.
Statistics
Get video stats
GET /api/v1/media/{uuid}/stats?period=7d
Accept: application/json
Periods: 15m, 1h, 6h, 24h, 7d, 30d, 3m, 6m, 1y, all
Returns: views, watching now, average watch time, completion rate, quality distribution, device/browser/geo breakdown.
Embed Player
<iframe src="https://streamstack.it/player/{uuid}"
width="854" height="480" frameborder="0"
allowfullscreen allow="encrypted-media; autoplay">
</iframe>
Parameters: ?autoplay=1, ?loop=1, ?mute=1
Webhooks
StreamStack can notify your application when events occur:
media.uploaded— Video uploaded successfullymedia.transcoded— All profiles transcodedmedia.published— Video published and playablemedia.failed— Transcode pipeline failed
Configure webhook URLs in the Dashboard → Settings.
Error Codes
| Code | Description |
|---|---|
| 401 | Invalid or missing API key |
| 403 | Insufficient permissions (wrong tenant) |
| 404 | Resource not found |
| 413 | File too large |
| 422 | Validation error (check response body) |
| 429 | Rate limit exceeded (30 req/s) |
| 500 | Internal server error |