Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
Software Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Updating Intelligent Livestreaming Room Information

Function

Updates intelligent livestreaming room information.

Calling Method

For details, see Calling APIs.

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

Script 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

Details:

Name of a live broadcast room.

Constraints:

N/A

Options:

The value contains 1 to 256 characters.

Default value:

N/A

room_description

No

String

Details:

Description of the live broadcast room.

Constraints:

N/A

Options:

The value contains 1 to 1024 characters.

Default value:

N/A

room_type

No

String

Details:

Type of a live broadcast room.

Constraints:

N/A

Options:

  • NORMAL: common live broadcast room. The live broadcast room always exists and can be started repeatedly.
  • TEMP: temporary live broadcast room. After a live broadcast task is complete, the live broadcast room is automatically cleared.
  • TEMPLATE: template for a live broadcast room.

Default value:

NORMAL

scene_scripts

No

Array of LiveVideoScriptInfo objects

Default live TV script list.

interaction_config

No

LiveRoomInteractionConfig object

Interactive Configuration

interaction_rules

No

Array of LiveRoomInteractionRuleInfo objects

Interaction rule list

play_policy

No

PlayPolicy object

Script Playing Strategy

video_config

No

VideoConfig object

Video output configuration.

output_urls

No

Array of strings

Details:

URL of the third-party live broadcast platform for RTMP video streaming.

NOTE:

To update the URL during live broadcast, invoke the COMMAND command Refresh_OUTPUT_URL.

Constraints:

N/A

Options:

Currently, only one RTMP stream output address is supported.

Default value:

N/A

stream_keys

No

Array of strings

Details:

Stream key of the third-party live TV platform for pushing RTMP videos, which corresponds to the stream pushing address.

NOTE:

To update the URL during live broadcast, invoke the COMMAND command Refresh_OUTPUT_URL.

Constraints:

N/A

Options:

Currently, only one RTMP stream output address is supported.

Default value:

N/A

backup_model_asset_ids

No

Array of strings

Details:

Asset ID of the alternate anchor digital person during anchor rotation (only image assets, excluding sound assets).

Constraints:

N/A

Options:

Currently, a maximum of five alternative anchors are supported.

Asset ID of a digital person. The value contains 0 to 64 characters.

Default value:

N/A

live_event_callback_config

No

LiveEventCallBackConfig object

Live event HTTPS callback notification configuration

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 Moderation Configuration

shared_config

No

SharedConfig object

Shared Configuration

view_mode

No

String

Details:

Landscape/portrait screen type.

Constraints:

You do not need to set this parameter. The value is determined based on the resolution in video_config.

Options:

  • LANDSCAPE
  • VERTICAL

Default value:

VERTICAL

co_streamer_config

No

CoStreamerConfig object

Co-streamer configuration

priv_data

No

String

Details:

Private data of the matching value, which is entered by the user and returned as it is.

Constraints:

N/A

Options:

Character length: 0-8192

Default value:

N/A

relation_live_platform_info

No

PlatformLiveInfo object

Platform live broadcast 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

Details:

Background type.

Constraints:

N/A

Options:

  • 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_title

No

String

Background title.

NOTE:
  • This parameter does not take effect for virtual avatar video production.

human_position_2d

No

HumanPosition2D object

Position of a virtual avatar in the background image. If this parameter is not set, the virtual avatar is in the middle of the image by default.

NOTE:
  • This parameter is discarded. The position of a virtual avatar in the background image is configured in the layer_config parameter.

human_size_2d

No

HumanSize2D object

Size of a virtual avatar in the background image.

NOTE:
  • This parameter is discarded. The size of a virtual avatar in the background image is configured in the layer_config parameter.

background_cover_url

No

String

URL for downloading the thumbnail image of a video file.

This parameter is valid only when the presentation material is a video.

NOTE:
  • This parameter does not take effect for virtual avatar video production.

background_config

No

String

Details:

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.

Options:

The value contains 1 to 2,048 characters.

Default value:

N/A

background_color_config

No

String

Details:

RGB color value of a solid color background.

Constraints:

This parameter is mandatory when background_type is set to COLOR.

