Updated on 2025-12-08 GMT+08:00

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}

Table 1 Path Parameters

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

Table 2 Request header 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.

Table 3 Request body parameters

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:

  • NORMAL: general live room. The room always exists and can start and stop livestreaming at any time.

  • TEMP: temporary live room. After a livestreaming task is complete, the live room is automatically cleared.

  • TEMPLATE: live room template

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:

  • LANDSCAPE: landscape

  • VERTICAL: portrait

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

Table 4 LiveVideoScriptInfo

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.

Table 5 BackgroundConfigInfo

Parameter

Mandatory

Type

Description

background_type

Yes

String

Definition

Background type.

Constraints

N/A

Range

  • IMAGE: image background, which is used as the virtual avatar video background

  • COLOR: solid color background. The RGB value of the specified color is used as the virtual avatar video background.

Default Value

N/A

background_config

No

String

Definition

Background file URL.

Constraints

  • External URLs are allowed only for livestreaming. For other services, obtain a URL from the asset library.

  • This parameter is mandatory when background_type is set to IMAGE.

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.

Table 6 BackgroundImageConfig

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

Table 7 LayerConfig

Parameter

Mandatory

Type

Description

layer_type

Yes

String

Definition

Layer type.

Constraints

N/A

Range

  • HUMAN: person layer

  • IMAGE: image layer

  • VIDEO: video layer

  • TEXT: text layer

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.

Table 8 LayerPositionConfig

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

Table 9 LayerSizeConfig

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

Table 10 LayerRotationConfig

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

Table 11 ImageLayerConfig

Parameter

Mandatory

Type

Description

image_url

No

String

Definition

Image file URL.

Constraints

  • External URLs are allowed only for livestreaming. For other services, obtain a URL from the asset library.

Range

The value contains 1 to 2,048 characters.

Default Value

N/A

Table 12 VideoLayerConfig

Parameter

Mandatory

Type

Description

video_url

No

String

Definition

Video file URL.

Constraints

  • External URLs are allowed only for livestreaming. For other services, obtain a URL from the asset library.

Range

The value contains 1 to 2,048 characters.

Default Value

N/A

video_cover_url

No

String

Definition

Video thumbnail file URL.

Constraints

  • External URLs are allowed only for livestreaming. For other services, obtain a URL from the asset library.

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:

  • 0: not played

  • -1: played cyclically

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

Table 13 TextLayerConfig

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

Table 14 LiveShootScriptItem

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

Table 15 TextConfig

Parameter

Mandatory

Type

Description

text

Yes

String

Definition

Script. Two modes are supported: plain text mode and tag mode.

  • Plain text mode, for example, "Hello, everyone, I'm a virtual streamer."

  • Tag mode: For details about the definition of SSML tags, see SSML Definition of Text Control.

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

Table 16 LiveAudioConfig

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

Table 17 RelationProductInfo

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.

Table 18 LiveRoomInteractionConfig

Parameter

Mandatory

Type

Description

play_type

No

String

Playback mode:

  • APPEND: added to the end of the playback queue in the scene

  • INSERT: inserted to the end of two audio files or a text sentence

  • PLAY_NOW: inserted immediately. After the instruction is received, the media file is played immediately without waiting till the end of the sentence.

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

Table 19 LiveRoomInteractionRuleInfo

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:

  • true: enabled

  • false: disabled

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:
  • 1, 2, 3, 4: corresponds to event.type in LiveEventReport

  • 10: matches the preset script

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

Table 20 HitCondition

Parameter

Mandatory

Type

Description

relation

No

String

Details:

Condition relationship, specifically, the logical operation relationship between multiple conditions.

Constraints:

N/A

Options:

  • AND: Multiple conditions are met.

  • OR: One of the conditions is met.

  • RESERVED: The general reply does not check other matching conditions.

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

Table 21 HitConditionTag

Parameter

Mandatory

Type

Description

tag

No

String

Details:

Key fields in the event content.

NOTE:
  • When event_type is set to 1, 2, 3, or 4, the value corresponds to the JSON field deserialized from event.content in LiveEventReport. The following is an on-screen comment event report.

  • 10: Set this field to content.

