StreamVault API
Upload, transcode, stream and manage video programmatically. All access over HTTPS, JSON in/out. Build powerful video integrations in minutes.
Introduction
The StreamVault REST API lets you upload, manage and stream video at scale. All data is sent and received as JSON. Timestamps are UNIX epoch integers (seconds).
Content-Type: application/json. Errors always return { "error": "..." }.
Authentication
StreamVault supports two auth methods. All endpoints require Authorization header + X-Workspace-Id.
Bearer Token (JWT)
Obtain via POST /auth/login. Expires in 15 min — use POST /auth/refresh.
API Key Pro+
Keys start with sv_live_. Shown once at creation — save securely.
Errors & Rate Limits
Conventional HTTP status codes. Errors always carry a human-readable error field.
| Status | Meaning |
|---|---|
| 200 | Success |
| 201 | Resource created |
| 202 | Accepted — async job queued |
| 400 | Bad request — missing/invalid parameters |
| 401 | Unauthenticated — invalid/expired token |
| 403 | Forbidden — insufficient plan or role |
| 404 | Resource not found |
| 429 | Rate limit exceeded |
| 503 | Service unavailable |
Video Management
multipart/form-data. Max: 10 GB. Async — poll or use webhooks.
| Field | Type | Description | |
|---|---|---|---|
| video | file | required | MP4, MKV, MOV, AVI, WebM |
| title | string | required | Display title |
| description | string | optional | Long description |
| folder_id | string | optional | Target folder |
| visibility | string | optional | public · private · password |
curl -X POST https://api.streamvault.link/api/upload \ -H "Authorization: Bearer sv_live_YOUR_KEY" \ -H "X-Workspace-Id: ws_YOUR_WORKSPACE" \ -F "video=@/path/to/movie.mp4" \ -F "title=My Awesome Video" \ -F "visibility=public"
{
"id": "vid_a1b2c3",
"title": "My Awesome Video",
"status": "queued",
"workspace_id": "ws_YOUR_WORKSPACE",
"created_at": 1714500000
}
| Param | Type | Default | Description |
|---|---|---|---|
| page | integer | 1 | Page number |
| limit | integer | 20 | Results per page (max 100) |
| search | string | — | Full-text search |
| folder_id | string | — | Filter by folder |
| status | string | — | ready · processing · error |
curl "https://api.streamvault.link/api/videos?page=1&limit=20" \ -H "Authorization: Bearer sv_live_YOUR_KEY" \ -H "X-Workspace-Id: ws_YOUR_WORKSPACE"
curl https://api.streamvault.link/api/videos/vid_a1b2c3 \ -H "Authorization: Bearer sv_live_YOUR_KEY" \ -H "X-Workspace-Id: ws_YOUR_WORKSPACE"
| Field | Type | Description | |
|---|---|---|---|
| title | string | optional | New title |
| description | string | optional | New description |
| visibility | string | optional | public · private · password |
| folder_id | string|null | optional | Move to folder (null to remove) |
{"success":true}| Field | Type | Description | |
|---|---|---|---|
| ids | string[] | required | Video IDs (max 200) |
| action | string | required | delete · move · visibility |
Playback & Delivery
Append ?token=TOKEN to HLS URLs. Auto-renews 2 min before expiry.
{ "token": "sv_tok_ab12cd34...", "ttl": 900, "renewAfter": 780 }
{ "url": "https://cdn.streamvault.link/originals/vid_a1b2c3.mp4?...", "ttl": 600 }
{"queued":true}Folders & Playlists
[{ "id": "fld_x1", "name": "Marketing", "video_count": 14 }]
| Field | Type | Description | |
|---|---|---|---|
| name | string | required | Folder name |
| parent_id | string|null | optional | Parent for nesting |
curl https://api.streamvault.link/api/playlists \ -H "Authorization: Bearer sv_live_YOUR_KEY" \ -H "X-Workspace-Id: ws_YOUR_WORKSPACE"
| Field | Type | Description | |
|---|---|---|---|
| title | string | required | Playlist title |
| video_ids | string[] | optional | Initial videos |
AI & Transcriptions
Async. Listen for transcription.complete webhook. Supports: en, es, fr, de, it, pt, nl, pl, ru, ja, zh.
Returns VTT with Content-Type: text/vtt. Available after transcription completes.
| Param | Type | Description |
|---|---|---|
| start_date | string | YYYY-MM-DD |
| end_date | string | YYYY-MM-DD |
Webhooks
curl https://api.streamvault.link/api/webhooks \ -H "Authorization: Bearer sv_live_YOUR_KEY" \ -H "X-Workspace-Id: ws_YOUR_WORKSPACE"
| Field | Type | Description | |
|---|---|---|---|
| url | string | required | HTTPS endpoint URL |
| events | string[] | required | Events to subscribe |
| secret | string | optional | HMAC secret (auto-generated if omitted) |
X-StreamVault-Signature header.
Workspaces & API Keys
curl https://api.streamvault.link/api/workspaces \ -H "Authorization: Bearer YOUR_JWT_TOKEN"
| Field | Type | Description | |
|---|---|---|---|
| name | string | required | Display name |
| permissions | string[] | optional | read, write |
System
{
"status": "healthy",
"timestamp": 1714500000,
"services": { "database": "ok", "storage": "ok", "queue": "ok" }
}