Options:

The value contains 0 to 16 characters.

Default value:

#FFFFFF

background_asset_id

No

String

Details:

Background asset ID.

NOTE:

If a background image is used, enter the image asset ID.

Constraints:

N/A

Options:

The value contains 0 to 64 characters.

Default value:

N/A

Table 6 HumanPosition2D

Parameter

Mandatory

Type

Description

position

No

String

Position of a virtual avatar in the background image.

  • LEFT: left
  • MIDDLE: middle
  • RIGHT: right
NOTE:

If the values of position_x and position_y exist, position does not take effect.

Default value:

MIDDLE

position_x

No

Integer

X-axis position of the virtual avatar, that is, the X-axis pixel value of the center point at the bottom of the virtual avatar image.

The resolution of the landscape (16:9) background image is 1920 x 1080 pixels. The resolution of the portrait (9:16) background image is 1080 x 1920 pixels.

Value range:

-1920-3840

position_y

No

Integer

Y-axis position of the virtual avatar, that is, the Y-axis pixel value of the center point at the bottom of the virtual avatar image.

The resolution of the landscape (16:9) background image is 1920 x 1080 pixels. The resolution of the portrait (9:16) background image is 1080 x 1920 pixels.

Value range:

-1920-3840

Table 7 HumanSize2D

Parameter

Mandatory

Type

Description

width

No

Integer

Width (in pixel) of a virtual avatar.

The resolution of the landscape (16:9) background image is 1920 x 1080 pixels. The resolution of the portrait (9:16) background image is 1080 x 1920 pixels.

Value range:

1-7680

height

No

Integer

Height (in pixel) of a virtual avatar.

The resolution of the landscape (16:9) background image is 1920 x 1080 pixels. The resolution of the portrait (9:16) background image is 1080 x 1920 pixels.

Value range:

1-7680

Table 8 LayerConfig

Parameter

Mandatory

Type

Description

layer_type

Yes

String

Details:

Layer type.

Constraints:

N/A

Options:

  • HUMAN: person layer
  • IMAGE: image layer
  • VIDEO: video layer
  • TEXT: text layer

Default value:

N/A

asset_id

No

String

Details:

ID of the asset overlaid on a video. You do not need to set this parameter for external assets.

Constraints:

N/A

Options:

The value contains 0 to 64 characters.

Default value:

N/A

group_id

No

String

Details:

Groups materials in multiple scenes. Materials with the same group_id share location information when they are applied globally.

Constraints:

N/A

Options:

The value contains 0 to 64 characters.

Default value:

N/A

position

No

LayerPositionConfig object

Layer position configuration.

size

No

LayerSizeConfig object

Layer size configuration.

image_config

No

ImageLayerConfig object

Material image layer configuration.

video_config

No

VideoLayerConfig object

Material video layer configuration.

text_config

No

TextLayerConfig object

Material text layer configuration.

Table 9 LayerPositionConfig

Parameter

Mandatory

Type

Description

dx

Yes

Integer

Details:

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 image layout 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

Details:

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 image layout 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

Details:

Layer sequence of an image, video, or person image.

NOTE:

The layer sequence is an integer starting from 1 and incremented by 1.

Constraints:

If duplicate layers exist, the overlay relationship between the duplicate layers is random.

Value range:

1-100

Default value:

100

Table 10 LayerSizeConfig

Parameter

Mandatory

Type

Description

width

No

Integer

Details:

Y axis position of the pixel in the upper left corner of the image. Width (in pixel) of the layer image (relative to the image layout size).

The image layout 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

Details:

Height (in pixel) of the layer image (relative to the image layout size).

The image layout 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 11 ImageLayerConfig

Parameter

Mandatory

Type

Description

image_url

No

String

Details:

Image file URL.

Constraints:

N/A

Options:

The value contains 1 to 2,048 characters.

Default value:

N/A

Table 12 VideoLayerConfig

Parameter

Mandatory

Type

Description

video_url

No

String

Details:

Video file URL.

Constraints:

N/A

Options:

The value contains 1 to 2,048 characters.

Default value:

N/A

video_cover_url

No

String

Details:

