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

Starting a Virtual Avatar Intelligent Interaction Task

Function

Starts a virtual avatar intelligent interaction task.

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

POST /v1/{project_id}/smart-chat-rooms/{room_id}/smart-chat-jobs

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

Interactive dialog ID. For details about how to obtain the ID, see Creating an Interactive Dialog.

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

region

No

String

Region where the computing power is provided.

  • cn-north-4: CN North-Beijing4

  • cn-southwest-2: CN Southwest-Guiyang1

client_id

No

String

Service ID.

room_type

No

String

Room type for interactive dialogs with virtual avatars.

  • RTC: RTC room

  • METALINK: Metalink room

Default value:

RTC

Response Parameters

Status code: 202

Table 4 Response header parameters

Parameter

Type

Description

X-Request-Id

String

Request ID.

Table 5 Response body parameters

Parameter

Type

Description

job_id

String

Interactive dialog task ID.

rtc_room_info

RTCRoomInfoList object

RTC room information.

chat_subtitle_config

ChatSubtitleConfig object

Dialog subtitle configuration

video_config

ChatVideoConfigRsp object

Video output configuration.

voice_config_list

Array of VoiceConfigRsp objects

Voice configuration parameter list.

chat_video_type

String

Interactive dialog device configuration.

  • COMPUTER: PC

  • MOBILE: mobile phone

  • Hub: large screen

is_transparent

Boolean

Whether the background is transparent.

NOTE:
true: yes

false: no

Default value:

false

region

String

Region where the computing power is provided.

  • cn-north-4: CN North-Beijing4

  • cn-southwest-2: CN Southwest-Guiyang1

default_language

String

Default language, which is used by the intelligent interaction APIs. Default value: CN

  • CN: Simplified Chinese

  • EN: English

  • ESP: Spanish (supported only outside China)

  • por: Portuguese (supported only outside China)

  • Arabic: Arabic (supported only outside China)

  • Thai: Thai (supported only outside China)

Default value:

CN

Table 6 RTCRoomInfoList

Parameter

Type

Description

app_id

String

RTC application ID.

room_id

String

RTC room ID.

users

Array of RTCUserInfo objects

Information about users joining an RTC room.

Table 7 RTCUserInfo

Parameter

Type

Description

user_type

String

User type.

  • CAPTURE: Live assistant, which pushes video streams captured by cameras to RTC rooms.

  • ANIMATION: Visual control service, which pulls video streams from RTC rooms to generate motion data.

  • RENDER: Rendering service, which renders motion data into virtual human animations.

  • PLAYER: Common viewer, who can watch the original video stream or virtual human animation video stream.

  • INFERENCE_USER: Virtual human inference user, who receives audio streams from and pushes video streams to an RTC room.

  • END_USER: Device user, who receives video streams from and pushes audio streams to an RTC room.

user_id

String

RTC user ID.

signature

String

RTC authentication token.

ctime

Long

Validity period. Timestamp, in seconds.

Value range:

0~4294967295

Table 8 ChatSubtitleConfig

Parameter

Type

Description

dx

Integer

Details:

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

The video resolution is 1920 x 1080 in landscape mode (16:9) and 1080 x 1920 in portrait mode (9:16).

Value range:

0~1920

dy

Integer

Details:

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

The video resolution is 1920 x 1080 in landscape mode (16:9) and 1080 x 1920 in portrait mode (9:16).

Value range:

0~1920

width

Integer

Details:

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

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

Value range:

1~7680

Table 9 ChatVideoConfigRsp

Parameter

Type

Description

width

Integer

Video width.

Unit: pixel.

The value ranges from 320 to 2560.

NOTE:
  • When clip_mode is set to RESIZE, four resolutions are supported: 1920 x 1080, 1080 x 1920, 1280 x 720, and 720 x 1280.

Value range:

0~3840

height

Integer

Video height.

Unit: pixel.

The value ranges from 320 to 2560.

NOTE:
  • When clip_mode is set to RESIZE, four resolutions are supported: 1920 x 1080, 1080 x 1920, 1280 x 720, and 720 x 1280.

Value range:

0~3840

Table 10 VoiceConfigRsp

Parameter

Type

Description

voice_asset_id

String

Speech synthesis feature string

speed

Integer

Speaking speed. The value ranges from 50 to 200 and defaults to 100.

NOTE:
The value 100 indicates the normal speaking speed of an adult, which is about 250 words per minute.

Value range:

50~200

Default value:

100

pitch

Integer

Pitch. The value ranges from 50 to 200 and defaults to 100.

Value range:

50~200

Default value:

100

volume

Integer

Volume. The value ranges from 90 to 240 and defaults to 140.

Value range:

90~240

Default value:

140

provider

String

Third-party TTS vendor. Options:

  • XIMALAYA: Himalaya TTS

  • HUAWEI_EI: EI TTS

  • MOBVOI: Mobvoi TTS

language

String

Language type. Default value: CN

  • CN: Simplified Chinese

  • EN: English

  • ESP: Spanish (supported only outside China)

  • por: Portuguese (supported only outside China)

  • Arabic: Arabic (supported only outside China)

  • Thai: Thai (supported only outside China)

Default value:

CN

language_desc

String

Language description

Status code: 400

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 401

Table 12 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 500

Table 13 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Example Requests

POST https://{endpoint}/v1/70b76xxxxxx34253880af501cdxxxxxx/smart-chat-rooms/24bad716-87b1-45e5-8912-6102f7693265/smart-chat-jobs

null

Example Responses

Status code: 202

Succeeded.

{
  "job_id" : "26f06524-4f75-4b3a-a853-b649a21aaf66"
}

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

202

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.