This document provides a detailed guide on how to use the new version of the Cloud VoD API. The new API is invoked through OpenAPI, which allows for easy testing and API calls. OpenAPI will process your requests and generate example code in various languages based on your input.
If you’re using the older version of the API, there’s no need to worry. We will continue to support the older Cloud VoD API. However, we strongly recommend new users to adopt the new version. In the new API, for better tracking and resolving the issues that happen during the API call, we assign a unique ID to each request/task. This ID is returned to the client in the response header under the field “x-cnc-request-id.”
Important: Due to ongoing feature updates, new JSON or XML fields may be added to the API responses. Developers should parse these fields according to JSON and XML standards, rather than string parsing. Additionally, we limit the frequency of API calls per customer account to a default of 300 requests every 5 minutes. The recommended rate for individual APIs is 30 calls per 5 minutes. If your needs exceed these limits, please contact our customer support.
Before using it
For enhanced security, all API calls require authentication and you must carry the token in the request for it. Before using the Cloud VoD API, make sure you have activated the Cloud VoD service and obtained your AccessKey Secret for API authentication. To obtain your AccessKey ID and AccessKey Secret, navigate to the console and go to Security Settings -> AccessKey Management -> Show. These credentials will be used for authenticating your API access, so keep your AccessKey ID and AccessKey Secret stored securely.
API overview
Upload Assets
API |
Description |
getUploadToken |
Obtain a video upload token. |
getAudioUploadToken |
Obtain an audio upload token. |
getMaterialUploadToken |
Obtain a material upload token. |
pullVideo |
This API is used for retrieving videos via URL. By invoking this API and setting the video retrieval parameters, Cloud VoD will fetch the video from the URL and store it on Cloud VoD. Batch retrieval tasks are supported. |
pullVideoQuery |
Check the completion status of the video retrieval task. |
upload |
To upload a file to Cloud VoD, if the file size exceeds 500MB, please use the SDK for uploading. |
Manage Videos
API |
Description |
getVideoList |
Get the list of uploaded videos along with their details, which include upload time, video name, video ID, and video status, etc. |
videoEdit |
Edit the basic information of a video, such as its name, description, category, and publishing domain, among others. |
videoBlock |
Disable or block an uploaded video. Once disabled, the video will no longer be viewable. |
videoEnable |
Re-enable a previously disabled video. |
deleteVideo |
Delete an uploaded video. |
Manage Audios
API |
Description |
getAudioList |
Get the list of uploaded audios along with their details, which include upload time, name, ID, and status, etc. |
editAudio |
Edit the basic information of a audio, such as its name, description, category, and publishing domain, among others. |
deleteAudio |
Delete an uploaded audio. |
Manage Materials
Manage Categories
Video Processing
API |
Description |
transCode |
To transcode a specific video. |
startWorkflow |
To execute workflow operations on a specific video, mainly used for bulk editing of video information. |
videoClip |
To clip an uploaded video. |
videoClipQuery |
Check the status and result of the clipping task. |
videoConcat |
To concatenate multiple videos in a specified order to create a new one. |
videoConcatQuery |
Check the status and result of the video concatenation task. |
createClearAdTask |
To create an AI ad removal task for a specific video. The system will automatically perform AI-based ad removal (This is a value-added service, you should contact our customer service to enable it for you before using the API). |
clearAdTaskQuery |
check the status and result of the AI ad removal task. |
Playback
API |
Description |
getPublishCode |
Retrieve the URLs for video playback of different qualities, users can directly watch the video through the URL. |