Video thumbnail file URL.

Constraints:

N/A

Options:

The value contains 1 to 2,048 characters.

Default value:

N/A

loop_count

No

Integer

Details:

Number of times that a video is played cyclically.

Options:

  • 0: no
  • -1: yes

Constraints:

N/A

Value range:

-1-100

Default value:

-1

Table 13 TextLayerConfig

Parameter

Mandatory

Type

Description

text_context

No

String

Details:

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

Options:

The value contains 0 to 1,024 characters.

Default value:

N/A

font_name

No

String

Details:

Font. The following fonts are supported:

Constraints:

N/A

Options:

For details about the supported fonts, see Supported Fonts.

Default value:

HarmonyOS_Sans_SC_Black

font_size

No

Integer

Details:

Font size (in pixel). 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

Details:

Font color. RGB color value.

Constraints:

N/A

Options:

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 Offering

Table 15 TextConfig

Parameter

Mandatory

Type

Description

text

Yes

String

Details:

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.

Options:

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 offering ID. If this parameter is set, this information is carried in the paragraph switchback callback. GoodsId corresponding to the US Regiment platform

product_title

No

String

Associated product title/name. If this parameter is set, this information is carried in the paragraph switchback callback. US Regiment Platform Corresponding 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.

    {

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

  • 10: Set this field to content.

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

Details:

Reply type.

Constraints:

N/A

Options:

  • SYSTEM_REPLY: automatic reply based on the preset script
  • CALLBACK: callback to other services, with the preset script
  • SHOW_LAYER: display of only overlaid layers, which does not affect the script
  • INTELLIGENT_REPLY: use 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.

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

Details:

Whether an independent data collection device is required. This parameter is used when the client playback is separated from the command.

Constraints:

N/A

Options:

  • true: Devices are allocated to RTC users CAPTURE and PLAYER.
  • false: Devices are allocated only to the RTC user PLAYER.

Default value:

false

Table 29 VideoConfig

Parameter

Mandatory

Type

Description

clip_mode

No

String

Details:

Clipping mode of the output video.

Constraints:

N/A

Options:

  • RESIZE: video scaling
  • CROP: video cropping

Default value:

RESIZE

codec

Yes

String

Details:

Video encoding format and video file format.

Constraints:

Only virtual avatar video production supports VP8 encoding.

Options:

  • H264: H.264 encoding, MP4 file output
  • VP8: VP8 encoding, WebM file output

Default value:

N/A

bitrate

Yes

Integer

Details:

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

Details:

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.
  • Currently, only 1080 x 1920 and 1920 x 1080 are supported for virtual avatar livestreaming.

Default value:

N/A

Value range:

0-3840

height

Yes

Integer

Details:

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.
  • Currently, only 1080 x 1920 and 1920 x 1080 are supported for virtual avatar livestreaming.

Default value:

N/A

Value range:

0-3840

frame_rate

No

String

Details:

Frame rate. Unit: FPS

Constraints:

The virtual avatar video frame rate is fixed at 25 FPS.

Default value:

25

is_subtitle_enable

No

Boolean

Details:

Whether the output video is subtitled.

Constraints:

Subtitles are not supported for virtual avatar livestreaming.

Options:

  • true: enable subtitling
  • false: disable subtitling

Default value:

false

subtitle_config

No

SubtitleConfig object

Subtitle configuration.

disable_system_watermark

No

Boolean

Details:

Indicates whether the system watermark is disabled for the output video.

Constraints:

Currently, this parameter takes effect only for trustlisted tenants.

Value range:

  • true
  • false

Default value:

false

dx

No

Integer

Details:

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

Details:

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

Details:

Whether super resolution is enabled for a video.

Constraints:

This parameter is available only for virtual avatar video production.

Options:

  • true: enable
  • false: do not enable

Default value:

false

Table 30 SubtitleConfig

Parameter

Mandatory

Type

Description

dx

No

Integer

Details:

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

Details:

Coordinates of the pixel in the lower left corner of the subtitle box.

Constraints:

N/A

Default value:

N/A

Value range:

0-1920

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

Constraints:

N/A

Options:

The value contains 0 to 64 characters.

Default value:

HarmonyOS_Sans_SC_Black

font_size

No

Integer

Details:

Font size. 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:

54

h

No

Integer

Details:

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

Details:

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

Table 31 LiveEventCallBackConfig

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.

    Value format: hwSecret=hmac_sha256(Key, URI (live_event_callback_url) + hwTime)&hwTime=hex(timestamp)

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

    Value format: x-hw-mss-secret=hmac_sha256(Key, URI (live_event_callback_url) + hwTime)

    x-hw-mss-time=hex(timestamp)

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

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"}"
      }
Table 32 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 33 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 34 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 35 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 36 VoiceConfig

Parameter

Mandatory

Type

Description

voice_asset_id

Yes

String

Details:

Timbre asset ID, which can be queried from the asset library.

Constraints:

N/A

Options:

The value contains 1 to 256 characters.

Default value:

N/A

speed

No

Integer

Details:

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 150 words per minute.

Constraints:

N/A

Value range:

50-200

Default value:

100

pitch

No

Integer

Details:

Pitch.

Constraints:

N/A

Value range:

50-200

Default value:

100

volume

No

Integer

Details:

Volume.

Constraints:

N/A

Value range:

90-240

Default value:

140

Table 37 PlatformLiveInfo

Parameter

Mandatory

Type

Description

platform_id

Yes

String

Live TV platform ID.

live_id

Yes

String

Live TV channel ID. If this parameter is set, the live TV channel ID is carried in the segment switchback callback. The value can contain only letters, digits, hyphens (-), and underscores (_).

LiveId corresponding to the Meituan.

Response Parameters

Status code: 200

Table 38 Response header parameters

Parameter

Type

Description

X-Request-Id

String

Request ID.

Table 39 Response body parameters

Parameter

Type

Description

room_name

String

Details:

Name of a live broadcast room.

Constraints:

N/A

Options:

The value contains 1 to 256 characters.

Default value:

N/A

room_description

String

Details:

Description of the live broadcast room.

Constraints:

N/A

Options:

The value contains 1 to 1024 characters.

Default value:

N/A

room_type

String

Details:

Type of a live broadcast room.

Constraints:

N/A

Options:

  • NORMAL: common live broadcast room. The live broadcast room always exists and can be started repeatedly.
  • TEMP: temporary live broadcast room. After a live broadcast task is complete, the live broadcast room is automatically cleared.
  • TEMPLATE: template for a live broadcast room.

Default value:

NORMAL

scene_scripts

Array of LiveVideoScriptInfo objects

Default live TV script list.

interaction_config

LiveRoomInteractionConfig object

Interactive Configuration

interaction_rules

Array of LiveRoomInteractionRuleInfo objects

Interaction rule list

play_policy

PlayPolicy object

Script Playing Strategy

video_config

VideoConfig object

Video output configuration.

output_urls

Array of strings

Details:

URL of the third-party live broadcast platform for RTMP video streaming.

NOTE:

To update the URL during live broadcast, invoke the COMMAND command Refresh_OUTPUT_URL.

Constraints:

N/A

Options:

Currently, only one RTMP stream output address is supported.

Default value:

N/A

stream_keys

Array of strings

Details:

Stream key of the third-party live TV platform for pushing RTMP videos, which corresponds to the stream pushing address.

NOTE:

To update the URL during live broadcast, invoke the COMMAND command Refresh_OUTPUT_URL.

Constraints:

N/A

Options:

Currently, only one RTMP stream output address is supported.

Default value:

N/A

backup_model_asset_ids

Array of strings

Details:

Asset ID of the alternate anchor digital person during anchor rotation (only image assets, excluding sound assets).

Constraints:

N/A

Options:

Currently, a maximum of five alternative anchors are supported.

Asset ID of a digital person. The value contains 0 to 64 characters.

Default value:

N/A

live_event_callback_config

LiveEventCallBackConfig object

Live event HTTPS callback notification configuration

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 Moderation Configuration

shared_config

SharedConfig object

Shared Configuration

view_mode

String

Details:

Landscape/portrait screen type.

Constraints:

You do not need to set this parameter. The value is determined based on the resolution in video_config.

Options:

  • LANDSCAPE
  • VERTICAL

Default value:

VERTICAL

co_streamer_config

CoStreamerConfig object

Co-streamer configuration

priv_data

String

Details:

Private data of the matching value, which is entered by the user and returned as it is.

Constraints:

N/A

Options:

Character length: 0-8192

Default value:

N/A

room_id

String

Livestreaming room ID.

relation_live_platform_info

PlatformLiveDetailInfo object

Platform live broadcast 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.

error_info

ErrorResponse object

Error messages of a virtual human live room.

Table 40 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 41 BackgroundConfigInfo

Parameter

Type

Description

background_type

String

Details:

Background type.

Constraints:

N/A

Options:

  • 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_title

String

Background title.

NOTE:
  • This parameter does not take effect for virtual avatar video production.

human_position_2d

HumanPosition2D object

Position of a virtual avatar in the background image. If this parameter is not set, the virtual avatar is in the middle of the image by default.

NOTE:
  • This parameter is discarded. The position of a virtual avatar in the background image is configured in the layer_config parameter.

human_size_2d

HumanSize2D object

Size of a virtual avatar in the background image.

NOTE:
  • This parameter is discarded. The size of a virtual avatar in the background image is configured in the layer_config parameter.

background_cover_url

String

URL for downloading the thumbnail image of a video file.

This parameter is valid only when the presentation material is a video.

NOTE:
  • This parameter does not take effect for virtual avatar video production.

background_config

String

Details:

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.

Options:

The value contains 1 to 2,048 characters.

Default value:

N/A

background_color_config

String

Details:

RGB color value of a solid color background.

Constraints:

This parameter is mandatory when background_type is set to COLOR.

Options:

The value contains 0 to 16 characters.

Default value:

#FFFFFF

background_asset_id

String

Details:

Background asset ID.

NOTE:

If a background image is used, enter the image asset ID.

Constraints:

N/A

Options:

The value contains 0 to 64 characters.

Default value:

N/A

Table 42 HumanPosition2D

Parameter

Type

Description

position

String

Position of a virtual avatar in the background image.

  • LEFT: left
  • MIDDLE: middle
  • RIGHT: right
NOTE:

If the values of position_x and position_y exist, position does not take effect.

Default value:

MIDDLE

position_x

Integer

X-axis position of the virtual avatar, that is, the X-axis pixel value of the center point at the bottom of the virtual avatar image.

The resolution of the landscape (16:9) background image is 1920 x 1080 pixels. The resolution of the portrait (9:16) background image is 1080 x 1920 pixels.

Value range:

-1920-3840

position_y

Integer

Y-axis position of the virtual avatar, that is, the Y-axis pixel value of the center point at the bottom of the virtual avatar image.

The resolution of the landscape (16:9) background image is 1920 x 1080 pixels. The resolution of the portrait (9:16) background image is 1080 x 1920 pixels.

Value range:

-1920-3840

Table 43 HumanSize2D

Parameter

Type

Description

width

Integer

Width (in pixel) of a virtual avatar.

The resolution of the landscape (16:9) background image is 1920 x 1080 pixels. The resolution of the portrait (9:16) background image is 1080 x 1920 pixels.

Value range:

1-7680

height

Integer

Height (in pixel) of a virtual avatar.

The resolution of the landscape (16:9) background image is 1920 x 1080 pixels. The resolution of the portrait (9:16) background image is 1080 x 1920 pixels.

Value range:

1-7680

Table 44 LayerConfig

Parameter

Type

Description

layer_type

String

Details:

Layer type.

Constraints:

N/A

Options:

  • HUMAN: person layer
  • IMAGE: image layer
  • VIDEO: video layer
  • TEXT: text layer

Default value:

N/A

asset_id

String

Details:

ID of the asset overlaid on a video. You do not need to set this parameter for external assets.

Constraints:

N/A

Options:

The value contains 0 to 64 characters.

Default value:

N/A

group_id

String

Details:

Groups materials in multiple scenes. Materials with the same group_id share location information when they are applied globally.

Constraints:

N/A

Options:

The value contains 0 to 64 characters.

Default value:

N/A

position

LayerPositionConfig object

Layer position configuration.

size

LayerSizeConfig object

Layer size configuration.

image_config

ImageLayerConfig object

Material image layer configuration.

video_config

VideoLayerConfig object

Material video layer configuration.

text_config

TextLayerConfig object

Material text layer configuration.

Table 45 LayerPositionConfig

Parameter

Type

Description

dx

Integer

Details:

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 image layout 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

Details:

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 image layout 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

Details:

Layer sequence of an image, video, or person image.

NOTE:

The layer sequence is an integer starting from 1 and incremented by 1.

Constraints:

If duplicate layers exist, the overlay relationship between the duplicate layers is random.

Value range:

1-100

Default value:

100

Table 46 LayerSizeConfig

Parameter

Type

Description

width

Integer

Details:

Y axis position of the pixel in the upper left corner of the image. Width (in pixel) of the layer image (relative to the image layout size).

The image layout 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

Details:

Height (in pixel) of the layer image (relative to the image layout size).

The image layout 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 ImageLayerConfig

Parameter

Type

Description

image_url

String

Details:

Image file URL.

Constraints:

N/A

Options:

The value contains 1 to 2,048 characters.

Default value:

N/A

Table 48 VideoLayerConfig

Parameter

Type

Description

video_url

String

Details:

Video file URL.

Constraints:

N/A

Options:

The value contains 1 to 2,048 characters.

Default value:

N/A

video_cover_url

String

Details:

Video thumbnail file URL.

Constraints:

N/A

Options:

The value contains 1 to 2,048 characters.

Default value:

N/A

loop_count

Integer

Details:

Number of times that a video is played cyclically.

Options:

  • 0: no
  • -1: yes

Constraints:

N/A

Value range:

-1-100

Default value:

-1

Table 49 TextLayerConfig

Parameter

Type

Description

text_context

String

Details:

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

Options:

The value contains 0 to 1,024 characters.

Default value:

N/A

font_name

String

Details:

Font. The following fonts are supported:

Constraints:

N/A

Options:

For details about the supported fonts, see Supported Fonts.

Default value:

HarmonyOS_Sans_SC_Black

font_size

Integer

Details:

Font size (in pixel). 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

Details:

Font color. RGB color value.

Constraints:

N/A

Options:

The value contains 0 to 16 characters.

Default value:

#FFFFFF

Table 50 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 Offering

Table 51 TextConfig

Parameter

Type

Description

text

String

Details:

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.

Options:

The value contains 0 to 131,072 characters.

Default value:

N/A

Table 52 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 53 RelationProductInfo

Parameter

Type

Description

product_id

String

Associated offering ID. If this parameter is set, this information is carried in the paragraph switchback callback. GoodsId corresponding to the US Regiment platform

product_title

String

Associated product title/name. If this parameter is set, this information is carried in the paragraph switchback callback. US Regiment Platform Corresponding to GoodsTitle

Table 54 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 55 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 56 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 57 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.

    {

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

  • 10: Set this field to content.

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 58 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

Details:

Reply type.

Constraints:

N/A

Options:

  • SYSTEM_REPLY: automatic reply based on the preset script
  • CALLBACK: callback to other services, with the preset script
  • SHOW_LAYER: display of only overlaid layers, which does not affect the script
  • INTELLIGENT_REPLY: use 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.

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 59 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 60 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 61 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 62 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 63 ReplyAudioInfo

Parameter

Type

Description

audio_url

String

Audio URL.

audio_name

String

Audio name.

Table 64 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

Details:

Whether an independent data collection device is required. This parameter is used when the client playback is separated from the command.

Constraints:

N/A

Options:

  • true: Devices are allocated to RTC users CAPTURE and PLAYER.
  • false: Devices are allocated only to the RTC user PLAYER.

Default value:

false

Table 65 VideoConfig

Parameter

Type

Description

clip_mode

String

Details:

Clipping mode of the output video.

Constraints:

N/A

Options:

  • RESIZE: video scaling
  • CROP: video cropping

Default value:

RESIZE

codec

String

Details:

Video encoding format and video file format.

Constraints:

Only virtual avatar video production supports VP8 encoding.

Options:

  • H264: H.264 encoding, MP4 file output
  • VP8: VP8 encoding, WebM file output

Default value:

N/A

bitrate

Integer

Details:

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

Details:

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.
  • Currently, only 1080 x 1920 and 1920 x 1080 are supported for virtual avatar livestreaming.

Default value:

N/A

Value range:

0-3840

height

Integer

Details:

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.
  • Currently, only 1080 x 1920 and 1920 x 1080 are supported for virtual avatar livestreaming.

Default value:

N/A

Value range:

0-3840

frame_rate

String

Details:

Frame rate. Unit: FPS

Constraints:

The virtual avatar video frame rate is fixed at 25 FPS.

Default value:

25

is_subtitle_enable

Boolean

Details:

Whether the output video is subtitled.

Constraints:

Subtitles are not supported for virtual avatar livestreaming.

Options:

  • true: enable subtitling
  • false: disable subtitling

Default value:

false

subtitle_config

SubtitleConfig object

Subtitle configuration.

disable_system_watermark

Boolean

Details:

Indicates whether the system watermark is disabled for the output video.

Constraints:

Currently, this parameter takes effect only for trustlisted tenants.

Value range:

  • true
  • false

Default value:

false

dx

Integer

Details:

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

Details:

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

Details:

Whether super resolution is enabled for a video.

Constraints:

This parameter is available only for virtual avatar video production.

Options:

  • true: enable
  • false: do not enable

Default value:

false

Table 66 SubtitleConfig

Parameter

Type

Description

dx

Integer

Details:

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

Details:

Coordinates of the pixel in the lower left corner of the subtitle box.

Constraints:

N/A

Default value:

N/A

Value range:

0-1920

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

Constraints:

N/A

Options:

The value contains 0 to 64 characters.

Default value:

HarmonyOS_Sans_SC_Black

font_size

Integer

Details:

Font size. 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:

54

h

Integer

Details:

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

Details:

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

Table 67 LiveEventCallBackConfig

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.

    Value format: hwSecret=hmac_sha256(Key, URI (live_event_callback_url) + hwTime)&hwTime=hex(timestamp)

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

    Value format: x-hw-mss-secret=hmac_sha256(Key, URI (live_event_callback_url) + hwTime)

    x-hw-mss-time=hex(timestamp)

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

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"}"
      }
Table 68 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 69 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 70 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 71 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 72 VoiceConfig

Parameter

Type

Description

voice_asset_id

String

Details:

Timbre asset ID, which can be queried from the asset library.

Constraints:

N/A

Options:

The value contains 1 to 256 characters.

Default value:

N/A

speed

Integer

Details:

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 150 words per minute.

Constraints:

N/A

Value range:

50-200

Default value:

100

pitch

Integer

Details:

Pitch.

Constraints:

N/A

Value range:

50-200

Default value:

100

volume

Integer

Details:

Volume.

Constraints:

N/A

Value range:

90-240

Default value:

140

Table 73 PlatformLiveDetailInfo

Parameter

Type

Description

platform_id

String

Live TV platform ID.

platform

String

Live broadcast platform. Meituan fills in meituan

account

String

Authorization account information.

Meituan platform: opBizCode

live_id

String

Live TV channel ID. If this parameter is set, the live TV channel ID is carried in the segment switchback callback.

LiveId corresponding to the Meituan.

Table 74 ErrorResponse

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 400

Table 75 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 401

Table 76 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 500

Table 77 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" : "978f893e1de4553c183b7a805e6290f5"
    } ],
    "shoot_scripts" : [ {
      "sequence_no" : 1,
      "text_config" : {
        "text" : "Hello, everyone. I'm Sara."
      }
    } ]
  } ]
}

Example Responses

Status code: 400

{
  "error_code" : "MSS.00000003",
  "error_msg" : "Invalid parameter"
}

Status code: 401

{
  "error_code" : "MSS.00000001",
  "error_msg" : "Unauthorized"
}

Status code: 500

{
  "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.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback