Create Digital Human Video Stream Task
2026-03-20
Description
Through this API, you can create a Digital Human video stream task.
Request prototype
- Request method: POST
- Request body format: JSON
- Request URL: https://aigc-digitalhuman-api.zegotech.cn?Action=CreateDigitalHumanStreamTask
- Transmission protocol: HTTPS
- QPS limit: 10 times/second
Request Parameters
The following request parameter list only includes API request parameters and some common parameters. For the complete list of common parameters, please refer to API Calling Methods - Common Request Parameters.
| Parameter | Type | Required | Description |
|---|---|---|---|
| DigitalHumanConfig | Object | Yes | Digital Human configuration. For the structure of this parameter, refer to DigitalHumanConfig. |
| RTCConfig | Object | Yes | RTC (Video Call) related configuration. For the structure of this parameter, refer to RTCConfig. |
| TTL | Number | No | Maximum duration of the Digital Human video stream task. The task automatically ends when the duration reaches this value. Unit is seconds, ranging from [10, 86400]. If not specified, defaults to 86400 seconds (24 hours). |
| MaxIdleTime | Number | No | Maximum idle duration of the Digital Human. If the Digital Human is not driven for this duration, the task will automatically end. Unit is seconds, ranging from [30, 86400]. Default is 900 seconds (15 minutes). |
DigitalHumanConfig
| Parameter | Type | Required | Description |
|---|---|---|---|
| DigitalHumanId | String | Yes | Digital Human ID. |
| BackgroundColor | String | No | Background color in hexadecimal RGB format, e.g., #ffffff. If not specified, defaults to #000000 (black). |
RTCConfig
| Parameter | Type | Required | Description |
|---|---|---|---|
| RoomId | String | Yes | Target room ID for streaming, up to 128 bytes, user-defined. |
| StreamId | String | Yes | Stream ID for the Digital Human to publish to the RTC room, up to 128 bytes. Only supports numbers, English characters, '-', and '_'. Note Please note that StreamId must be globally unique within the AppID. User-defined. |
Request Example
-
Request URL:
https://aigc-digitalhuman-api.zegotech.cn?Action=CreateDigitalHumanStreamTask &<common-request-parameters> -
Request body:
{ "DigitalHumanConfig": { "DigitalHumanId": "0d3538a4-9e8e-4155-b1fb-c7defb8eeef8" }, "RTCConfig": { "RoomId": "1234567890", "StreamId": "elias1" } }
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| Code | Number | Return code. 0 indicates success, other values indicate failure. For error codes and response handling recommendations, please refer to Return Codes. |
| Message | String | Description of the request result. |
| RequestId | String | Request ID. |
| Data | Object | Response data. |
| └TaskId | String | Digital Human video stream task ID. |
Response Example
{
"Code": 0,
"Message": "success",
"RequestId": "d799c85c-10c8-4191-8c6a-3290a5940b5f",
"Data": {
"TaskId": "6a5898fa-3e1d-4a6f-b949-05f39f1c10cb"
}
}