Management and integration of APIs for the Digital Human Open Platform.
The Open Platform supports two methods to monitor the final status of synthesized works:
Signature Generation Generate a signature using the following rules (used to obtain access_token): Concatenate the API Key, timestamp (in milliseconds), and API Secret. Encrypt the concatenated string using MD5. The result is a 32-bit lowercase string. Example: md5(APIKey + timestamp + APISecret)
Get Access Token
Endpoint:
/openapi/oauth/token
HTTP Method:GET
Request Content-Type:application/json
Response Content-Type:application/json
Obtain an access_token from the Open Platform.
| Field | Type | Required | Remarks |
|---|---|---|---|
| appId | String | Y | API Key |
| timestamp | String | Y | Current timestamp (ms) |
| sign | String | Y | Generated signature |
| grant_type | String | Y | Authentication type(fixed value‘sign’) |
Example:
https://openapi.wonderuyi.com/openapi/oauth/token?grant_type=sign×tamp=1648429269823&sign=3fe58596ec5edc297876e00f4e4b1a49&appId=TPbMPQeD4U2dJgRY62PCRnSz
| Field | Type | Required | Remarks |
|---|---|---|---|
| code | String | Y | Status code (0 = success) |
| success | Boolean | Y | Success/Error |
| data | Json | Y | JSONObject |
| access_token | String | Y | access_token value |
| expires_in | Integer | Y | Expiration time (in seconds)” |
Example:
{
"code": "0",
"success": true,
"data": {
"access_token": "99568c59-eb7e-4feb-b546-078f2fe9d5c6",
"expires_in": 7199
}
}
After validation, the Open Platform returns responses in the following format:
| Field | Type | Required | Remarks |
|---|---|---|---|
| code | String | Y | Status code (0 = success) |
| success | Boolean | Y | Success/Error |
| message | String | N | Description of the result |
| data | Object | N | Response data |
| Code | Description |
|---|---|
| 0 | Success |
| 40001 | Internal exception |
| 40002 | Invalid access_token |
| 40003 | access_token expired |
| 40010 | Insufficient balance |
| 40011 | Invalid audio URL |
| 40012 | Invalid audio duration |
| 40013 | Invalid file size |
| 40014 | Required file missing |
| 40015 | Required parameter missing |
| 40016 | File upload failed |
| 40017 | File download failed |
| 40018 | File does not exist |
| 40019 | Exceeds concurrency limit |
| 40020 | Unsupported background image format |
| 40021 | Training video submission failed |
| 40022 | Invalid bitrate value |
| 40023 | Invalid resolution value |
| 40024 | Invalid FPS value |
| 40025 | Model not found |
| 40026 | Model expired |
| 40027 | Invalid video format |