Getting Started
Account
Video
Folder
Remote
Domain
Subtitle
Poster
Player.JS

API Documentation

Our APIs has been adapted to match the specification from other services.

You can get your APIKey at your account setting.

Base URL:

https://api.vidguard.to


Account Info

Everything related to your account information

Request
GET https://api.vidguard.to/v1/user/info?key={APIKey}
Name Description Required Type
key APIKey Yes String
                        {"msg":"Done","result":{"Balance":2.10,"CreatedAt":"2022-09-27T08:28:59+08:00","Currency":"$","Email":"[email protected]","Role":"trusted"},"status":200}
                     

Account Complaints

Retreive the list of complaints o abuses that have been reported on your account

Request
GET https://api.vidguard.to/v1/user/complaints?key={APIKey}&limit={Limit}&status={Status}
Name Description Required Type
key APIKey Yes String
limit Data limit No Int
status open|resolved No String
                       {"msg":"Done","result":[{"AffectedVideos":["8qL0YgYQEDRXyz"],"ID":1024,"Status":"open","Notifier":"[email protected]"},{"AffectedVideos":["d34dcopy","n0ta110m3b"],"ID":1028,"Status":"resolved","Notifier":"[email protected]"}],"status":200}
                     

Video Upload

Get upload server and upload the video to the server

Request
GET https://api.vidguard.to/v1/upload/server?key={APIKey}
Name Description Required Type
key APIKey Yes String
                       {"msg":"Done","result":{"url":"https://video.server.com/v1/upload?token=8ZI27C4Nx7DSWo-7wtMIFA"},"status":200}
                     
Upload To Server

Once you were able to get a server URL, we need to upload the file to the server

POST {result.url}
Example
curl -F file=@/path/to/video.mp4 -F key={APIKey} -F folder={FolderID} https://video.server.com/v1/upload?token=8ZI27C4Nx7DSWo-7wtMIFA
Name Description Required Type
key APIKey Yes String
folder Folder-ID No Int
file File content Yes Bytes
                       {"msg":"Video uploaded","result":{"Embed":"code here","EmbedAntiBot":"code here","FolderID":0,"HashID":"lrabVOQpEKdWMe","MimeType":"video/mp4","Name":"abc.mp4","Size":8085442,"URL":"//vidguard.to/v/lrabVOQpEKdWMe"},"status":200}
                     

Video Info

Everything related to your video information

Request
GET https://api.vidguard.to/v1/video/info?key={APIKey}&id={ID}
Name Description Required Type
key APIKey Yes String
id Video-ID Yes String
                        {"msg":"Done","result":{"CreatedAt":"2023-02-26T08:23:11.409+08:00","Folder":0,"Poster":"https://vg.cdn/posters/pRo7kDkxZWBnMp.png","HashID":"pRo7kDkxZWBnM","MimeType":"video/mp4","Name":"video.mp4","Sha1Hash":"7895648ebca1e4afc0e7933504ea43315aa9e105","Status":"done","Views":0},"status":200}
                     

Video List

Get video list by folder

Request
GET https://api.vidguard.to/v1/video/list?key={APIKey}&folder={FolderID}&offset={Offset}&limit={Limit}&deleted={Deleted}
Name Description Required Type
key APIKey Yes String
folder Folder-ID No Int
offset Offset Yes Int
limit Limit Yes Int
deleted Show deleted videos only No Boolean
                        {"msg":"Done","result":[{"CreatedAt":"2023-01-09T03:34:18.293+08:00","Folder":0,"HashID":"j8lgxYp45DGYbr","MimeType":"video/mp4","Name":"abc.mp4","Sha1Hash":"","Size":196913161,"Status":"pending","Views":0},{"CreatedAt":"2023-01-09T03:34:18.283+08:00","Folder":0,"HashID":"JnyfEK66xbk4Z0","MimeType":"video/mp4","Name":"abc.mp4 (Cloned)","Sha1Hash":"","Size":52741113,"Status":"pending","Views":0}],"status":200}
                     

Video Rename

Rename your video

Request
GET https://api.vidguard.to/v1/video/rename?key={APIKey}&id={ID}&name={Name}
Name Description Required Type
key APIKey Yes String
id Video-ID Yes String
name New video name Yes String
                      {"msg":"Done","status":200}
                     

Video Clone

Clone or copy video

Request
GET https://api.vidguard.to/v1/video/clone?key={APIKey}&id={ID}&folder={FolderID}
Name Description Required Type
key APIKey Yes String
id Video-ID Yes String
folder Folder-ID No Int
                      {"msg":"Video cloned","result":{"Embed":"code here","EmbedAntiBot":"code here","FolderID":0,"HashID":"lrabVOQpEKdWMe","MimeType":"video/mp4","Name":"abc.mp4 (Cloned)","Size":8085442,"URL":"//vidguard.to/v/lrabVOQpEKdWMe"},"status":200}
                     

Video Move

Move video to another folder

Request
GET https://api.vidguard.to/v1/video/move?key={APIKey}&id={ID}&folder={FolderID}
Name Description Required Type
key APIKey Yes String
id Video-ID Yes String
folder Folder-ID Yes Int
                     {"msg":"Done","result":0,"status":200}
                     

Video Delete

Delete permanently a video from our server

Request
GET https://api.vidguard.to/v1/video/delete?key={APIKey}&id={ID}
Name Description Required Type
key APIKey Yes String
id Video-ID Yes String
                     {"msg":"Done","status":200}
                     

Folder New

Create a new folder to your video management

Request
GET https://api.vidguard.to/v1/folder/new?key={APIKey}&name={Name}&folder={ParentFolderID}
Name Description Required Type
key APIKey Yes String
name Folder Name Yes String
folder Parent Folder-ID No Int
                     {"msg":"Done","result":{"ID":29,"Name":"New Folder API","ParentID":0},"status":200}
                     

Folder List

Get folder list by parent/folder id

Request
GET https://api.vidguard.to/v1/folder/list?key={APIKey}&folder={ParentFolderID}
Name Description Required Type
key APIKey Yes String
folder Parent Folder-ID No Int
                     {"msg":"Done","result":[{"ID":29,"CreatedAt":"2023-03-04T22:14:23.948+08:00","UpdatedAt":"2023-03-04T22:14:23.948+08:00","DeletedAt":null,"name":"New Folder API","user_id":1,"parent_id":0,"Folders":null}],"status":200}
                     

Folder Rename

Rename your folder

Request
GET https://api.vidguard.to/v1/folder/rename?key={APIKey}&id={FolderID}&name={Name}
Name Description Required Type
key APIKey Yes String
folder Folder-ID Yes Int
name New Folder Name Yes String
                     {"msg":"Done","status":200}
                     

Folder Delete

Delete permanently your folder from your system

Request
GET https://api.vidguard.to/v1/folder/delete?key={APIKey}&id={FolderID}
Name Description Required Type
key APIKey Yes String
folder Folder-ID Yes Int
                     {"msg":"Done","status":200}
                     

Remote Upload

Upload a new video via Remote Upload/URL

Request
POST https://api.vidguard.to/v1/remote/upload
Name Description Required Type
key APIKey Yes String
folder Folder-ID No Int
url Direct Video URL to be uploaded Yes String
                     {"msg":"done","result":[{"id":"2b7f5bfbe945b30889b1eb3369c692c1","url":"https://example.com/video_1.mp4"},{"id":"3b7fbbfbe945530889b1eb3589c692d0","url":"https://example.com/video_2.mp4"}],"status":200}
                     

Remote Get/List

Check the status of a remote upload or list of remote uploads

Request
GET https://api.vidguard.to/v1/remote/get?key={APIKey}&id={RemoteID}
Name Description Required Type
key APIKey Yes String
id Remote-ID No String
                     {"msg":"Done","result":[{"ID":"2b7f5bfbe945b30889b1eb3369c692c1","Percentage":0,"Size":0,"Status":"pending","URL":"https://example.com/video_1.mp4","VideoHashID":""},{"ID":"3b7fbbfbe945530889b1eb3589c692d0","Percentage":0,"Size":0,"Status":"pending","URL":"https://example.com/video_2.mp4","VideoHashID":""}],"status":200}
                     
                     {"msg":"Done","result":{"ID":"2b7f5bfbe945b30889b1eb3369c692c1","Percentage":0,"Size":0,"Status":"pending","URL":"https://example.com/video_1.mp4","VideoHashID":""},"status":200}
                     

Remote Delete

Delete a remote upload

Request
GET https://api.vidguard.to/v1/remote/delete?key={APIKey}&id={RemoteID}
Name Description Required Type
key APIKey Yes String
id Remote-ID No String
                    {"msg":"Done","status":200}
                     

Remote Retry

Retry all failed remote uploads

Request
GET https://api.vidguard.to/v1/remote/retry?key={APIKey}
Name Description Required Type
key APIKey Yes String
                    {"msg":"Done","status":200}
                     

Domain New

Add a new domain to our service

Request
POST https://api.vidguard.to/v1/domain/new
Name Description Required Type
key APIKey Yes String
name Domain Name Yes String
                    {"msg":"Done","result":{"id":11,"name":"player.com","ns1":"video.ns.cloudflare.com","ns2":"guard.ns.cloudflare.com","status":"pending"},"status":200}
                     

Domain Get

Get domain information

Request
GET https://api.vidguard.to/v1/domain/get
Name Description Required Type
key APIKey Yes String
id Domain-ID Yes Int
                    {"msg":"Done","result":{"id":11,"name":"player.com","ns1":"video.ns.cloudflare.com","ns2":"guard.ns.cloudflare.com","status":"pending"},"status":200}
                     

Domain Verify

Verify the selected domain. Wait at least 1 hour before requesting to verify your domain

Request
GET https://api.vidguard.to/v1/domain/verify
Name Description Required Type
key APIKey Yes String
id Domain-ID Yes Int
                    {"msg":"Status is still pending","status":400}
                     

Domain Delete

Delete a domain from from our service

Request
POST https://api.vidguard.to/v1/domain/delete
Name Description Required Type
key APIKey Yes String
id Domain-ID Yes Int
                    {"msg":"Done","status":200}
                     

Subtitle Upload

Upload a subtitle/caption to a video

Request
POST https://api.vidguard.to/v1/subtitles/upload
Name Description Required Type
key APIKey Yes String
id Video-ID Yes String
subtitles JSON content. eg: [{"title":"English","lang":"en","content":"subtitle content here"}] Yes JSON String
                     {"msg":"Done","result":[{"file":"nkjGcyZNzTmzoSPgQIvfvcJitYHlzG1u.vtt","lang":"en","title":"English"}],"status":200}
                     

Subtitle Delete

Delete a subtitle

Request
GET https://api.vidguard.to/v1/subtitles/delete?key={APIKey}&id={VideoID}&file={SubtitleName}
Name Description Required Type
key APIKey Yes String
id Video-ID Yes String
file Subtitle file name. eg: nkjGcyZNzTmzoSPgQIvfvcJitYHlzG1u.vtt Yes String
                     {"msg":"Done","status":200}
                     

Poster Upload

Uploading a new poster to a video will replace the current poster of the selected video

Request
POST https://api.vidguard.to/v1/poster/upload
Name Description Required Type
key APIKey Yes String
id Video-ID Yes String
content A Base64 image. eg: data:image/png;base64,...... Yes String
                     {"msg":"Done","result":"D1DzAdyjFZy.png","status":200}
                     

Player.JS Overview

You can control our video player using Player.js