logo
On this page

Create Digital Human Video Stream Task


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 shows the API request parameters and some common parameters. For the complete list of common parameters, please refer to Accessing Server APIs - Common Request Parameters.

ParameterTypeRequiredDescription
DigitalHumanConfigObjectYesDigital human configuration. For details, please refer to DigitalHumanConfig.
RTCConfigObjectYesRTC configuration. For details, please refer to RTCConfig.
TTLNumberNoMaximum duration of the digital human video stream task. The task will automatically end when the duration reaches this value. The unit is seconds, with a range of [10, 86400]. If not specified, the default value is 86400 seconds (24 hours).
MaxIdleTimeNumberNoMaximum idle time of the digital human. The task will automatically end when the idle time reaches this value. The unit is seconds, with a range of [30, 86400]. If not specified, the default value is 900 seconds (15 minutes).

DigitalHumanConfig

ParameterTypeRequiredDescription
DigitalHumanIdStringYesDigital human ID.
BackgroundColorStringNoBackground color, in hexadecimal RGB format, such as #ffffff. If not specified, the default value is #000000 (black).

RTCConfig

ParameterTypeRequiredDescription
RoomIdStringYesTarget room ID for streaming, with a maximum length of 128 bytes, user-defined input.
StreamIdStringYesStream ID, with a maximum length of 128 bytes, only supports numbers, English characters, '-', and '_'.
Note
Note: StreamId must be globally unique within the AppID, user-defined input.

Sample request

  • 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

ParameterTypeDescription
CodeNumberReturn code. 0 indicates success, other values indicate failure. For error codes and response handling suggestions, please refer to Return Codes.
MessageStringDescription of the request result.
RequestIdStringRequest ID.
DataObjectReturn data.
└TaskIdStringDigital human video stream task ID.

Sample response

{
    "Code": 0,
    "Message": "success",
    "RequestId": "d799c85c-10c8-4191-8c6a-3290a5940b5f",
    "Data": {
        "TaskId": "6a5898fa-3e1d-4a6f-b949-05f39f1c10cb"
    }
}

Previous

Query Timbre List

Next

Drive Digital Human By Action

On this page

Back to top