Updating Intelligent Livestreaming Room Information
Function
Updates intelligent livestreaming room information.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
URI
PUT /v1/{project_id}/smart-live-rooms/{room_id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
|
room_id |
Yes |
String |
Live room ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
No |
String |
User token. This parameter is mandatory when token authentication is used. You can obtain the token by calling the IAM API used to obtain a user token. Value of X-Subject-Token in the response header. |
|
Authorization |
No |
String |
Authentication information. This parameter is mandatory for AK/SK authentication. |
|
X-Sdk-Date |
No |
String |
Time when the request is sent. This parameter is mandatory for AK/SK authentication. The format is YYYYMMDD'T'HHMMSS'Z'. |
|
X-Project-Id |
No |
String |
Project ID. This parameter is mandatory for AK/SK authentication. |
|
X-App-UserId |
No |
String |
Third-party user ID, which does not allow Chinese characters. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
room_name |
Yes |
String |
Definition: Live room name. Constraints: N/A Value range: The value contains 1 to 256 characters. Default value: N/A |
|
room_description |
No |
String |
Definition: Live room description. Constraints: N/A Value range: The value contains 0 to 1,024 characters. Default value: N/A |
|
room_type |
No |
String |
Definition: Live room type. Constraints: N/A Value range:
Default value: NORMAL |
|
scene_scripts |
No |
Array of LiveVideoScriptInfo objects |
Default livestreaming script list. |
|
interaction_config |
No |
LiveRoomInteractionConfig object |
Interaction settings |
|
interaction_rules |
No |
Array of LiveRoomInteractionRuleInfo objects |
Interaction rules |
|
play_policy |
No |
PlayPolicy object |
Script reading policy |
|
video_config |
No |
VideoConfig object |
Video output configuration. |
|
output_urls |
No |
Array of strings |
Definition: URL of the third-party live platform for RTMP video stream push.
NOTE:
The command REFRESH_OUTPUT_URL needs to be executed to refresh the URL during the livestream.
Constraints: N/A Value range: Currently, only one RTMP output URL is supported. Default value: N/A |
|
stream_keys |
No |
Array of strings |
Definition: Stream key of the third-party live platform for RTMP video stream push. The key corresponds to the ingest URL.
NOTE:
The command REFRESH_OUTPUT_URL needs to be executed to refresh the URL during the livestream.
Constraints: N/A Value range: Currently, only one RTMP output URL is supported. Default value: N/A |
|
backup_model_asset_ids |
No |
Array of strings |
Definition: Asset ID of the alternative virtual streamer (only image assets, excluding the voice). Constraints: N/A Value range: Currently, a maximum of five alternative streamers are allowed. Virtual avatar asset ID, which contains 0 to 64 characters. Default value: N/A |
|
live_event_callback_config |
No |
LiveRoomEventCallBackConfig object |
|
|
rtc_callback_config |
No |
RTCLiveEventCallBackConfig object |
RTC callback event configuration. Compatible processing. If the configuration is not carried, LIVE_PROGRESS is subscribed by default. |
|
review_config |
No |
ReviewConfig object |
Content review configuration |
|
shared_config |
No |
SharedConfig object |
Shared configuration |
|
view_mode |
No |
String |
Definition: Landscape or portrait mode. Constraints: You do not need to set this parameter. The value is determined by the resolution in video_config. Value range:
Default value: VERTICAL |
|
co_streamer_config |
No |
CoStreamerConfig object |
Co-streamer configuration |
|
priv_data |
No |
String |
Definition: Private data of the match value, which is entered by the user and then returned with the same content. Constraints: N/A Value range: The value contains 0 to 8,192 characters. Default value: N/A |
|
relation_live_platform_info |
No |
PlatformLiveInfo object |
Platform live streaming information |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
script_id |
No |
String |
Details: Script ID. Constraints: Leave this field blank. Options: The value contains 1 to 64 characters. Default value: N/A |
|
script_name |
Yes |
String |
Details: Script name. Constraints: This field is mandatory. Options: The value contains 1 to 256 characters. Default value: N/A |
|
script_description |
No |
String |
Details: Script description. Constraints: Leave this field blank. Options: The value contains 0 to 1,024 characters. Default value: N/A |
|
dh_id |
No |
String |
Details: Virtual avatar ID, which corresponds to the combination of image and timbre. Constraints: This field is not used currently and does not need to be specified. Options: The value contains 0 to 64 characters. Default value: N/A |
|
model_asset_id |
No |
String |
Details: Virtual human model asset ID, which can be queried from the asset library. Constraints: N/A Options: The value contains 0 to 64 characters. Default value: N/A |
|
voice_config |
No |
VoiceConfig object |
Voice configuration parameter. |
|
background_config |
No |
Array of BackgroundConfigInfo objects |
Background configuration. |
|
layer_config |
No |
Array of LayerConfig objects |
Layer configuration. |
|
shoot_scripts |
Yes |
Array of LiveShootScriptItem objects |
Shooting script list. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
background_type |
Yes |
String |
Definition Background type. Constraints N/A Range
Default Value N/A |
|
background_config |
No |
String |
Definition Background file URL. Constraints
Range The value contains 1 to 2,048 characters. Default Value N/A |
|
background_color_config |
No |
String |
Definition RGB color value of a solid color background. Constraints This parameter is mandatory when background_type is set to COLOR. Range The value contains 0 to 16 characters. Default value: #FFFFFF |
|
background_asset_id |
No |
String |
Definition Background asset ID.
NOTE:
If a background image is used, enter the image asset ID.
Constraints N/A Range The value can contain 0 to 64 characters. Default Value N/A |
|
background_image_config |
No |
BackgroundImageConfig object |
Background image size and position setting. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
dx |
Yes |
Integer |
Definition X axis position of the pixel in the upper left corner of the background image. The coordinate of the upper left corner of the preview area is 0x0. The video resolution is 1920 x 1080 in landscape mode (16:9) and 1080 x 1920 in portrait mode (9:16). Constraints The background image must cover the entire preview area. That is, dx ≤ 0, dx + width ≥ 1920 in landscape mode, and dx + width ≥ 1080 in portrait mode. Value range: -5760~0 Default value: 0 |
|
dy |
Yes |
Integer |
Definition Y axis position of the pixel in the upper left corner of the background image. The coordinate of the upper left corner of the preview area is 0x0. The video resolution is 1920 x 1080 in landscape mode (16:9) and 1080 x 1920 in portrait mode (9:16). Constraints The background image must cover the entire preview area. That is, dy ≤ 0, dy + height ≥ 1080 in landscape mode, and dy + height ≥ 1920 in portrait mode. Value range: -5760~0 Default value: 0 |
|
width |
Yes |
Integer |
Definition Width (in pixels) of the background image (relative to the preview area size). The video resolution is 1920 x 1080 in landscape mode (16:9) and 1080 x 1920 in portrait mode (9:16). Constraints The background image must cover the entire preview area. That is, width > 1080, dx + width ≥ 1920 in landscape mode, and dx + width ≥ 1080 in portrait mode. Value range: 1~7680 |
|
height |
Yes |
Integer |
Definition Height (in pixels) of the background image (relative to the preview area size). The video resolution is 1920 x 1080 in landscape mode (16:9) and 1080 x 1920 in portrait mode (9:16). Constraints The background image must cover the entire preview area. height > 1080, dy + height ≥ 1080 in landscape mode, and dy + height ≥ 1920 in portrait mode. Value range: 1~7680 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
layer_type |
Yes |
String |
Definition Layer type. Constraints N/A Range
Default Value N/A |
|
asset_id |
No |
String |
Definition ID of the asset overlaid on a video. You do not need to set this parameter for external assets. Constraints N/A Range The value can contain 0 to 64 characters. Default Value N/A |
|
group_id |
No |
String |
Definition Groups materials in multiple scenes. Materials with the same group_id share location information when they are applied globally. Constraints N/A Range The value can contain 0 to 64 characters. Default Value N/A |
|
sequence_no |
No |
Integer |
Definition Overlay of the paragraph currently being shown. This field is forward compatible and optional. This parameter is valid only for livestreaming. Constraints The paragraph is subject to sequence_no. Default Value N/A Value range: 0~2147483647 |
|
position |
No |
LayerPositionConfig object |
Layer position configuration. |
|
size |
No |
LayerSizeConfig object |
Layer size configuration. |
|
rotation |
No |
LayerRotationConfig object |
Overlay rotation configuration. |
|
image_config |
No |
ImageLayerConfig object |
Image layer configuration. |
|
video_config |
No |
VideoLayerConfig object |
Video overlay configuration. |
|
text_config |
No |
TextLayerConfig object |
Material text layer configuration. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
dx |
Yes |
Integer |
Definition X axis position of the pixel in the upper left corner of the image. The coordinate of the upper left corner of the image layout is 0x0. The video resolution is 1920 x 1080 in landscape mode (16:9) and 1080 x 1920 in portrait mode (9:16). Constraints The value is the pixel value relative to the image layout. It indicates only the layout position relationship and is irrelevant to the resolution of the output image. Value range: -1920~3840 Default value: 0 |
|
dy |
Yes |
Integer |
Definition Y axis position of the pixel in the upper left corner of the image. The coordinate of the upper left corner of the image layout is 0x0. The video resolution is 1920 x 1080 in landscape mode (16:9) and 1080 x 1920 in portrait mode (9:16). Constraints The value is the pixel value relative to the image layout. It indicates only the layout position relationship and is irrelevant to the resolution of the output image. Value range: -1920~3840 Default value: 0 |
|
layer_index |
Yes |
Integer |
Definition Overlay sequence of an image, video, or person image.
NOTE:
The overlay sequence is an integer starting from 1 and incremented by 1.
Constraints If there are duplicate overlays, the relationship between the duplicate overlays is random. Value range: 1~100 Default value: 100 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
width |
No |
Integer |
Definition Y axis position of the pixel in the upper left corner of the image, that is, width (in pixels) of the image overlay (relative to the preview area size). The video resolution is 1920 x 1080 in landscape mode (16:9) and 1080 x 1920 in portrait mode (9:16). Constraints The value is the pixel value relative to the image layout. It indicates only the layout position relationship and is irrelevant to the resolution of the output image. Value range: 1~7680 |
|
height |
No |
Integer |
Definition Height (in pixels) of the image overlay (relative to the preview area size). The video resolution is 1920 x 1080 in landscape mode (16:9) and 1080 x 1920 in portrait mode (9:16). Constraints The value is the pixel value relative to the image layout. It indicates only the layout position relationship and is irrelevant to the resolution of the output image. | Value range: 1~7680 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
angle |
No |
Integer |
Definition Rotation angle. Range 0 to 360 degrees Default Value 0 degrees Constraints The material is rotated around the center point. Video materials cannot be rotated. Value range: 0~360 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
image_url |
No |
String |
Definition Image file URL. Constraints
Range The value contains 1 to 2,048 characters. Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
video_url |
No |
String |
Definition Video file URL. Constraints
Range The value contains 1 to 2,048 characters. Default Value N/A |
|
video_cover_url |
No |
String |
Definition Video thumbnail file URL. Constraints
Range The value contains 1 to 2,048 characters. Default Value N/A |
|
loop_count |
No |
Integer |
Definition Number of times that a video is played cyclically. Options:
Constraints N/A Value range: -1~100 Default value: -1 |
|
video_sound |
No |
Integer |
Definition The percentage used to adjust the volume of the video overlay. The value ranges from 0 to 100. The default value 0 indicates the audio is muted. Constraints N/A Value range: 0~100 |
|
is_play_the_entire_video |
No |
Boolean |
Definition Whether to play the entire video. true indicates that the entire video is played. false indicates that the video stops playing when the inserted scene text or audio ends. Options: The default value is false. Constraints N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
text_context |
No |
String |
Definition Text of the text layer. The content must be encoded using Base64. For example, if you want to add the text watermark "Test text watermark", set text_context to 5rWL6K+V5paH5a2X5rC05Y2w. Constraints N/A Range The value contains 0 to 1,024 characters. Default Value N/A |
|
font_name |
No |
String |
Font. For details about the supported fonts, see Supported Fonts. Constraints N/A Range The value can contain 0 to 64 characters. Default value: HarmonyOS_Sans_SC_Black |
|
font_size |
No |
Integer |
Definition Font size (in pixels). The interface value ranges from 0 to 120. The actual value range is 4 to 120. Use the actual value range. Constraints N/A Value range: 0~120 Default value: 16 |
|
font_color |
No |
String |
Definition Font color. RGB color value. Constraints N/A Range The value contains 0 to 16 characters. Default value: #FFFFFF |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
sequence_no |
No |
Integer |
Details: Script No. Constraints: N/A Value range: 0~2147483647 |
|
title |
No |
String |
Details: Paragraph title. Constraints: N/A Options: The value contains 0 to 256 characters. Default value: N/A |
|
text_config |
No |
TextConfig object |
Script configuration. |
|
audio_config |
No |
LiveAudioConfig object |
Live audio configuration. |
|
relation_product |
No |
RelationProductInfo object |
Associated product |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
text |
Yes |
String |
Definition Script. Two modes are supported: plain text mode and tag mode.
Constraints The value can contain a maximum of 10,000 characters, excluding the SSML tag. Range The value contains 0 to 131,072 characters. Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
asset_id |
No |
String |
Details: ID of the inserted audio asset. You do not need to set this parameter for external assets. If you enter a value, you can query it from the asset library. Constraints: N/A Options: The value contains 0 to 64 characters. Default value: N/A |
|
audio_url |
No |
String |
Details: Audio URL. Constraints: Only the MP3 format is supported. The size is less than 100 MB. The output is automatically converted to mono 16 kHz for sampling. Options: The value contains 0 to 2,048 characters. Default value: N/A |
|
subtitle_url |
No |
String |
Details: URL of the subtitle file of the audio. Constraints: Only the SRT format is supported. The size is less than 1 MB. Options: The value contains 0 to 2,048 characters. Default value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
product_id |
No |
String |
Associated product ID. If this parameter is specified, the segment switching callback contains this parameter. For Meituan, set this parameter to goodsId. |
|
product_title |
No |
String |
Associated product title/name. If this parameter is specified, the segment switching callback contains this parameter. For Meituan, set this parameter to goodsTitle. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
play_type |
No |
String |
Playback mode:
Default value: INSERT |
|
ignore_current_sentence |
No |
Boolean |
The second half of a sentence is not read for reply. It is used for immediate interruption. By default, it is not ignored. Default value: false |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
rule_index |
No |
String |
Details: Rule index. It is used to index a specific rule when the rule is triggered. Constraints: You do not need to specify it. Options: 0 to 64 characters Default value: N/A |
|
rule_name |
No |
String |
Details: Rule name. Constraints: N/A Options: 0 to 256 characters Default value: N/A |
|
enabled |
No |
Boolean |
Details: Whether to enable. Constraints: N/A Options:
Default value: true |
|
event_type |
No |
Integer |
Details: Livestreaming event type matched by the rule. The value range is 0 to 100. Options: 1: On-screen comments 2: User joining a room 3: Giving likes 4: Sending gifts 10: Preset script events Use the actual value.
NOTE:
Constraints: N/A Default value: N/A Value range: 0~100 |
|
hit_condition |
No |
HitCondition object |
Rule matching condition |
|
trigger |
No |
TriggerProcess object |
Processing after rule matching |
|
review_config |
No |
ReviewConfig object |
Content review configuration. |
|
group_id |
No |
String |
Details: Interaction rule library ID, which is carried when a rule is imported from the interaction rule library. Constraints: N/A Options: The value contains 1 to 64 characters. Default value: N/A |
|
group_name |
No |
String |
Details: Interaction rule library name, which is carried when a rule is imported from the interaction rule library. Constraints: N/A Options: The value contains 1 to 256 characters. Default value: N/A |
|
enabled_scenes |
No |
Array of strings |
Details: Scenario where a rule is enabled. Set this parameter when some scenarios are enabled. If this field is not specified, it applies to all scenarios. Constraints: N/A Options: Livestreaming scenes. A maximum of 100 scenes are allowed. Enter a scene name, which contains 1 to 256 characters. Default value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
relation |
No |
String |
Details: Condition relationship, specifically, the logical operation relationship between multiple conditions. Constraints: N/A Options:
Default value: N/A |
|
priority |
No |
Integer |
Details: Priority. A smaller value indicates a higher priority. The value ranges from 0 to 999. The default value is 500. This parameter is optional. Constraints: N/A Value range: 0~999 Default value: 500 |
|
tags |
No |
Array of HitConditionTag objects |
Matching relationship configuration |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
tag |
No |
String |
Details: Key fields in the event content.
NOTE:
{ "timestamp": 1694481224245, "type": 1, "content": "{"user":{"userId":"2027271526","name":"","level":17,"badge":"","badgeLevel":0},"content":""}" } To match the on-screen comment content, enter content. To match the user platform level, enter level. Constraints: N/A Options: The value contains 0 to 256 characters. Default value: N/A |
|
operation |
No |
String |
Details: Field value processing Constraints: N/A Options:
Default value: NONE |
|
match |
No |
String |
Details: Match type. You are advised to use REGEX for keyword matching. Constraints: N/A Options:
Default value: N/A |
|
value |
No |
String |
Details: Matched value. Constraints: N/A Options: The value contains 0 to 1,024 characters. Default value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
time_window |
No |
Integer |
Details: Processing suppression duration, in second.
Constraints: N/A Default value: N/A Value range: -1~7200 |
|
reply_mode |
No |
String |
Definition: Reply type. Constraints: N/A Value range:
Default value: N/A |
|
layer_config |
No |
SmartLayerConfig object |
Intelligent layer configuration. |
|
extra_layer_config |
No |
SmartLayerConfig object |
Additional layer, which is used together with the second layer when dynamic text needs to be displayed for products. |
|
reply_texts |
No |
Array of strings |
Details: Reply scripts. Constraints: N/A Options: A maximum of five preset scripts are allowed. A single script contains 0 to 1,024 characters. Default value: N/A |
|
reply_audios |
No |
Array of ReplyAudioInfo objects |
Details: Reply audio set. Set audio_url. Constraints: N/A Options: A maximum of five preset audio files are allowed. Default value: N/A |
|
reply_order |
No |
String |
Details: Sequence of reading reply scripts. Constraints: N/A Options:
Default value: N/A |
|
reply_role |
No |
String |
Details: Reply role. Constraints: N/A Options:
Default value: STREAMER |
|
robot_id |
No |
String |
Details: Bot ID. Constraints: ID of the large model robot configured for intelligent interaction. This parameter is mandatory when reply_mode is set to INTELLIGENT_REPLY. For details about how to obtain the ID, see Creating an Application. Options: The value contains 0 to 64 characters. Default value: N/A |
|
play_type |
No |
String |
Reply playback type.
Default value: PLAY_NOW |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
layer_type |
Yes |
String |
Layer type.
|
|
asset_id |
No |
String |
ID of the asset overlaid on a video. You do not need to set this parameter for external assets. |
|
position |
No |
LayerPositionConfig object |
Layer position configuration. |
|
size |
No |
LayerSizeConfig object |
Layer size configuration. |
|
image_config |
No |
SmartImageLayerConfig object |
Image layer configuration. |
|
video_config |
No |
SmartVideoLayerConfig object |
Video layer configuration. |
|
text_config |
No |
SmartTextLayerConfig object |
Video layer configuration. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
image_url |
Yes |
String |
Image file URL. |
|
display_duration |
No |
Integer |
Details: Image display duration, in second. If reply_texts and reply_audios are carried, the duration is the same as the audio playback duration. If reply_texts and reply_audios are not carried, the duration is the same as the audio playback duration of the matched keyword. Value range: 0~3600 Default value: 0 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
video_url |
Yes |
String |
Video file URL. |
|
video_cover_url |
No |
String |
Video thumbnail file URL. |
|
display_duration |
No |
Integer |
Details: Image display duration, in second. If reply_texts and reply_audios are carried, the duration is the same as the audio playback duration. If reply_texts and reply_audios are not carried, the duration is the same as the audio playback duration of the matched keyword. Value range: 0~3600 Default value: 0 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
text_type |
No |
String |
Details: Text type.
Default value: DYNAMIC |
|
text_context |
No |
String |
Text. |
|
font_name |
No |
String |
Details: Font. The following fonts are supported:
Default value: HarmonyOS_Sans_SC_Black |
|
font_size |
No |
Integer |
Details: Font size (in pixel). Value range: [4, 120]. The value range is subject to the actual service. Value range: 0~120 Default value: 16 |
|
font_color |
No |
String |
Details: Font color. RGB color value. Default value: #FFFFFF |
|
display_duration |
No |
Integer |
Details: Text display duration, in second. If reply_texts and reply_audios are carried, the duration is the same as the audio playback duration. If reply_texts and reply_audios are not carried, the duration is the same as the audio playback duration of the matched keyword. Value range: 0~3600 Default value: 0 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
audio_url |
No |
String |
Audio URL. |
|
audio_name |
No |
String |
Audio name. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
repeat_count |
No |
Integer |
Details: Number of times that a script is played repeatedly.
Constraints: N/A Value range: -1~100 Default value: 0 |
|
auto_play_script |
No |
Boolean |
Details: Indicates whether to automatically play a script. Constraints: N/A Options:
Default value: true |
|
play_mode |
No |
String |
Details: Virtual avatar control method. Constraints: N/A Options: TEXT: text control, that is, using TTS AUDIO: speech control NO_PRESET: no preset script, manual control Default value: TEXT |
|
random_play_mode |
No |
String |
Details: Method of random script reading. Constraints: Random script reading starts from the second round of reading. Options:
Default value: SCRIPT_ITEM |
|
need_independent_capture_client |
No |
Boolean |
Definition: Whether an independent data collection device is required. This parameter is used when the client playback is separated from the command. Constraints: N/A Value range:
Default value: false |
|
live_exit_config |
No |
LiveExitConfig object |
Livestreaming task exit configuration |
|
is_rewrite_delay |
No |
Boolean |
Definition: Whether the dynamically edited script that is not played takes effect in the next round. Constraints: N/A Value range:
Default value: false Default value: false |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
max_live_duration |
No |
Integer |
Definition: Maximum livestreaming duration, in hours. If this parameter is set to n, the livestream stops n hours after the livestream starts. The maximum value is 168 (one week). The value 0 indicates no limitation. Constraints: If the condition for stopping a livestream is set to stopping immediately, the livestream will continue running for a maximum of five minutes after an error occurs. For other conditions, the processing duration needs to be included. Default value: If this parameter is not specified, the duration is not limited. Value range: 0~168 |
|
auto_stop_mode |
No |
String |
Definition: How a livestream automatically stops.
Constraints: N/A Default value: If this parameter is not specified, the value FORCE_EXIT is used. |
|
max_exception_waiting_duration |
No |
Integer |
Definition: The maximum duration the livestream will continue running after an error is detected. Unit: minute. If this parameter is set to n, the livestream stops n minutes after an exception is detected. The maximum value is 60 (one hour). The value 0 indicates no limitation. Constraints: N/A Default value: If this parameter is not specified, the default value (3 minutes) is used. The default value may be slightly adjusted according to the service running status. Value range: 0~60 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
clip_mode |
No |
String |
Definition Clipping mode of the output video. Constraints N/A Range
Default value: RESIZE |
|
codec |
No |
String |
Definition Video encoding format and video file format. Constraints Only virtual avatar video production supports VP8 and QTRLE encoding. When QTRLE encoding is used, the number of characters for text-based control is less than 1,500, and the audio length for audio-based control is less than 5 minutes. You can use QTRLE encoding only after being whitelisted. Range
Default Value H264 Default value: H264 |
|
bitrate |
Yes |
Integer |
Definition Average output bitrate. Unit: kbit/s Constraints
Default Value N/A Value range: 40~30000 |
|
width |
Yes |
Integer |
Definition Video width. Unit: pixel Constraints
Default Value N/A Value range: 0~3840 |
|
height |
Yes |
Integer |
Definition Video height. Unit: pixel Constraints
Default Value N/A Value range: 0~3840 |
|
frame_rate |
No |
String |
Definition Frame rate. Unit: FPS Constraints The virtual avatar video frame rate is fixed at 25 FPS. Default value: 25 |
|
is_subtitle_enable |
No |
Boolean |
Definition Whether the output video is subtitled. Constraints Subtitles are not supported for virtual avatar livestreaming. Range
Default value: false |
|
subtitle_config |
No |
SubtitleConfig object |
Subtitle configuration. |
|
dx |
No |
Integer |
Definition Horizontal coordinate of the pixel in the upper left corner of the cropped video.
NOTE:
The image layout size is based on the model resolution. For example, for a model with the resolution of 1920 x 1080, the value of dx ranges from 0 to 1920.
Constraints This parameter takes effect when clip_mode is set to CROP. Default Value N/A Value range: -1920~3840 |
|
dy |
No |
Integer |
Definition Vertical coordinate of the pixel in the upper left corner of the cropped video.
NOTE:
The image layout size is based on the model resolution. For example, for a model with the resolution of 1920 x 1080, the value of dy ranges from 0 to 1080.
Constraints This parameter takes effect when clip_mode is set to CROP. Default Value N/A Value range: -1920~3840 |
|
is_enable_super_resolution |
No |
Boolean |
Definition Whether super resolution is enabled for a video. Constraints This parameter is available only for virtual avatar video production. Range
Default value: false |
|
is_end_at_first_frame |
No |
Boolean |
Definition Whether the end frame of a video is the same as the start frame. Set this parameter to true if multiple virtual avatar videos need to be seamlessly merged. Constraints This parameter is supported only for virtual avatar video production. This setting becomes invalid after an action tag is inserted during video production. Range
Default value: false |
|
output_external_url |
No |
String |
External URL to which a video file is uploaded.
NOTE:
|
|
is_vocabulary_config_enable |
No |
Boolean |
Definition Whether to apply the pronunciation configuration of the current tenant. Constraints This parameter is available only for virtual avatar video production. Range
Default value: true |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
dx |
No |
Integer |
Definition Coordinates of the pixel in the lower left corner of the subtitle box. Constraints N/A Default Value N/A Value range: 0~1920 |
|
dy |
No |
Integer |
Definition Coordinates of the pixel in the lower left corner of the subtitle box. Constraints N/A Default Value N/A Value range: 0~1920 |
|
h |
No |
Integer |
Definition Subtitle box height. Constraints The parameter h is used to facilitate the calculation of the coordinates in the upper left corner of the subtitle box. This parameter is not used in the background. Value range: 0~1920 |
|
w |
No |
Integer |
Definition Subtitle box width. Constraints
Value range: 0~1920 |
|
font_name |
No |
String |
Definition Font. For details about the supported fonts, see Supported Fonts. Constraints N/A Range The value can contain 0 to 64 characters. Default value: HarmonyOS_Sans_SC_Black |
|
font_size |
No |
Integer |
Definition Font size. The interface value ranges from 0 to 120. The actual value range is 24 to 120. Use the actual value range. Constraints N/A Value range: 0~120 Default value: 54 |
|
font_color |
No |
String |
Definition RGB color value of the subtitle font. Constraints None. Range The value has a fixed length and contains 0 to 7 characters. Default value: #FFFFFF |
|
stroke_color |
No |
String |
Definition RGB color value of the subtitle font stroke. Constraints None. Range The value has a fixed length and contains 0 to 7 characters. |
|
stroke_thickness |
No |
Float |
Definition Pixel value of the subtitle font stroke. Constraints None. Range 0-50 Value range: 0~50 |
|
opacity |
No |
Float |
Definition Subtitle font opacity. 0 indicates 100/ %transparency and 1 indicates 100/ %opacity. The default value is 1. Constraints None. Range 0-1 Value range: 0~1 Default value: 1 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
live_event_type_callback_url |
No |
String |
Details: Live event callback address, which is an HTTPS address. Constraints: N/A Options: The value contains 0 to 2,048 characters. Default value: N/A |
|
auth_type |
No |
String |
Details: Authentication type. Constraints: N/A Options:
Value format: hwSecret=hmac_sha256(Key, URI (live_event_callback_url) + hwTime)&hwTime=hex(timestamp) Value format: x-hw-mss-secret=hmac_sha256(Key, URI (live_event_callback_url) + hwTime) x-hw-mss-time=hex(timestamp) Default value: NONE |
|
key |
No |
String |
Details: Key. Constraints: N/A Options: The value contains 0 to 32 characters. Default value: N/A |
|
callback_event_type |
No |
Array of strings |
Details: Live event types in callbacks. Constraints: N/A Options: Currently, only the following options are supported:
The callback event structure is defined as follows:
|
|
is_inheritance_platform_callback |
No |
Boolean |
Definition: Whether to inherit the callback configuration of the live platform. The default value is true. Constraints: N/A Value range: true: inheriting false: not inheriting Default value: false Default value: false |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
rtc_callback_event_type |
No |
Array of strings |
Live event types in RTC callbacks. Currently, only the following options are supported:
The callback event structure is defined as follows:
|
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
no_need_review |
No |
Boolean |
Content review whitelist. This feature is available only for users in the whitelist. The auto review policies apply to other users. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
shared_type |
No |
String |
Details: Sharing type. Constraints: This configuration applies only to templates. Options:
Default value: N/A |
|
shared_state |
No |
String |
Details: Sharing status. Constraints: This configuration applies only to templates whose shared_type is SHARED. Options:
Default value: N/A |
|
expire_time |
No |
String |
Details: Time when the sharing expires. If this parameter is left blank, the sharing never expires. Constraints: This configuration applies only to templates whose shared_type is SHARED. The format complies with RFC 3339, for example, 20210110T08:43:17Z. Options: The value contains 0 to 20 characters. Default value: N/A |
|
allowed_project_ids |
No |
Array of strings |
Details: Tenants allowed to access the asset. Constraints: This configuration applies only to templates whose shared_type is SHARED. Options: A maximum of 100 tenants are allowed. Duplicate records will be ignored. Enter a project ID containing 1 to 64 characters. Default value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
voice_config |
No |
VoiceConfig object |
Voice configuration parameter. |
|
streamer_action |
No |
String |
Details: Behavior of the streamer when the co-streamer speaks. Constraints: N/A Options:
Default value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
voice_asset_id |
Yes |
String |
Definition Timbre asset ID, which can be queried from the asset library. For details about how to query voice IDs, see Querying Preset Voice IDs. Constraints N/A Range The value can contain 1 to 256 characters. Default Value N/A |
|
speed |
No |
Integer |
Definition Speaking speed. 50 indicates 0.5x speaking speed, 100 indicates normal speaking speed, and 200 indicates 2x speaking speed. The value 100 indicates the normal speaking speed of an adult, which is about 250 words per minute. Constraints N/A Value range: 50~200 Default value: 100 |
|
pitch |
No |
Integer |
Definition Pitch. Constraints N/A Value range: 50~200 Default value: 100 |
|
volume |
No |
Integer |
Definition Volume. Constraints N/A Value range: 90~240 Default value: 140 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
platform_id |
Yes |
String |
Live platform ID. |
|
live_id |
Yes |
String |
Livestream ID. If this parameter is specified, the segment switching callback contains this parameter. The value can contain only letters, digits, hyphens (-), and underscores (_). liveId of Meituan. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
X-Request-Id |
String |
Request ID. |
|
Parameter |
Type |
Description |
|---|---|---|
|
room_name |
String |
Definition: Live room name. Constraints: N/A Value range: The value contains 1 to 256 characters. Default value: N/A |
|
room_description |
String |
Definition: Live room description. Constraints: N/A Value range: The value contains 0 to 1,024 characters. Default value: N/A |
|
room_type |
String |
Definition: Live room type. Constraints: N/A Value range:
Default value: NORMAL |
|
scene_scripts |
Array of LiveVideoScriptInfo objects |
Default livestreaming script list. |
|
interaction_config |
LiveRoomInteractionConfig object |
Interaction settings |
|
interaction_rules |
Array of LiveRoomInteractionRuleInfo objects |
Interaction rules |
|
play_policy |
PlayPolicy object |
Script reading policy |
|
video_config |
VideoConfig object |
Video output configuration. |
|
output_urls |
Array of strings |
Definition: URL of the third-party live platform for RTMP video stream push.
NOTE:
The command REFRESH_OUTPUT_URL needs to be executed to refresh the URL during the livestream.
Constraints: N/A Value range: Currently, only one RTMP output URL is supported. Default value: N/A |
|
stream_keys |
Array of strings |
Definition: Stream key of the third-party live platform for RTMP video stream push. The key corresponds to the ingest URL.
NOTE:
The command REFRESH_OUTPUT_URL needs to be executed to refresh the URL during the livestream.
Constraints: N/A Value range: Currently, only one RTMP output URL is supported. Default value: N/A |
|
backup_model_asset_ids |
Array of strings |
Definition: Asset ID of the alternative virtual streamer (only image assets, excluding the voice). Constraints: N/A Value range: Currently, a maximum of five alternative streamers are allowed. Virtual avatar asset ID, which contains 0 to 64 characters. Default value: N/A |
|
live_event_callback_config |
LiveRoomEventCallBackConfig object |
|
|
rtc_callback_config |
RTCLiveEventCallBackConfig object |
RTC callback event configuration. Compatible processing. If the configuration is not carried, LIVE_PROGRESS is subscribed by default. |
|
review_config |
ReviewConfig object |
Content review configuration |
|
shared_config |
SharedConfig object |
Shared configuration |
|
view_mode |
String |
Definition: Landscape or portrait mode. Constraints: You do not need to set this parameter. The value is determined by the resolution in video_config. Value range:
Default value: VERTICAL |
|
co_streamer_config |
CoStreamerConfig object |
Co-streamer configuration |
|
priv_data |
String |
Definition: Private data of the match value, which is entered by the user and then returned with the same content. Constraints: N/A Value range: The value contains 0 to 8,192 characters. Default value: N/A |
|
room_id |
String |
Livestreaming room ID. |
|
relation_live_platform_info |
PlatformLiveDetailInfo object |
Platform live streaming information |
|
create_time |
String |
Time when a livestreaming room is created. The value is in RFC 3339 format, for example, 2021-01-10T08:43:17Z. |
|
update_time |
String |
Time when a livestreaming room is updated. The format complies with RFC 3339, for example, 2021-01-10T08:43:17Z. |
|
cover_url |
String |
Livestreaming room thumbnail URL. |
|
thumbnail |
String |
New URL of the live room thumbnail |
|
room_state |
String |
Live room status.
|
|
confirm_state |
String |
Confirms the live room status. This status is used only when manual confirmation is required for specific users.
|
|
script_version |
String |
Live room script version. The API update can be called to update the version. The timestamp is used. |
|
error_info |
ErrorResponse object |
Error messages of a virtual human live room. |
|
Parameter |
Type |
Description |
|---|---|---|
|
script_id |
String |
Details: Script ID. Constraints: Leave this field blank. Options: The value contains 1 to 64 characters. Default value: N/A |
|
script_name |
String |
Details: Script name. Constraints: This field is mandatory. Options: The value contains 1 to 256 characters. Default value: N/A |
|
script_description |
String |
Details: Script description. Constraints: Leave this field blank. Options: The value contains 0 to 1,024 characters. Default value: N/A |
|
dh_id |
String |
Details: Virtual avatar ID, which corresponds to the combination of image and timbre. Constraints: This field is not used currently and does not need to be specified. Options: The value contains 0 to 64 characters. Default value: N/A |
|
model_asset_id |
String |
Details: Virtual human model asset ID, which can be queried from the asset library. Constraints: N/A Options: The value contains 0 to 64 characters. Default value: N/A |
|
voice_config |
VoiceConfig object |
Voice configuration parameter. |
|
background_config |
Array of BackgroundConfigInfo objects |
Background configuration. |
|
layer_config |
Array of LayerConfig objects |
Layer configuration. |
|
shoot_scripts |
Array of LiveShootScriptItem objects |
Shooting script list. |
|
Parameter |
Type |
Description |
|---|---|---|
|
background_type |
String |
Definition Background type. Constraints N/A Range
Default Value N/A |
|
background_config |
String |
Definition Background file URL. Constraints
Range The value contains 1 to 2,048 characters. Default Value N/A |
|
background_color_config |
String |
Definition RGB color value of a solid color background. Constraints This parameter is mandatory when background_type is set to COLOR. Range The value contains 0 to 16 characters. Default value: #FFFFFF |
|
background_asset_id |
String |
Definition Background asset ID.
NOTE:
If a background image is used, enter the image asset ID.
Constraints N/A Range The value can contain 0 to 64 characters. Default Value N/A |
|
background_image_config |
BackgroundImageConfig object |
Background image size and position setting. |
|
Parameter |
Type |
Description |
|---|---|---|
|
dx |
Integer |
Definition X axis position of the pixel in the upper left corner of the background image. The coordinate of the upper left corner of the preview area is 0x0. The video resolution is 1920 x 1080 in landscape mode (16:9) and 1080 x 1920 in portrait mode (9:16). Constraints The background image must cover the entire preview area. That is, dx ≤ 0, dx + width ≥ 1920 in landscape mode, and dx + width ≥ 1080 in portrait mode. Value range: -5760~0 Default value: 0 |
|
dy |
Integer |
Definition Y axis position of the pixel in the upper left corner of the background image. The coordinate of the upper left corner of the preview area is 0x0. The video resolution is 1920 x 1080 in landscape mode (16:9) and 1080 x 1920 in portrait mode (9:16). Constraints The background image must cover the entire preview area. That is, dy ≤ 0, dy + height ≥ 1080 in landscape mode, and dy + height ≥ 1920 in portrait mode. Value range: -5760~0 Default value: 0 |
|
width |
Integer |
Definition Width (in pixels) of the background image (relative to the preview area size). The video resolution is 1920 x 1080 in landscape mode (16:9) and 1080 x 1920 in portrait mode (9:16). Constraints The background image must cover the entire preview area. That is, width > 1080, dx + width ≥ 1920 in landscape mode, and dx + width ≥ 1080 in portrait mode. Value range: 1~7680 |
|
height |
Integer |
Definition Height (in pixels) of the background image (relative to the preview area size). The video resolution is 1920 x 1080 in landscape mode (16:9) and 1080 x 1920 in portrait mode (9:16). Constraints The background image must cover the entire preview area. height > 1080, dy + height ≥ 1080 in landscape mode, and dy + height ≥ 1920 in portrait mode. Value range: 1~7680 |
|
Parameter |
Type |
Description |
|---|---|---|
|
layer_type |
String |
Definition Layer type. Constraints N/A Range
Default Value N/A |
|
asset_id |
String |
Definition ID of the asset overlaid on a video. You do not need to set this parameter for external assets. Constraints N/A Range The value can contain 0 to 64 characters. Default Value N/A |
|
group_id |
String |
Definition Groups materials in multiple scenes. Materials with the same group_id share location information when they are applied globally. Constraints N/A Range The value can contain 0 to 64 characters. Default Value N/A |
|
sequence_no |
Integer |
Definition Overlay of the paragraph currently being shown. This field is forward compatible and optional. This parameter is valid only for livestreaming. Constraints The paragraph is subject to sequence_no. Default Value N/A Value range: 0~2147483647 |
|
position |
LayerPositionConfig object |
Layer position configuration. |
|
size |
LayerSizeConfig object |
Layer size configuration. |
|
rotation |
LayerRotationConfig object |
Overlay rotation configuration. |
|
image_config |
ImageLayerConfig object |
Image layer configuration. |
|
video_config |
VideoLayerConfig object |
Video overlay configuration. |
|
text_config |
TextLayerConfig object |
Material text layer configuration. |
|
Parameter |
Type |
Description |
|---|---|---|
|
dx |
Integer |
Definition X axis position of the pixel in the upper left corner of the image. The coordinate of the upper left corner of the image layout is 0x0. The video resolution is 1920 x 1080 in landscape mode (16:9) and 1080 x 1920 in portrait mode (9:16). Constraints The value is the pixel value relative to the image layout. It indicates only the layout position relationship and is irrelevant to the resolution of the output image. Value range: -1920~3840 Default value: 0 |
|
dy |
Integer |
Definition Y axis position of the pixel in the upper left corner of the image. The coordinate of the upper left corner of the image layout is 0x0. The video resolution is 1920 x 1080 in landscape mode (16:9) and 1080 x 1920 in portrait mode (9:16). Constraints The value is the pixel value relative to the image layout. It indicates only the layout position relationship and is irrelevant to the resolution of the output image. Value range: -1920~3840 Default value: 0 |
|
layer_index |
Integer |
Definition Overlay sequence of an image, video, or person image.
NOTE:
The overlay sequence is an integer starting from 1 and incremented by 1.
Constraints If there are duplicate overlays, the relationship between the duplicate overlays is random. Value range: 1~100 Default value: 100 |
|
Parameter |
Type |
Description |
|---|---|---|
|
width |
Integer |
Definition Y axis position of the pixel in the upper left corner of the image, that is, width (in pixels) of the image overlay (relative to the preview area size). The video resolution is 1920 x 1080 in landscape mode (16:9) and 1080 x 1920 in portrait mode (9:16). Constraints The value is the pixel value relative to the image layout. It indicates only the layout position relationship and is irrelevant to the resolution of the output image. Value range: 1~7680 |
|
height |
Integer |
Definition Height (in pixels) of the image overlay (relative to the preview area size). The video resolution is 1920 x 1080 in landscape mode (16:9) and 1080 x 1920 in portrait mode (9:16). Constraints The value is the pixel value relative to the image layout. It indicates only the layout position relationship and is irrelevant to the resolution of the output image. | Value range: 1~7680 |
|
Parameter |
Type |
Description |
|---|---|---|
|
angle |
Integer |
Definition Rotation angle. Range 0 to 360 degrees Default Value 0 degrees Constraints The material is rotated around the center point. Video materials cannot be rotated. Value range: 0~360 |
|
Parameter |
Type |
Description |
|---|---|---|
|
image_url |
String |
Definition Image file URL. Constraints
Range The value contains 1 to 2,048 characters. Default Value N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
video_url |
String |
Definition Video file URL. Constraints
Range The value contains 1 to 2,048 characters. Default Value N/A |
|
video_cover_url |
String |
Definition Video thumbnail file URL. Constraints
Range The value contains 1 to 2,048 characters. Default Value N/A |
|
loop_count |
Integer |
Definition Number of times that a video is played cyclically. Options:
Constraints N/A Value range: -1~100 Default value: -1 |
|
video_sound |
Integer |
Definition The percentage used to adjust the volume of the video overlay. The value ranges from 0 to 100. The default value 0 indicates the audio is muted. Constraints N/A Value range: 0~100 |
|
is_play_the_entire_video |
Boolean |
Definition Whether to play the entire video. true indicates that the entire video is played. false indicates that the video stops playing when the inserted scene text or audio ends. Options: The default value is false. Constraints N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
text_context |
String |
Definition Text of the text layer. The content must be encoded using Base64. For example, if you want to add the text watermark "Test text watermark", set text_context to 5rWL6K+V5paH5a2X5rC05Y2w. Constraints N/A Range The value contains 0 to 1,024 characters. Default Value N/A |
|
font_name |
String |
Font. For details about the supported fonts, see Supported Fonts. Constraints N/A Range The value can contain 0 to 64 characters. Default value: HarmonyOS_Sans_SC_Black |
|
font_size |
Integer |
Definition Font size (in pixels). The interface value ranges from 0 to 120. The actual value range is 4 to 120. Use the actual value range. Constraints N/A Value range: 0~120 Default value: 16 |
|
font_color |
String |
Definition Font color. RGB color value. Constraints N/A Range The value contains 0 to 16 characters. Default value: #FFFFFF |
|
Parameter |
Type |
Description |
|---|---|---|
|
sequence_no |
Integer |
Details: Script No. Constraints: N/A Value range: 0~2147483647 |
|
title |
String |
Details: Paragraph title. Constraints: N/A Options: The value contains 0 to 256 characters. Default value: N/A |
|
text_config |
TextConfig object |
Script configuration. |
|
audio_config |
LiveAudioConfig object |
Live audio configuration. |
|
relation_product |
RelationProductInfo object |
Associated product |
|
Parameter |
Type |
Description |
|---|---|---|
|
text |
String |
Definition Script. Two modes are supported: plain text mode and tag mode.
Constraints The value can contain a maximum of 10,000 characters, excluding the SSML tag. Range The value contains 0 to 131,072 characters. Default Value N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
asset_id |
String |
Details: ID of the inserted audio asset. You do not need to set this parameter for external assets. If you enter a value, you can query it from the asset library. Constraints: N/A Options: The value contains 0 to 64 characters. Default value: N/A |
|
audio_url |
String |
Details: Audio URL. Constraints: Only the MP3 format is supported. The size is less than 100 MB. The output is automatically converted to mono 16 kHz for sampling. Options: The value contains 0 to 2,048 characters. Default value: N/A |
|
subtitle_url |
String |
Details: URL of the subtitle file of the audio. Constraints: Only the SRT format is supported. The size is less than 1 MB. Options: The value contains 0 to 2,048 characters. Default value: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
product_id |
String |
Associated product ID. If this parameter is specified, the segment switching callback contains this parameter. For Meituan, set this parameter to goodsId. |
|
product_title |
String |
Associated product title/name. If this parameter is specified, the segment switching callback contains this parameter. For Meituan, set this parameter to goodsTitle. |
|
Parameter |
Type |
Description |
|---|---|---|
|
play_type |
String |
Playback mode:
Default value: INSERT |
|
ignore_current_sentence |
Boolean |
The second half of a sentence is not read for reply. It is used for immediate interruption. By default, it is not ignored. Default value: false |
|
Parameter |
Type |
Description |
|---|---|---|
|
rule_index |
String |
Details: Rule index. It is used to index a specific rule when the rule is triggered. Constraints: You do not need to specify it. Options: 0 to 64 characters Default value: N/A |
|
rule_name |
String |
Details: Rule name. Constraints: N/A Options: 0 to 256 characters Default value: N/A |
|
enabled |
Boolean |
Details: Whether to enable. Constraints: N/A Options:
Default value: true |
|
event_type |
Integer |
Details: Livestreaming event type matched by the rule. The value range is 0 to 100. Options: 1: On-screen comments 2: User joining a room 3: Giving likes 4: Sending gifts 10: Preset script events Use the actual value.
NOTE:
Constraints: N/A Default value: N/A Value range: 0~100 |
|
hit_condition |
HitCondition object |
Rule matching condition |
|
trigger |
TriggerProcess object |
Processing after rule matching |
|
review_config |
ReviewConfig object |
Content review configuration. |
|
group_id |
String |
Details: Interaction rule library ID, which is carried when a rule is imported from the interaction rule library. Constraints: N/A Options: The value contains 1 to 64 characters. Default value: N/A |
|
group_name |
String |
Details: Interaction rule library name, which is carried when a rule is imported from the interaction rule library. Constraints: N/A Options: The value contains 1 to 256 characters. Default value: N/A |
|
enabled_scenes |
Array of strings |
Details: Scenario where a rule is enabled. Set this parameter when some scenarios are enabled. If this field is not specified, it applies to all scenarios. Constraints: N/A Options: Livestreaming scenes. A maximum of 100 scenes are allowed. Enter a scene name, which contains 1 to 256 characters. Default value: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
relation |
String |
Details: Condition relationship, specifically, the logical operation relationship between multiple conditions. Constraints: N/A Options:
Default value: N/A |
|
priority |
Integer |
Details: Priority. A smaller value indicates a higher priority. The value ranges from 0 to 999. The default value is 500. This parameter is optional. Constraints: N/A Value range: 0~999 Default value: 500 |
|
tags |
Array of HitConditionTag objects |
Matching relationship configuration |
|
Parameter |
Type |
Description |
|---|---|---|
|
tag |
String |
Details: Key fields in the event content.
NOTE:
{ "timestamp": 1694481224245, "type": 1, "content": "{"user":{"userId":"2027271526","name":"","level":17,"badge":"","badgeLevel":0},"content":""}" } To match the on-screen comment content, enter content. To match the user platform level, enter level. Constraints: N/A Options: The value contains 0 to 256 characters. Default value: N/A |
|
operation |
String |
Details: Field value processing Constraints: N/A Options:
Default value: NONE |
|
match |
String |
Details: Match type. You are advised to use REGEX for keyword matching. Constraints: N/A Options:
Default value: N/A |
|
value |
String |
Details: Matched value. Constraints: N/A Options: The value contains 0 to 1,024 characters. Default value: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
time_window |
Integer |
Details: Processing suppression duration, in second.
Constraints: N/A Default value: N/A Value range: -1~7200 |
|
reply_mode |
String |
Definition: Reply type. Constraints: N/A Value range:
Default value: N/A |
|
layer_config |
SmartLayerConfig object |
Intelligent layer configuration. |
|
extra_layer_config |
SmartLayerConfig object |
Additional layer, which is used together with the second layer when dynamic text needs to be displayed for products. |
|
reply_texts |
Array of strings |
Details: Reply scripts. Constraints: N/A Options: A maximum of five preset scripts are allowed. A single script contains 0 to 1,024 characters. Default value: N/A |
|
reply_audios |
Array of ReplyAudioInfo objects |
Details: Reply audio set. Set audio_url. Constraints: N/A Options: A maximum of five preset audio files are allowed. Default value: N/A |
|
reply_order |
String |
Details: Sequence of reading reply scripts. Constraints: N/A Options:
Default value: N/A |
|
reply_role |
String |
Details: Reply role. Constraints: N/A Options:
Default value: STREAMER |
|
robot_id |
String |
Details: Bot ID. Constraints: ID of the large model robot configured for intelligent interaction. This parameter is mandatory when reply_mode is set to INTELLIGENT_REPLY. For details about how to obtain the ID, see Creating an Application. Options: The value contains 0 to 64 characters. Default value: N/A |
|
play_type |
String |
Reply playback type.
Default value: PLAY_NOW |
|
Parameter |
Type |
Description |
|---|---|---|
|
layer_type |
String |
Layer type.
|
|
asset_id |
String |
ID of the asset overlaid on a video. You do not need to set this parameter for external assets. |
|
position |
LayerPositionConfig object |
Layer position configuration. |
|
size |
LayerSizeConfig object |
Layer size configuration. |
|
image_config |
SmartImageLayerConfig object |
Image layer configuration. |
|
video_config |
SmartVideoLayerConfig object |
Video layer configuration. |
|
text_config |
SmartTextLayerConfig object |
Video layer configuration. |
|
Parameter |
Type |
Description |
|---|---|---|
|
image_url |
String |
Image file URL. |
|
display_duration |
Integer |
Details: Image display duration, in second. If reply_texts and reply_audios are carried, the duration is the same as the audio playback duration. If reply_texts and reply_audios are not carried, the duration is the same as the audio playback duration of the matched keyword. Value range: 0~3600 Default value: 0 |
|
Parameter |
Type |
Description |
|---|---|---|
|
video_url |
String |
Video file URL. |
|
video_cover_url |
String |
Video thumbnail file URL. |
|
display_duration |
Integer |
Details: Image display duration, in second. If reply_texts and reply_audios are carried, the duration is the same as the audio playback duration. If reply_texts and reply_audios are not carried, the duration is the same as the audio playback duration of the matched keyword. Value range: 0~3600 Default value: 0 |
|
Parameter |
Type |
Description |
|---|---|---|
|
text_type |
String |
Details: Text type.
Default value: DYNAMIC |
|
text_context |
String |
Text. |
|
font_name |
String |
Details: Font. The following fonts are supported:
Default value: HarmonyOS_Sans_SC_Black |
|
font_size |
Integer |
Details: Font size (in pixel). Value range: [4, 120]. The value range is subject to the actual service. Value range: 0~120 Default value: 16 |
|
font_color |
String |
Details: Font color. RGB color value. Default value: #FFFFFF |
|
display_duration |
Integer |
Details: Text display duration, in second. If reply_texts and reply_audios are carried, the duration is the same as the audio playback duration. If reply_texts and reply_audios are not carried, the duration is the same as the audio playback duration of the matched keyword. Value range: 0~3600 Default value: 0 |
|
Parameter |
Type |
Description |
|---|---|---|
|
audio_url |
String |
Audio URL. |
|
audio_name |
String |
Audio name. |
|
Parameter |
Type |
Description |
|---|---|---|
|
repeat_count |
Integer |
Details: Number of times that a script is played repeatedly.
Constraints: N/A Value range: -1~100 Default value: 0 |
|
auto_play_script |
Boolean |
Details: Indicates whether to automatically play a script. Constraints: N/A Options:
Default value: true |
|
play_mode |
String |
Details: Virtual avatar control method. Constraints: N/A Options: TEXT: text control, that is, using TTS AUDIO: speech control NO_PRESET: no preset script, manual control Default value: TEXT |
|
random_play_mode |
String |
Details: Method of random script reading. Constraints: Random script reading starts from the second round of reading. Options:
Default value: SCRIPT_ITEM |
|
need_independent_capture_client |
Boolean |
Definition: Whether an independent data collection device is required. This parameter is used when the client playback is separated from the command. Constraints: N/A Value range:
Default value: false |
|
live_exit_config |
LiveExitConfig object |
Livestreaming task exit configuration |
|
is_rewrite_delay |
Boolean |
Definition: Whether the dynamically edited script that is not played takes effect in the next round. Constraints: N/A Value range:
Default value: false Default value: false |
|
Parameter |
Type |
Description |
|---|---|---|
|
max_live_duration |
Integer |
Definition: Maximum livestreaming duration, in hours. If this parameter is set to n, the livestream stops n hours after the livestream starts. The maximum value is 168 (one week). The value 0 indicates no limitation. Constraints: If the condition for stopping a livestream is set to stopping immediately, the livestream will continue running for a maximum of five minutes after an error occurs. For other conditions, the processing duration needs to be included. Default value: If this parameter is not specified, the duration is not limited. Value range: 0~168 |
|
auto_stop_mode |
String |
Definition: How a livestream automatically stops.
Constraints: N/A Default value: If this parameter is not specified, the value FORCE_EXIT is used. |
|
max_exception_waiting_duration |
Integer |
Definition: The maximum duration the livestream will continue running after an error is detected. Unit: minute. If this parameter is set to n, the livestream stops n minutes after an exception is detected. The maximum value is 60 (one hour). The value 0 indicates no limitation. Constraints: N/A Default value: If this parameter is not specified, the default value (3 minutes) is used. The default value may be slightly adjusted according to the service running status. Value range: 0~60 |
|
Parameter |
Type |
Description |
|---|---|---|
|
clip_mode |
String |
Definition Clipping mode of the output video. Constraints N/A Range
Default value: RESIZE |
|
codec |
String |
Definition Video encoding format and video file format. Constraints Only virtual avatar video production supports VP8 and QTRLE encoding. When QTRLE encoding is used, the number of characters for text-based control is less than 1,500, and the audio length for audio-based control is less than 5 minutes. You can use QTRLE encoding only after being whitelisted. Range
Default Value H264 Default value: H264 |
|
bitrate |
Integer |
Definition Average output bitrate. Unit: kbit/s Constraints
Default Value N/A Value range: 40~30000 |
|
width |
Integer |
Definition Video width. Unit: pixel Constraints
Default Value N/A Value range: 0~3840 |
|
height |
Integer |
Definition Video height. Unit: pixel Constraints
Default Value N/A Value range: 0~3840 |
|
frame_rate |
String |
Definition Frame rate. Unit: FPS Constraints The virtual avatar video frame rate is fixed at 25 FPS. Default value: 25 |
|
is_subtitle_enable |
Boolean |
Definition Whether the output video is subtitled. Constraints Subtitles are not supported for virtual avatar livestreaming. Range
Default value: false |
|
subtitle_config |
SubtitleConfig object |
Subtitle configuration. |
|
dx |
Integer |
Definition Horizontal coordinate of the pixel in the upper left corner of the cropped video.
NOTE:
The image layout size is based on the model resolution. For example, for a model with the resolution of 1920 x 1080, the value of dx ranges from 0 to 1920.
Constraints This parameter takes effect when clip_mode is set to CROP. Default Value N/A Value range: -1920~3840 |
|
dy |
Integer |
Definition Vertical coordinate of the pixel in the upper left corner of the cropped video.
NOTE:
The image layout size is based on the model resolution. For example, for a model with the resolution of 1920 x 1080, the value of dy ranges from 0 to 1080.
Constraints This parameter takes effect when clip_mode is set to CROP. Default Value N/A Value range: -1920~3840 |
|
is_enable_super_resolution |
Boolean |
Definition Whether super resolution is enabled for a video. Constraints This parameter is available only for virtual avatar video production. Range
Default value: false |
|
is_end_at_first_frame |
Boolean |
Definition Whether the end frame of a video is the same as the start frame. Set this parameter to true if multiple virtual avatar videos need to be seamlessly merged. Constraints This parameter is supported only for virtual avatar video production. This setting becomes invalid after an action tag is inserted during video production. Range
Default value: false |
|
output_external_url |
String |
External URL to which a video file is uploaded.
NOTE:
|
|
is_vocabulary_config_enable |
Boolean |
Definition Whether to apply the pronunciation configuration of the current tenant. Constraints This parameter is available only for virtual avatar video production. Range
Default value: true |
|
Parameter |
Type |
Description |
|---|---|---|
|
dx |
Integer |
Definition Coordinates of the pixel in the lower left corner of the subtitle box. Constraints N/A Default Value N/A Value range: 0~1920 |
|
dy |
Integer |
Definition Coordinates of the pixel in the lower left corner of the subtitle box. Constraints N/A Default Value N/A Value range: 0~1920 |
|
h |
Integer |
Definition Subtitle box height. Constraints The parameter h is used to facilitate the calculation of the coordinates in the upper left corner of the subtitle box. This parameter is not used in the background. Value range: 0~1920 |
|
w |
Integer |
Definition Subtitle box width. Constraints
Value range: 0~1920 |
|
font_name |
String |
Definition Font. For details about the supported fonts, see Supported Fonts. Constraints N/A Range The value can contain 0 to 64 characters. Default value: HarmonyOS_Sans_SC_Black |
|
font_size |
Integer |
Definition Font size. The interface value ranges from 0 to 120. The actual value range is 24 to 120. Use the actual value range. Constraints N/A Value range: 0~120 Default value: 54 |
|
font_color |
String |
Definition RGB color value of the subtitle font. Constraints None. Range The value has a fixed length and contains 0 to 7 characters. Default value: #FFFFFF |
|
stroke_color |
String |
Definition RGB color value of the subtitle font stroke. Constraints None. Range The value has a fixed length and contains 0 to 7 characters. |
|
stroke_thickness |
Float |
Definition Pixel value of the subtitle font stroke. Constraints None. Range 0-50 Value range: 0~50 |
|
opacity |
Float |
Definition Subtitle font opacity. 0 indicates 100/ %transparency and 1 indicates 100/ %opacity. The default value is 1. Constraints None. Range 0-1 Value range: 0~1 Default value: 1 |
|
Parameter |
Type |
Description |
|---|---|---|
|
live_event_type_callback_url |
String |
Details: Live event callback address, which is an HTTPS address. Constraints: N/A Options: The value contains 0 to 2,048 characters. Default value: N/A |
|
auth_type |
String |
Details: Authentication type. Constraints: N/A Options:
Value format: hwSecret=hmac_sha256(Key, URI (live_event_callback_url) + hwTime)&hwTime=hex(timestamp) Value format: x-hw-mss-secret=hmac_sha256(Key, URI (live_event_callback_url) + hwTime) x-hw-mss-time=hex(timestamp) Default value: NONE |
|
key |
String |
Details: Key. Constraints: N/A Options: The value contains 0 to 32 characters. Default value: N/A |
|
callback_event_type |
Array of strings |
Details: Live event types in callbacks. Constraints: N/A Options: Currently, only the following options are supported:
The callback event structure is defined as follows:
|
|
is_inheritance_platform_callback |
Boolean |
Definition: Whether to inherit the callback configuration of the live platform. The default value is true. Constraints: N/A Value range: true: inheriting false: not inheriting Default value: false Default value: false |
|
Parameter |
Type |
Description |
|---|---|---|
|
rtc_callback_event_type |
Array of strings |
Live event types in RTC callbacks. Currently, only the following options are supported:
The callback event structure is defined as follows:
|
|
Parameter |
Type |
Description |
|---|---|---|
|
no_need_review |
Boolean |
Content review whitelist. This feature is available only for users in the whitelist. The auto review policies apply to other users. |
|
Parameter |
Type |
Description |
|---|---|---|
|
shared_type |
String |
Details: Sharing type. Constraints: This configuration applies only to templates. Options:
Default value: N/A |
|
shared_state |
String |
Details: Sharing status. Constraints: This configuration applies only to templates whose shared_type is SHARED. Options:
Default value: N/A |
|
expire_time |
String |
Details: Time when the sharing expires. If this parameter is left blank, the sharing never expires. Constraints: This configuration applies only to templates whose shared_type is SHARED. The format complies with RFC 3339, for example, 20210110T08:43:17Z. Options: The value contains 0 to 20 characters. Default value: N/A |
|
allowed_project_ids |
Array of strings |
Details: Tenants allowed to access the asset. Constraints: This configuration applies only to templates whose shared_type is SHARED. Options: A maximum of 100 tenants are allowed. Duplicate records will be ignored. Enter a project ID containing 1 to 64 characters. Default value: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
voice_config |
VoiceConfig object |
Voice configuration parameter. |
|
streamer_action |
String |
Details: Behavior of the streamer when the co-streamer speaks. Constraints: N/A Options:
Default value: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
voice_asset_id |
String |
Definition Timbre asset ID, which can be queried from the asset library. For details about how to query voice IDs, see Querying Preset Voice IDs. Constraints N/A Range The value can contain 1 to 256 characters. Default Value N/A |
|
speed |
Integer |
Definition Speaking speed. 50 indicates 0.5x speaking speed, 100 indicates normal speaking speed, and 200 indicates 2x speaking speed. The value 100 indicates the normal speaking speed of an adult, which is about 250 words per minute. Constraints N/A Value range: 50~200 Default value: 100 |
|
pitch |
Integer |
Definition Pitch. Constraints N/A Value range: 50~200 Default value: 100 |
|
volume |
Integer |
Definition Volume. Constraints N/A Value range: 90~240 Default value: 140 |
|
Parameter |
Type |
Description |
|---|---|---|
|
platform_id |
String |
Live platform ID. |
|
platform |
String |
Live platform. Enter meituan for Meituan. |
|
account |
String |
Authorized account information. For Meituan, set this parameter to opBizCode. |
|
live_id |
String |
Livestream ID. If this parameter is specified, the segment switching callback contains this parameter. liveId of Meituan. |
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Example Requests
PUT https://{endpoint}/v1/70b76xxxxxx34253880af501cdxxxxxx/smart-live-rooms/24bad716-87b1-45e5-8912-6102f7693265
{
"room_name" : "The Legend of Nature",
"room_description" : "Courseware",
"scene_scripts" : [ {
"script_name" : "The Legend of Nature —",
"model_asset_id" : "a5d295cdb345c11bd9f36bc22ced3a7a",
"voice_config" : {
"voice_asset_id" : "a5d295cdb345c11bd9f36bc22ced3a7a"
},
"background_config" : [ {
"background_type" : "IMAGE",
"background_config" : "https://{endpoint}/0d697589d98091f12f92c0073501cd79/8cb2f48a2cb006154794741933421100/b2f8a9e9c39b6dc7ed4c0cfd67366c6a.jpg?AccessKeyId=XCQKTA8IWQPCAUQS4SDA&Expires=1671241324&Signature=tD38peKsCkh%2FygE3IffeLbewuEw%3D"
} ],
"shoot_scripts" : [ {
"sequence_no" : 1,
"text_config" : {
"text" : "Hello, everyone. I'm Sara."
}
} ]
} ]
}
Example Responses
Status code: 400
Parameters error, including the error code and its description.
{
"error_code" : "MSS.00000003",
"error_msg" : "Invalid parameter"
}
Status code: 401
Authentication is not performed or fails.
{
"error_code" : "MSS.00000001",
"error_msg" : "Unauthorized"
}
Status code: 500
Internal service error.
{
"error_code" : "MSS.00000004",
"error_msg" : "Internal Error"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Succeeded. |
|
400 |
Parameters error, including the error code and its description. |
|
401 |
Authentication is not performed or fails. |
|
500 |
Internal service error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot