StartRtcRobotInstance

Updated at:

Starts an RTC interactive AI agent instance and joins an RTC call.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ice:StartRtcRobotInstance

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RobotId

string

Yes

The ID of the AI agent.

ca28b08ad3464ebcb42e5c0f7c6d2e89

ChannelId

string

Yes

The ID of the RTC channel.

testId

UserId

string

Yes

The ID of the AI agent in the channel.

my-robot

UserData

string

No

The custom user data.

{}

AuthToken

string

Yes

The RTC join token, which must be generated by using the RTC AppKey.

**********

Config

object

No

The advanced call configurations. If specified, these configurations override the default configurations set when the AI agent was created. Otherwise, the default configurations are used.

AsrMaxSilence

integer

No

The maximum silence threshold at the end of an Automatic Speech Recognition (ASR) sentence, in milliseconds. After the user stops speaking for a duration that reaches this threshold, the speech recognition service determines that the current sentence has ended. A smaller value facilitates faster responses, while a larger value helps preserve pauses within a sentence. This is not the timeout for hanging up due to user unresponsiveness. The default value for standard engines is 400. The specific behavior may vary based on the ASR model and sentence segmentation strategy.

400

EnableVoiceInterrupt

boolean

No

Specifies whether to allow voice interruption.

true

Greeting

string

No

The greeting message, which is the first sentence proactively spoken by the AI agent after the user joins the call.

Hello, how can I help you?

UseVoiceprint

boolean

No

Specifies whether to enable voiceprint recognition and primary speaker identification. This feature helps distinguish the primary speaker from other speakers and reduces interference from non-primary speakers during interactions. Valid values:

  • true: Enabled.

  • false: Disabled. The default value for standard engines is false. The effectiveness depends on the voiceprint registration status and engine recognition results. This parameter does not act as an authentication switch.

true

UserOfflineTimeout

integer

No

The tolerance duration after a remote user leaves the call, in seconds. If the user does not reconnect within this duration, the agent instance automatically stops. This parameter can be used to tolerate brief disconnections. The default value for standard engines is 5.

5

UserOnlineTimeout

integer

No

The timeout duration for waiting for the remote user to be ready after the agent successfully joins the call, in seconds. If the user does not become ready within this duration, the instance automatically stops. The default value for standard engines is 60. This applies only to the initial wait for the user to be ready and does not represent the maximum duration of the entire call.

60

VoiceId

string

No

The ID of the voice.

zhixiaoxia

VoiceprintId

string

No

The voiceprint profile identifier, which is used to locate voiceprint storage within the same account and supports subsequent read or update operations. This parameter is typically used in combination with UseVoiceprint=true. It is neither a text-to-speech (TTS) voice ID nor voiceprint vector content. There is no fixed default ID. Use a stable business identifier that does not contain sensitive plaintext information.

vp-user-001

Volume

integer

No

The audio volume parameter for the audio published by the agent to the RTC channel. This parameter adjusts the volume of the agent's voice heard by remote users. It does not control the microphone capture volume or the device system volume. The default value of the RTC transmission node construction parameter is 100, but the actual value depends on the workflow configuration. Use 100 in examples. Do not interpret 0 as the default value.

100

Response elements

Element

Type

Description

Example

object

Schema of Response

InstanceId

string

The instance ID.

727dc0e296014bb58670940a3da95592

RequestId

string

Id of the request

11DE0AB3-603B-5055-8A72-9C424854F983

Examples

Success response

JSON format

{
  "InstanceId": "727dc0e296014bb58670940a3da95592",
  "RequestId": "11DE0AB3-603B-5055-8A72-9C424854F983"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.