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

Base URL https://api.streamvault.link
HLS Streaming
Auto-transcode to 360p–4K adaptive bitrate with AES-128 encryption.
AI Subtitles
Whisper-powered transcription in 11 languages. VTT delivered over API.
Webhooks
HMAC-signed events for video.ready, transcription.complete, and more.
All responses include 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)

Header Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6...
Workspace X-Workspace-Id: ws_a1b2c3d4e5

Obtain via POST /auth/login. Expires in 15 min — use POST /auth/refresh.

API Key Pro+

Header Authorization: Bearer sv_live_a1b2c3d4e5f6...
Workspace X-Workspace-Id: ws_a1b2c3d4e5

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.

StatusMeaning
200Success
201Resource created
202Accepted — async job queued
400Bad request — missing/invalid parameters
401Unauthenticated — invalid/expired token
403Forbidden — insufficient plan or role
404Resource not found
429Rate limit exceeded
503Service unavailable
Upload endpoints: 10 req/min per IP. Webhooks retry with exponential backoff — 3 attempts, up to 1 hour.

Video Management

POST /api/upload Upload a video — triggers HLS transcoding
Send as multipart/form-data. Max: 10 GB. Async — poll or use webhooks.
Request body (multipart/form-data)
FieldTypeDescription
videofilerequiredMP4, MKV, MOV, AVI, WebM
titlestringrequiredDisplay title
descriptionstringoptionalLong description
folder_idstringoptionalTarget folder
visibilitystringoptionalpublic · 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"
Response
{
  "id":           "vid_a1b2c3",
  "title":        "My Awesome Video",
  "status":       "queued",
  "workspace_id": "ws_YOUR_WORKSPACE",
  "created_at":   1714500000
}
200Upload accepted. Status: queued → transcoding → ready
400Missing video/title or exceeds 10 GB
403Quota exceeded
GET /api/videos List videos (paginated)
Query parameters
ParamTypeDefaultDescription
pageinteger1Page number
limitinteger20Results per page (max 100)
searchstringFull-text search
folder_idstringFilter by folder
statusstringready · 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"
GET /api/videos/{id} Get a single video
curl https://api.streamvault.link/api/videos/vid_a1b2c3 \
  -H "Authorization: Bearer sv_live_YOUR_KEY" \
  -H "X-Workspace-Id: ws_YOUR_WORKSPACE"
200Full video object with embedConfig and AI fields
404Video not found
PATCH /api/videos/{id} Update metadata, visibility, or schedule publishing
Request body
FieldTypeDescription
titlestringoptionalNew title
descriptionstringoptionalNew description
visibilitystringoptionalpublic · private · password
folder_idstring|nulloptionalMove to folder (null to remove)
DELETE /api/videos/{id} Delete video and all files permanently
Permanently deletes HLS segments, thumbnails, and transcriptions. Cannot be undone.
200{"success":true}
404Video not found
POST /api/videos/bulk Bulk delete, move, or change visibility (up to 200)
Request body
FieldTypeDescription
idsstring[]requiredVideo IDs (max 200)
actionstringrequireddelete · move · visibility

Playback & Delivery

GET /api/videos/{id}/token Get 15-min signed HLS playback token

Append ?token=TOKEN to HLS URLs. Auto-renews 2 min before expiry.

{ "token": "sv_tok_ab12cd34...", "ttl": 900, "renewAfter": 780 }
POST /api/videos/{id}/retry Retry a failed transcoding job
200{"queued":true}
409Video not in error state

Folders & Playlists

GET /api/folders List all folders
[{ "id": "fld_x1", "name": "Marketing", "video_count": 14 }]
POST /api/folders Create a folder
FieldTypeDescription
namestringrequiredFolder name
parent_idstring|nulloptionalParent for nesting
GET /api/playlists List playlists
curl https://api.streamvault.link/api/playlists \
  -H "Authorization: Bearer sv_live_YOUR_KEY" \
  -H "X-Workspace-Id: ws_YOUR_WORKSPACE"
POST /api/playlists Create a playlist
FieldTypeDescription
titlestringrequiredPlaylist title
video_idsstring[]optionalInitial videos

AI & Transcriptions

POST /api/videos/{id}/transcribe Transcribe audio with Whisper Pro+

Async. Listen for transcription.complete webhook. Supports: en, es, fr, de, it, pt, nl, pl, ru, ja, zh.

202Job queued
403Pro plan required
GET /api/videos/{id}/transcription.vtt Download WebVTT subtitles

Returns VTT with Content-Type: text/vtt. Available after transcription completes.

GET /api/videos/{id}/analytics Video analytics (views, watch time, engagement)
ParamTypeDescription
start_datestringYYYY-MM-DD
end_datestringYYYY-MM-DD

Webhooks

GET /api/webhooks List configured webhooks
curl https://api.streamvault.link/api/webhooks \
  -H "Authorization: Bearer sv_live_YOUR_KEY" \
  -H "X-Workspace-Id: ws_YOUR_WORKSPACE"
POST /api/webhooks Create a webhook endpoint
FieldTypeDescription
urlstringrequiredHTTPS endpoint URL
eventsstring[]requiredEvents to subscribe
secretstringoptionalHMAC secret (auto-generated if omitted)
Available events
video.ready video.error video.deleted transcription.complete transcription.error
Payloads signed with HMAC-SHA256. Verify X-StreamVault-Signature header.

Workspaces & API Keys

GET /api/workspaces List your workspaces
curl https://api.streamvault.link/api/workspaces \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
POST /api/workspaces/{id}/apikeys Create API key Pro+
FieldTypeDescription
namestringrequiredDisplay name
permissionsstring[]optionalread, write
The API key is shown once. Save it immediately — you won't see it again.

System

GET /health Health check (no auth required)
{
  "status": "healthy",
  "timestamp": 1714500000,
  "services": { "database": "ok", "storage": "ok", "queue": "ok" }
}