Start AI Agent
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
rtc:StartAgent |
create |
*App
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AppId |
string |
Yes |
The application ID. You can create and query this ID in the console. Only one application ID is supported. |
aoe**** |
| ChannelId |
string |
Yes |
The ID of the channel to join. Only one channel ID is supported. |
yourChannelId |
| TaskId |
string |
Yes |
The task ID. |
yourTaskId |
| TemplateId |
string |
Yes |
The template ID. |
76dasgb**** |
| RtcConfig |
object |
Yes |
The configuration for the agent to join an RTC channel. |
2 |
| UserId |
string |
Yes |
The user ID for the agent in the RTC channel. |
423341 |
| TargetUserIds |
array |
No |
A list of user IDs that the agent subscribes to. Currently, only a single user ID is supported. |
|
|
string |
No |
A user ID. |
41411 |
|
| UserInactivityTimeout |
integer |
No |
The maximum duration of user inactivity, in seconds. The agent automatically stops and leaves the channel if either of the following conditions is met for this duration:
Default: 30. |
30 |
| VoiceChatConfig |
object |
No |
The configuration for AI voice chat. |
|
| ChatMode |
integer |
No |
|
1 |
| InterruptMode |
integer |
No |
|
1 |
| Greeting |
string |
No |
The agent's initial greeting. |
早上好,我的朋友 |
| ASRConfig |
object |
No |
Configuration for Automatic Speech Recognition (ASR). |
|
| SourceLanguage |
string |
No |
The language is automatically detected, so this parameter is not required. |
zh |
| SemanticPunctuationEnabled |
boolean |
No |
Enables semantic punctuation for sentence segmentation. If |
false |
| MaxSentenceSilence |
integer |
No |
The silence duration threshold, in milliseconds, for VAD-based sentence segmentation. |
800 |
| VocabularyId |
string |
No |
The ID of the custom vocabulary to use. |
vocab-xxx-24ee19fa8cfb4d52902170a0xxxxxxxx |
| LanguageHints |
array |
No |
If this parameter is not set, the model automatically detects the language. |
|
|
string |
No |
A language code. |
zh |
|
| VadConfig |
object |
No |
Configuration for Voice Activity Detection (VAD). |
|
| InterruptSpeechDuration |
integer |
No |
The minimum duration, in milliseconds (ms), of continuous human speech required to trigger an interruption. This helps prevent false interruptions. |
300 |
| LLMConfig |
object |
No |
Configuration for the Large Language Model (LLM). |
|
| Vendor |
string |
No |
The name of the cloud service provider. Examples: |
aliyun |
| Model |
string |
No |
The name of the model. |
qwen-plus |
| ApiKey |
string |
No |
The API key from the cloud service provider. |
xxxxxxxxxxx |
| Temperature |
number |
No |
The sampling temperature, which controls the randomness of the generated text. A higher value increases randomness. |
0.7 |
| TopP |
number |
No |
Controls output diversity via nucleus sampling. The model samples from the smallest set of tokens whose cumulative probability mass exceeds this value. A higher value results in a more diverse output. |
0.8 |
| MaxToken |
integer |
No |
The maximum number of tokens for the generated response. For |
500 |
| HistoryDepth |
integer |
No |
The number of previous conversation turns to include as context for the model. |
3 |
| Prompt |
string |
No |
A system prompt that instructs the model on its role, behavior, or persona. |
xxxx |
| Url |
string |
No |
The access URL for a third-party LLM. |
https://xxxxx |
| Params |
object |
No |
A key-value map for custom parameters. This parameter is deprecated; use |
{\"verification_code\": \"xxx\"} |
| BizParams |
any |
No |
Custom parameters. |
|
| AppId |
string |
No |
The agent application ID. You can specify either |
e**** |
| ToolExecutionConfig |
any |
No |
||
| Tools |
array |
No |
||
|
any |
No |
|||
| TTSConfig |
object |
No |
Configuration for Text-to-Speech (TTS). |
|
| Vendor |
string |
No |
The cloud service provider. Example: |
aliyun |
| Model |
string |
No |
The name of the TTS model. Example: |
cosyvoice-v1 |
| ApiKey |
string |
No |
The API key from the cloud service provider. |
xxxxxx |
| Voice |
string |
No |
The voice for the synthesized speech. If you use the |
longxiaoxia |
| Volume |
integer |
No |
The volume of the synthesized speech. |
50 |
| Rate |
number |
No |
The speech rate. |
1 |
| Pitch |
number |
No |
The pitch of the synthesized speech. |
1 |
| FilterBrackets |
array |
No |
Specifies bracket types whose enclosed content should be excluded from speech synthesis. |
|
|
integer |
No |
An integer representing the bracket type to filter. |
[1,2] |
|
| AgentSilenceConfig |
object |
No |
Configures how the agent responds to silence, such as when a user is in the channel but not speaking. You can configure the agent to play an audio prompt or send a webhook notification. |
|
| Enable |
boolean |
No |
Specifies whether to enable the silence configuration. |
false |
| AlertTimeout |
integer |
No |
The timeout in seconds before triggering a silence alert. The alert can be re-triggered if the silence continues. |
0 |
| Strategy |
integer |
No |
The strategy for the silence alert: |
1 |
| Content |
string |
No |
The content of the silence alert message. |
** |
| WebhookTriggerTimeout |
integer |
No |
The timeout in seconds before triggering a silence webhook. The webhook can be re-triggered if the silence continues. |
0 |
| AmbientSoundConfig |
object |
No |
Configuration for ambient sound. |
|
| SoundId |
string |
No |
Specifies the ambient sound to play.
|
white_noise |
| Volume |
integer |
No |
The volume of the ambient sound. |
50 |
| InterruptConfig |
object |
No |
Configuration for interruption handling. |
|
| SemanticsInterrupt |
boolean |
No |
Specifies whether to enable semantic interruption. |
true |
| BackChannelConfig |
object |
No |
Configuration for back-channeling. |
|
| UserTurnEnd |
boolean |
No |
Specifies whether to enable back-channeling after the user finishes speaking. |
false |
| Version |
integer |
No |
||
| EnableVideoUnderstanding |
boolean |
No |
Specifies whether to enable video understanding. If enabled, the LLM must support multimodal inputs. |
|
| preferVideo |
integer |
No |
When video understanding is enabled, specifies which video stream to prioritize if both camera and screen sharing streams are active. The agent can process only one stream at a time.
Default: |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response data. |
||
| RequestId |
string |
The unique ID of the request. |
6159ba01-6687-4fb2-a831-f0cd8d188648 |
Examples
Success response
JSON format
{
"RequestId": "6159ba01-6687-4fb2-a831-f0cd8d188648"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.