{

"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:

  • SUM: accumulation

  • AVG: average

  • COUNT: count

  • NONE: no processing

Default value:

NONE

match

No

String

Details:

Match type. You are advised to use REGEX for keyword matching.

Constraints:

N/A

Options:

  • EQUAL: completely equal

  • REGEX: regular expression match

  • MATH_GT: greater than

  • MATH_GE: greater than or equal to

  • MATH_LT: less than

  • MATH_LE: less than or equal to

  • MATH_EQ: numerically equal

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

Table 22 TriggerProcess

Parameter

Mandatory

Type

Description

time_window

No

Integer

Details:

Processing suppression duration, in second.

  • –1: triggered only once throughout the livestream

  • 0: no suppression. It is triggered each time.

  • n: triggered only once within n seconds

Constraints:

N/A

Default value:

N/A

Value range:

-1~7200

reply_mode

No

String

Definition:

Reply type.

Constraints:

N/A

Value range:

  • SYSTEM_REPLY: automatic reply based on the preset script

  • CALLBACK: callback to other services, with the preset script

  • SYSTEM_REPLY_AND_CALLBACK: automatic reply based on the preset script, and callback to the user with the preset script

  • SHOW_LAYER: display of only overlays, which does not affect the script

  • INTELLIGENT_REPLY: uses the configured large model to generate reply scripts

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:

  • RANDOM: randomly

  • ORDER: sequential loop

Default value:

N/A

reply_role

No

String

Details:

Reply role.

Constraints:

N/A

Options:

  • STREAMER: streamer

  • CO_STREAMER: co-streamer, audio-only

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.

  • APPEND: added to the end of the playback queue in the scene

  • INSERT: inserted to the end of two audio files or a text sentence

  • PLAY_NOW: inserted immediately. After the instruction is received, the media file is played immediately without waiting till the end of the sentence.

Default value:

PLAY_NOW

Table 23 SmartLayerConfig

Parameter

Mandatory

Type

Description

layer_type

Yes

String

Layer type.

  • IMAGE: image layer

  • VIDEO: video layer

  • TEXT: text layer

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.

Table 24 SmartImageLayerConfig

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

Table 25 SmartVideoLayerConfig

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

Table 26 SmartTextLayerConfig

Parameter

Mandatory

Type

Description

text_type

No

String

Details:

Text type.

  • DYNAMIC: dynamic text, which requires keyword replacement

  • STATIC: static text

Default value:

DYNAMIC

text_context

No

String

Text.

font_name

No

String

Details:

Font. The following fonts are supported:

  • HarmonyOS_Sans_SC_Black: HarmonyOS bold

  • HarmonyOS_Sans_SC_Regular: HarmonyOS normal

  • HarmonyOS_Sans_SC_Thin: HarmonyOS light

  • fzyouh: Square & lean

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

Table 27 ReplyAudioInfo

Parameter

Mandatory

Type

Description

audio_url

No

String

Audio URL.

audio_name

No

String

Audio name.

Table 28 PlayPolicy

Parameter

Mandatory

Type

Description

repeat_count

No

Integer

Details:

Number of times that a script is played repeatedly.

  • –1: The playback is repeated until it is stopped manually.

  • 0: It is played only once.

  • n: It is played n + 1 times.

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:

  • true: The script is automatically played after the task is initialized.

  • false: After the task is initialized, the script is not played until signal appears.

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:

  • NONE: Random script reading is disabled.

  • SCENE: Random script reading based on scenes is enabled. Paragraphs in a scene are read in sequence.

  • SCRIPT_ITEM: Random script reading based on paragraphs is enabled. Script of each scene is read in sequence.

  • SCENE_AND_SCRIPT_ITEM: Script of both scenes and paragraphs is read randomly.

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:

  • true: RTC users CAPTURE and PLAYER are assigned.

  • false: Only the RTC user PLAYER is assigned.

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:

  • true: taking effect in the next round

  • false: taking effect immediately

Default value:

false

Default value:

false

Table 29 LiveExitConfig

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.

  • FORCE_EXIT: force stops the livestream immediately

  • SEGMENT_END: stops the livestream when the segment ends

  • SCENE_END: stops the livestream when the scene ends

  • SCRIPT_END: stops the livestream when the script ends

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

Table 30 VideoConfig

Parameter

Mandatory

Type

Description

clip_mode

No

String

Definition

Clipping mode of the output video.

Constraints

N/A

Range

  • RESIZE: video scaling

  • CROP: video cropping

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

  • H264: H.264 encoding, MP4 file output

  • VP8: VP8 encoding, WebM file output

  • QTRLE: QTRLE encoding, MOV file output

Default Value

H264

Default value:

H264

bitrate

Yes

Integer

Definition

Average output bitrate. Unit: kbit/s

Constraints

  • Quality is prioritized for virtual avatar video production, which may exceed the preset bitrate.

  • Bitrate range for virtual avatar video production: [1000, 8000].

Default Value

N/A

Value range:

40~30000

width

Yes

Integer

Definition

Video width. Unit: pixel

Constraints

  • When clip_mode is set to RESIZE, the following resolutions are supported: 1920 x 1080, 1080 x 1920, 1280 x 720, 720 x 1280, 3840 x 2160, and 2160 x 3840. 4K is available only when the virtual avatar model supports 4K.

  • When clip_mode is set to CROP, (dx, dy) is the origin, and the width is the actual width of the reserved video.

  • Virtual avatar livestreaming and intelligent interaction support only 1080 x 1920 and 1920 x 1080.

Default Value

N/A

Value range:

0~3840

height

Yes

Integer

Definition

Video height.

Unit: pixel

Constraints

  • When clip_mode is set to RESIZE, the following resolutions are supported: 1920 x 1080, 1080 x 1920, 1280 x 720, 720 x 1280, 3840 x 2160, and 2160 x 3840.

  • When clip_mode is set to CROP, (dx, dy) is the origin, and the height is the actual height of the reserved video.

  • Virtual avatar livestreaming and intelligent interaction support only 1080 x 1920 and 1920 x 1080.

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

  • true: subtitling enabled

  • false: subtitling disabled

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

  • true: enabled

  • false: disabled

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

  • true: enabled

  • false: disabled

Default value:

false

output_external_url

No

String

External URL to which a video file is uploaded.

NOTE:
  • You can upload a video to an external URL only after being whitelisted.

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

  • true: enabled

  • false: disabled

Default value:

true

Table 31 SubtitleConfig

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

  • The subtitle box width is fixed at 80/ %of the screen width.

  • The parameter w 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

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

Table 32 LiveRoomEventCallBackConfig

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:

  • NONE: The URL contains authentication.

  • MSS_A: In HMACSHA256 signature mode, the hwSecret and hwTime parameters are added to the URL.

  • MSS_A_HEAD: In HMACSHA256 signature mode, the hwSecret and hwTime parameters are placed in Head.

  • MEITUAN_DEFAULT: This parameter is used only for Meituan's API callback.

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:

  • SHOOT_SCRIPT_SWITCH: script paragraph switching event

  • RTMP_STREAM_STATE_CHANGE: RTMP link change callback event

  • REPLY_COMMAND_FINISH: Playback is complete.

The callback event structure is defined as follows:

  • event_type: event type

  • message: event description

    • The SHOOT_SCRIPT_SWITCH event callback is defined as follows:

      {
        "event_type":  "SHOOT_SCRIPT_SWITCH",
        "message":"{\"room_id\":\"26f065244f754b3aa853b649a21aaf66\",\"job_id\":\"e87104f76d7546ce8a46ac6b04c49c3c\",\"scene_script_name\":\"Product 1\",\"shoot_script_sequence_no\":\"2\",\"shoot_script_title\":\"Paragraph 2\"}"
      }
    • The RTMP_STREAM_STATE_CHANGE callback is defined as follows:

      {
        "event_type":  "RTMP_STREAM_STATE_CHANGE",
        "message":"{\"room_id\":\"26f065244f754b3aa853b649a21aaf66\",\"job_id\":\"e87104f76d7546ce8a46ac6b04c49c3c\",\"output_url\":\"rtmp://xxx/xx/xx\",\"stream_key\":\"xxxxx\",\"state\":\"CONNECTED\"}"
      }

      The value of state can be CONNECTING, CONNECTED, DISCONNECTED, RECONNECTING, or END.

    • The REPLY_COMMAND_FINISH callback is defined as follows:

      {
        "event_type":  "REPLY_COMMAND_FINISH",
        "message":"{\"room_id\":\"26f065244f754b3aa853b649a21aaf66\",\"job_id\":\"e87104f76d7546ce8a46ac6b04c49c3c\",\"reply_id\":\"e87104f76d7546ce8a46ac6b04c49c3c"}"
      }

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

Table 33 RTCLiveEventCallBackConfig

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:

  • LIVE_PROGRESS: live script progress notification

  • REPLY_COMMAND_FINISH: Playback is complete.

The callback event structure is defined as follows:

  • message_type: message type

  • data: message description

    • The LIVE_PROGRESS event callback is defined as follows:

      {
          "message_type": "live_progress_notify",
          "data": {
              "script_name": "Scene 1",
              "shoot_script_sequence_no": 2,
              "shoot_script_title": "Greeting",
              "offset": "247",
              "reply_id": "e87104f76d7546ce8a46ac6b04c49c3c"
          }
      }
    • The REPLY_COMMAND_FINISH callback is defined as follows:

      {
        "message_type": "reply_command_finish_notify",
        "data":"{
          "reply_id":"e87104f76d7546ce8a46ac6b04c49c3c"
        }"
      }
Table 34 ReviewConfig

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.

Table 35 SharedConfig

Parameter

Mandatory

Type

Description

shared_type

No

String

Details:

Sharing type.

Constraints:

This configuration applies only to templates.

Options:

  • PRIVATE: accessible only to the current tenant

  • PUBLIC: accessible to all tenants. Currently, only system assets are accessible to all tenants.

  • SHARED: accessible to specified tenants, who are specified by the owner.

Default value:

N/A

shared_state

No

String

Details:

Sharing status.

Constraints:

This configuration applies only to templates whose shared_type is SHARED.

Options:

  • PUBLISHED: published. The template is available.

  • DRAFT: draft. The template is being edited and can be viewed only by the owner.

  • REVIEW: The template is being reviewed. The template cannot be edited and can be viewed only by the owner/reviewer.

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

Table 36 CoStreamerConfig

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:

  • SILENCE: silent

  • VOLUME_DOWN: decreased volume

Default value:

N/A

Table 37 VoiceConfig

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

Table 38 PlatformLiveInfo

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

Table 39 Response header parameters

Parameter

Type

Description

X-Request-Id

String

Request ID.

Table 40 Response body parameters

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:

  • NORMAL: general live room. The room always exists and can start and stop livestreaming at any time.

  • TEMP: temporary live room. After a livestreaming task is complete, the live room is automatically cleared.

  • TEMPLATE: live room template

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:

  • LANDSCAPE: landscape

  • VERTICAL: portrait

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.

  • ENABLE: The live room is available.

  • DISABLE: The live room is unavailable. The cause is described in error_info.

  • BLOCKED: The live room has been blocked. The cause is described in error_info.

confirm_state

String

Confirms the live room status. This status is used only when manual confirmation is required for specific users.

  • UNCONFIRM: unconfirmed

  • CONFIRMED: confirmed

  • REJECT: rejected

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.

Table 41 LiveVideoScriptInfo

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.

Table 42 BackgroundConfigInfo

Parameter

Type

Description

background_type

String

Definition

Background type.

Constraints

N/A

Range

  • IMAGE: image background, which is used as the virtual avatar video background

  • COLOR: solid color background. The RGB value of the specified color is used as the virtual avatar video background.

Default Value

N/A

background_config

String

Definition

Background file URL.

Constraints

  • External URLs are allowed only for livestreaming. For other services, obtain a URL from the asset library.

  • This parameter is mandatory when background_type is set to IMAGE.

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.

Table 43 BackgroundImageConfig

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

Table 44 LayerConfig

Parameter

Type

Description

layer_type

String

Definition

Layer type.

Constraints

N/A

Range

  • HUMAN: person layer

  • IMAGE: image layer

  • VIDEO: video layer

  • TEXT: text layer

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.

Table 45 LayerPositionConfig

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

Table 46 LayerSizeConfig

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

Table 47 LayerRotationConfig

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

Table 48 ImageLayerConfig

Parameter

Type

Description

image_url

String

Definition

Image file URL.

Constraints

  • External URLs are allowed only for livestreaming. For other services, obtain a URL from the asset library.

Range

The value contains 1 to 2,048 characters.

Default Value

N/A

Table 49 VideoLayerConfig

Parameter

Type

Description

video_url

String

Definition

Video file URL.

Constraints

  • External URLs are allowed only for livestreaming. For other services, obtain a URL from the asset library.

Range

The value contains 1 to 2,048 characters.

Default Value

N/A

video_cover_url

String

Definition

Video thumbnail file URL.

Constraints

  • External URLs are allowed only for livestreaming. For other services, obtain a URL from the asset library.

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:

  • 0: not played

  • -1: played cyclically

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

Table 50 TextLayerConfig

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

Table 51 LiveShootScriptItem

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

Table 52 TextConfig

Parameter

Type

Description

text

String

Definition

Script. Two modes are supported: plain text mode and tag mode.

  • Plain text mode, for example, "Hello, everyone, I'm a virtual streamer."

  • Tag mode: For details about the definition of SSML tags, see SSML Definition of Text Control.

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

Table 53 LiveAudioConfig

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

Table 54 RelationProductInfo

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.

Table 55 LiveRoomInteractionConfig

Parameter

Type

Description

play_type

String

Playback mode:

  • APPEND: added to the end of the playback queue in the scene

  • INSERT: inserted to the end of two audio files or a text sentence

  • PLAY_NOW: inserted immediately. After the instruction is received, the media file is played immediately without waiting till the end of the sentence.

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

Table 56 LiveRoomInteractionRuleInfo

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:

  • true: enabled

  • false: disabled

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:
  • 1, 2, 3, 4: corresponds to event.type in LiveEventReport

  • 10: matches the preset script

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

Table 57 HitCondition

Parameter

Type

Description

relation

String

Details:

Condition relationship, specifically, the logical operation relationship between multiple conditions.

Constraints:

N/A

Options:

  • AND: Multiple conditions are met.

  • OR: One of the conditions is met.

  • RESERVED: The general reply does not check other matching conditions.

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

Table 58 HitConditionTag

Parameter

Type

Description

tag

String

Details:

Key fields in the event content.

NOTE:
  • When event_type is set to 1, 2, 3, or 4, the value corresponds to the JSON field deserialized from event.content in LiveEventReport. The following is an on-screen comment event report.

  • 10: Set this field to content.

{

"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:

  • SUM: accumulation

  • AVG: average

  • COUNT: count

  • NONE: no processing

Default value:

NONE

match

String

Details:

Match type. You are advised to use REGEX for keyword matching.

Constraints:

N/A

Options:

  • EQUAL: completely equal

  • REGEX: regular expression match

  • MATH_GT: greater than

  • MATH_GE: greater than or equal to

  • MATH_LT: less than

  • MATH_LE: less than or equal to

  • MATH_EQ: numerically equal

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

Table 59 TriggerProcess

Parameter

Type

Description

time_window

Integer

Details:

Processing suppression duration, in second.

  • –1: triggered only once throughout the livestream

  • 0: no suppression. It is triggered each time.

  • n: triggered only once within n seconds

Constraints:

N/A

Default value:

N/A

Value range:

-1~7200

reply_mode

String

Definition:

Reply type.

Constraints:

N/A

Value range:

  • SYSTEM_REPLY: automatic reply based on the preset script

  • CALLBACK: callback to other services, with the preset script

  • SYSTEM_REPLY_AND_CALLBACK: automatic reply based on the preset script, and callback to the user with the preset script

  • SHOW_LAYER: display of only overlays, which does not affect the script

  • INTELLIGENT_REPLY: uses the configured large model to generate reply scripts

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:

  • RANDOM: randomly

  • ORDER: sequential loop

Default value:

N/A

reply_role

String

Details:

Reply role.

Constraints:

N/A

Options:

  • STREAMER: streamer

  • CO_STREAMER: co-streamer, audio-only

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.

  • APPEND: added to the end of the playback queue in the scene

  • INSERT: inserted to the end of two audio files or a text sentence

  • PLAY_NOW: inserted immediately. After the instruction is received, the media file is played immediately without waiting till the end of the sentence.

Default value:

PLAY_NOW

Table 60 SmartLayerConfig

Parameter

Type

Description

layer_type

String

Layer type.

  • IMAGE: image layer

  • VIDEO: video layer

  • TEXT: text layer

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.

Table 61 SmartImageLayerConfig

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

Table 62 SmartVideoLayerConfig

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

Table 63 SmartTextLayerConfig

Parameter

Type

Description

text_type

String

Details:

Text type.

  • DYNAMIC: dynamic text, which requires keyword replacement

  • STATIC: static text

Default value:

DYNAMIC

text_context

String

Text.

font_name

String

Details:

Font. The following fonts are supported:

  • HarmonyOS_Sans_SC_Black: HarmonyOS bold

  • HarmonyOS_Sans_SC_Regular: HarmonyOS normal

  • HarmonyOS_Sans_SC_Thin: HarmonyOS light

  • fzyouh: Square & lean

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

Table 64 ReplyAudioInfo

Parameter

Type

Description

audio_url

String

Audio URL.

audio_name

String

Audio name.

Table 65 PlayPolicy

Parameter

Type

Description

repeat_count

Integer

Details:

Number of times that a script is played repeatedly.

  • –1: The playback is repeated until it is stopped manually.

  • 0: It is played only once.

  • n: It is played n + 1 times.

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:

  • true: The script is automatically played after the task is initialized.

  • false: After the task is initialized, the script is not played until signal appears.

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:

  • NONE: Random script reading is disabled.

  • SCENE: Random script reading based on scenes is enabled. Paragraphs in a scene are read in sequence.

  • SCRIPT_ITEM: Random script reading based on paragraphs is enabled. Script of each scene is read in sequence.

  • SCENE_AND_SCRIPT_ITEM: Script of both scenes and paragraphs is read randomly.

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:

  • true: RTC users CAPTURE and PLAYER are assigned.

  • false: Only the RTC user PLAYER is assigned.

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:

  • true: taking effect in the next round

  • false: taking effect immediately

Default value:

false

Default value:

false

Table 66 LiveExitConfig

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.

  • FORCE_EXIT: force stops the livestream immediately

  • SEGMENT_END: stops the livestream when the segment ends

  • SCENE_END: stops the livestream when the scene ends

  • SCRIPT_END: stops the livestream when the script ends

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

Table 67 VideoConfig

Parameter

Type

Description

clip_mode

String

Definition

Clipping mode of the output video.

Constraints

N/A

Range

  • RESIZE: video scaling

  • CROP: video cropping

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

  • H264: H.264 encoding, MP4 file output

  • VP8: VP8 encoding, WebM file output

  • QTRLE: QTRLE encoding, MOV file output

Default Value

H264

Default value:

H264

bitrate

Integer

Definition

Average output bitrate. Unit: kbit/s

Constraints

  • Quality is prioritized for virtual avatar video production, which may exceed the preset bitrate.

  • Bitrate range for virtual avatar video production: [1000, 8000].

Default Value

N/A

Value range:

40~30000

width

Integer

Definition

Video width. Unit: pixel

Constraints

  • When clip_mode is set to RESIZE, the following resolutions are supported: 1920 x 1080, 1080 x 1920, 1280 x 720, 720 x 1280, 3840 x 2160, and 2160 x 3840. 4K is available only when the virtual avatar model supports 4K.

  • When clip_mode is set to CROP, (dx, dy) is the origin, and the width is the actual width of the reserved video.

  • Virtual avatar livestreaming and intelligent interaction support only 1080 x 1920 and 1920 x 1080.

Default Value

N/A

Value range:

0~3840

height

Integer

Definition

Video height.

Unit: pixel

Constraints

  • When clip_mode is set to RESIZE, the following resolutions are supported: 1920 x 1080, 1080 x 1920, 1280 x 720, 720 x 1280, 3840 x 2160, and 2160 x 3840.

  • When clip_mode is set to CROP, (dx, dy) is the origin, and the height is the actual height of the reserved video.

  • Virtual avatar livestreaming and intelligent interaction support only 1080 x 1920 and 1920 x 1080.

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

  • true: subtitling enabled

  • false: subtitling disabled

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

  • true: enabled

  • false: disabled

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

  • true: enabled

  • false: disabled

Default value:

false

output_external_url

String

External URL to which a video file is uploaded.

NOTE:
  • You can upload a video to an external URL only after being whitelisted.

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

  • true: enabled

  • false: disabled

Default value:

true

Table 68 SubtitleConfig

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

  • The subtitle box width is fixed at 80/ %of the screen width.

  • The parameter w 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

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

Table 69 LiveRoomEventCallBackConfig

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:

  • NONE: The URL contains authentication.

  • MSS_A: In HMACSHA256 signature mode, the hwSecret and hwTime parameters are added to the URL.

  • MSS_A_HEAD: In HMACSHA256 signature mode, the hwSecret and hwTime parameters are placed in Head.

  • MEITUAN_DEFAULT: This parameter is used only for Meituan's API callback.

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:

  • SHOOT_SCRIPT_SWITCH: script paragraph switching event

  • RTMP_STREAM_STATE_CHANGE: RTMP link change callback event

  • REPLY_COMMAND_FINISH: Playback is complete.

The callback event structure is defined as follows:

  • event_type: event type

  • message: event description

    • The SHOOT_SCRIPT_SWITCH event callback is defined as follows:

      {
        "event_type":  "SHOOT_SCRIPT_SWITCH",
        "message":"{\"room_id\":\"26f065244f754b3aa853b649a21aaf66\",\"job_id\":\"e87104f76d7546ce8a46ac6b04c49c3c\",\"scene_script_name\":\"Product 1\",\"shoot_script_sequence_no\":\"2\",\"shoot_script_title\":\"Paragraph 2\"}"
      }
    • The RTMP_STREAM_STATE_CHANGE callback is defined as follows:

      {
        "event_type":  "RTMP_STREAM_STATE_CHANGE",
        "message":"{\"room_id\":\"26f065244f754b3aa853b649a21aaf66\",\"job_id\":\"e87104f76d7546ce8a46ac6b04c49c3c\",\"output_url\":\"rtmp://xxx/xx/xx\",\"stream_key\":\"xxxxx\",\"state\":\"CONNECTED\"}"
      }

      The value of state can be CONNECTING, CONNECTED, DISCONNECTED, RECONNECTING, or END.

    • The REPLY_COMMAND_FINISH callback is defined as follows:

      {
        "event_type":  "REPLY_COMMAND_FINISH",
        "message":"{\"room_id\":\"26f065244f754b3aa853b649a21aaf66\",\"job_id\":\"e87104f76d7546ce8a46ac6b04c49c3c\",\"reply_id\":\"e87104f76d7546ce8a46ac6b04c49c3c"}"
      }

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

Table 70 RTCLiveEventCallBackConfig

Parameter

Type

Description

rtc_callback_event_type

Array of strings

Live event types in RTC callbacks.

Currently, only the following options are supported:

  • LIVE_PROGRESS: live script progress notification

  • REPLY_COMMAND_FINISH: Playback is complete.

The callback event structure is defined as follows:

  • message_type: message type

  • data: message description

    • The LIVE_PROGRESS event callback is defined as follows:

      {
          "message_type": "live_progress_notify",
          "data": {
              "script_name": "Scene 1",
              "shoot_script_sequence_no": 2,
              "shoot_script_title": "Greeting",
              "offset": "247",
              "reply_id": "e87104f76d7546ce8a46ac6b04c49c3c"
          }
      }
    • The REPLY_COMMAND_FINISH callback is defined as follows:

      {
        "message_type": "reply_command_finish_notify",
        "data":"{
          "reply_id":"e87104f76d7546ce8a46ac6b04c49c3c"
        }"
      }
Table 71 ReviewConfig

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.

Table 72 SharedConfig

Parameter

Type

Description

shared_type

String

Details:

Sharing type.

Constraints:

This configuration applies only to templates.

Options:

  • PRIVATE: accessible only to the current tenant

  • PUBLIC: accessible to all tenants. Currently, only system assets are accessible to all tenants.

  • SHARED: accessible to specified tenants, who are specified by the owner.

Default value:

N/A

shared_state

String

Details:

Sharing status.

Constraints:

This configuration applies only to templates whose shared_type is SHARED.

Options:

  • PUBLISHED: published. The template is available.

  • DRAFT: draft. The template is being edited and can be viewed only by the owner.

  • REVIEW: The template is being reviewed. The template cannot be edited and can be viewed only by the owner/reviewer.

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

Table 73 CoStreamerConfig

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:

  • SILENCE: silent

  • VOLUME_DOWN: decreased volume

Default value:

N/A

Table 74 VoiceConfig

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

Table 75 PlatformLiveDetailInfo

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.

Table 76 ErrorResponse

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 400

Table 77 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 401

Table 78 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 500

Table 79 Response body parameters

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.