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
Everything related to your account information
GET
https://api.vidguard.to/v1/user/info?key={APIKey}
Name | Description | Required | Type |
---|---|---|---|
key | APIKey | Yes | String |
{ "msg": "Done", "result": { "Balance": 2.1, "CreatedAt": "2022-09-27T08:28:59+08:00", "Currency": "$", "Email": "guard@gmail.com", "Role": "trusted" }, "status": 200 }
Retreive the list of complaints o abuses that have been reported on your account
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": "abc@company.com" }, { "AffectedVideos": [ "d34dcopy", "n0ta110m3b" ], "ID": 1028, "Status": "resolved", "Notifier": "a.b.c@company.com" } ], "status": 200 }
Get upload server and upload the video to the server
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 }
Once you were able to get a server URL, we need to upload the file to the server
POST
{result.url}
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 }
Everything related to your video information
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 }
Get video list by folder
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 }
Rename your video
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 }
Clone or copy video
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 }
Move video to another folder
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 }
Delete permanently a video from our server
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 }
Create a new folder to your video management
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 }
Get folder list by parent/folder id
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 }
Rename your folder
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 }
Delete permanently your folder from your system
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 }
Upload a new video via Remote Upload/URL
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 }
Check the status of a remote upload or list of remote uploads
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 }
Delete a remote upload
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 }
Retry all failed remote uploads
GET
https://api.vidguard.to/v1/remote/retry?key={APIKey}
Name | Description | Required | Type |
---|---|---|---|
key | APIKey | Yes | String |
{ "msg": "Done", "status": 200 }
Add a new domain to our service
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 }
Get domain information
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 }
Verify the selected domain. Wait at least 1 hour before requesting to verify your domain
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 }
Delete a domain from from our service
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 }
Upload a subtitle/caption to a video
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 }
Delete a subtitle
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 }
Uploading a new poster to a video will replace the current poster of the selected video
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 }
You can control our video player using Player.js