Download OpenAPI specification:
VSRC (Video Streaming & Recording Cloud) Public API for customer-facing video operations.
All API requests require authentication using an API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Upload a video file for VOD (Video on Demand) encoding. The file will be automatically encoded to multiple qualities for adaptive streaming.
Authentication: Requires API key with write permission
| file required | string <binary> Video file to upload (max 10GB) |
| title required | string [ 1 .. 255 ] characters Video title |
| description | string <= 1000 characters Video description (optional) |
| encodingProfileId | integer Custom encoding profile ID (optional). Use default if not specified. |
| tags | string <= 500 characters Comma-separated list of tags (optional) |
{- "success": true,
- "message": "Video uploaded successfully",
- "data": {
- "mediaId": "vod_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
- "title": "My Awesome Video",
- "description": "This is a great video",
- "fileSize": 52428800,
- "encodingStatus": "pending",
- "tags": [
- "conference",
- "2024",
- "keynote"
], - "uploadedAt": "2024-01-15T10:30:00.000Z"
}
}Retrieve detailed information about a specific media item including tags.
Authentication: Requires API key with read or write permission
| mediaId required | string^vod_[a-f0-9\-]+$ Example: vod_a1b2c3d4-e5f6-7890-abcd-ef1234567890 Media identifier |
{- "success": true,
- "data": {
- "mediaId": "vod_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
- "title": "My Video",
- "description": "Video description",
- "fileSize": 52428800,
- "mimeType": "video/mp4",
- "encodingStatus": "completed",
- "uploadStatus": "completed",
- "originalWidth": 1920,
- "originalHeight": 1080,
- "tags": [
- {
- "id": 1,
- "name": "conference",
- "color": "#6c757d"
}
], - "createdAt": "2024-01-15T10:30:00.000Z",
- "updatedAt": "2024-01-15T10:30:00.000Z"
}
}Delete a media item and its associated files from storage. This action cannot be undone.
Authentication: Requires API key with write permission
| mediaId required | string^vod_[a-f0-9\-]+$ Example: vod_a1b2c3d4-e5f6-7890-abcd-ef1234567890 Media identifier |
{- "success": true,
- "message": "Media deleted successfully",
- "data": {
- "mediaId": "vod_a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}Retrieve a paginated list of all media items for the authenticated user.
Authentication: Requires API key with read or write permission
| page | integer >= 1 Default: 1 Example: page=1 Page number for pagination |
| limit | integer [ 1 .. 100 ] Default: 20 Example: limit=20 Number of items per page |
| encodingStatus | string Enum: "pending" "processing" "completed" "failed" Example: encodingStatus=completed Filter by encoding status |
{- "success": true,
- "data": {
- "media": [
- {
- "mediaId": "vod_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
- "title": "My Video",
- "description": "Video description",
- "fileSize": 52428800,
- "mimeType": "video/mp4",
- "encodingStatus": "completed",
- "uploadStatus": "completed",
- "tags": [
- {
- "id": 1,
- "name": "conference",
- "color": "#6c757d"
}
], - "createdAt": "2024-01-15T10:30:00.000Z",
- "updatedAt": "2024-01-15T10:30:00.000Z"
}
], - "pagination": {
- "page": 1,
- "limit": 20,
- "total": 100,
- "totalPages": 5
}
}
}Search for media items that have one or more specified tags. Supports single tag or multiple tags search with flexible matching.
Authentication: Requires API key with read or write permission
| tags required | string Example: tags=conference,2024,keynote Single tag name or comma-separated list of tag names to search for |
| match | string Default: "any" Enum: "any" "all" Example: match=any Match mode - 'any' returns media with ANY of the tags (OR), 'all' returns media with ALL tags (AND) |
| page | integer >= 1 Default: 1 Example: page=1 Page number for pagination |
| limit | integer [ 1 .. 100 ] Default: 20 Example: limit=20 Number of items per page |
{- "success": true,
- "data": {
- "media": [
- {
- "mediaId": "vod_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
- "title": "My Video",
- "description": "Video description",
- "fileSize": 52428800,
- "mimeType": "video/mp4",
- "encodingStatus": "completed",
- "uploadStatus": "completed",
- "tags": [
- {
- "id": 1,
- "name": "conference",
- "color": "#6c757d"
}
], - "createdAt": "2024-01-15T10:30:00.000Z",
- "updatedAt": "2024-01-15T10:30:00.000Z"
}
], - "pagination": {
- "page": 1,
- "limit": 20,
- "total": 100,
- "totalPages": 5
}
}
}Create a new live stream and receive RTMP credentials for streaming. The stream key is valid for 24 hours.
Authentication: Requires API key with write permission
| title required | string [ 1 .. 255 ] characters Stream title |
| description | string <= 1000 characters Stream description (optional) |
| region | string Preferred region for RTMP server (optional) |
| serverId | integer Specific RTMP server ID (optional) |
{- "title": "My Live Event",
- "description": "Live broadcast from our event",
- "region": "us-east",
- "serverId": 1
}{- "success": true,
- "message": "Live stream created successfully",
- "data": {
- "streamKey": "1_abc123def456",
- "mediaId": "live_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
- "title": "My Live Event",
- "description": "Live broadcast from our event",
- "rtmpUrl": "rtmp://stream.vsrc.video/live",
- "streamUrl": "rtmp://stream.vsrc.video/live/1_abc123def456",
- "expiresIn": "24h",
- "expiresAt": "2024-01-16T10:30:00.000Z"
}
}Retrieve HTML/JavaScript embed code for a media item (VOD or live stream). The embed code includes the VSRCPlayer library and configuration.
Authentication: Requires API key with read or write permission
| mediaId required | string^(vod|live)_[a-f0-9\-]+$ Example: vod_a1b2c3d4-e5f6-7890-abcd-ef1234567890 Media identifier (format vod_* for VOD or live_* for live streams) |
{- "success": true,
- "data": {
- "mediaId": "vod_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
- "title": "My Video",
- "description": "Video description",
- "playerType": "vod",
- "encodingStatus": "completed",
- "embedCode": "<video id=\"vod-player-abc123\" class=\"video-js vjs-default-skin\" controls></video>\n\n<!-- VSRCPlayer Library -->\n<script src=\"https://player.vsrc.video/dist/vsrc-player.js\"></script>\n\n<script>\n const player = new VSRCPlayer('#vod-player-abc123', {\n type: 'vod',\n mediaId: 'vod_abc123',\n onReady: (playerInstance) => {\n console.log('VSRCPlayer is ready');\n },\n onError: (error) => {\n console.error('Error occurred', error);\n }\n });\n</script>\n"
}
}