tencent cloud

Digital Human aPaaS API Calling Methods
Last updated: 2025-07-02 16:54:14
Digital Human aPaaS API Calling Methods
Last updated: 2025-07-02 16:54:14
This documentation primarily describes the API call methods on the Tencent Cloud AI Digital Human aPaaS platform, including permissions, common parameters, and signature requirements.

I. API Calling Environment

Official environment: https://gw-sg.tvs.qq.com

II. Permission Application and Activation

Video generation aPaas API usage permissions require purchasing related services before usable. For initial stage testing, contact sales to apply for a free trial.

III. Methods for Requesting Common Parameters and Signature

Common Parameters

When calling any API on aPaaS, you need to include the following common parameters in the URL as QueryString:
Parameters
Type
Mandatory
Description
appkey
string
Yes
Fill in the appkey obtained after your permission application is approved.
timestamp
string
Yes
Request timestamp in seconds. The timestamp cannot differ from the current time by more than five minutes, otherwise, authentication will fail.
signature
string
Yes
Request signature (see the following Signature Method).

Signature Method

Request Parameter Signature Steps are as follows:
1. signature rules are as follows, example description below (for reference only).
appkey = e38267c0e86411ebb02aed82acb0ed99
accesstoken = f68f2d10ae9e4604b76fb05cf46bccec
Domain Name Routing = https://gw.tvs.qq.com/v2/ivh/videomaker/broadcastservice/videomake
2. Sort all URL parameters except signature in alphabetical order, note that parameters in the body are not included, as the plaintext for generating the signature. Currently, only appkey and timestamp parameters, so the sorted and concatenated string example is:
appkey=e38267c0e86411ebb02aed82acb0ed99&timestamp=1646636485
3. Use the accesstoken to perform HmacSha256 encryption on the signature string, and then encode it with base64.
hashBytes = HmacSha256("appkey=e38267c0e86411ebb02aed82acb0ed99&timestamp=1646636485","f68f2d10ae9e4604b76fb05cf46bccec")
signature = Base64Encode(hashBytes)
4. The obtained signature value is:
BfWuaC9kmaicCggXc693uK+sZQ8qe88O4HVQNTdwZuo=
5. Urlencode the signature value (this is mandatory, otherwise it may cause intermittent authentication failures), and then concatenate it to get the final request URL as follows:
https://gw.tvs.qq.com/v2/ivh/videomaker/broadcastservice/videomake?appkey=e38267c0e86411ebb02aed82acb0ed99&timestamp=1646636485&signature=BfWuaC9kmaicCggXc693uK%2BsZQ8qe88O4HVQNTdwZuo%3D

IV. Request and Response Structure

Request Body Structure
The request body is divided into Header and Payload. The Header can include RequestID to identify a single request for system issue tracking. Business parameters are placed in the Payload. Each API's input parameters in the product API documentation should be placed in the Payload for transmission.
{
"Header": {
"RequestID": "",
},
"Payload": {}
}
Response Body Structure
The response body is divided into two parameters: Header and Payload. The Header contains the result code, message, and the unique request ID which is the same as the value provided in the request body. The specific response parameters of the API will be placed in the Payload.
{
"Header": {
"Code": 0,
"Message": "",
"RequestID": "", // If not filled in during the request, it will be generated and returned by the cloud
},
"Payload": {}
}

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback