GenerateAIAgentCall
Creates an agent instance and returns the channel where the agent is located, the username in the channel, and the token required to join the channel.
Operation description
Creates an agent instance based on the specified AI agent ID (AIAgentId). You can use the information in the API response to join the corresponding room and converse with the agent.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ice:GenerateAIAgentCall |
none |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AIAgentId |
string |
Yes |
The agent ID. |
39f8e0bc005e4f309379701645f4**** |
| Expire |
integer |
No |
Optional. The expiration time of the token. Unit: seconds. Default value: 3600. Valid values: 0 to 604800. |
3600 |
| UserId |
string |
No |
The username in the conversation channel. If you do not specify this parameter, the system automatically generates a username. The username can be up to 64 characters in length. |
877ae632caae49b1afc81c2e8194ffb4 |
TemplateConfig
deprecated
|
AIAgentTemplateConfig |
No |
Note
The agent template configurations. [Deprecated] This parameter is deprecated. For more information, see the AgentConfig parameter. |
|
| UserData |
string |
No |
The custom user information. |
{"Email":"johndoe@example.com","Preferences":{"Language":"en"}} |
| SessionId |
string |
No |
The unique identifier of the conversation. Default value: none. |
fw1gr0bc005e4f309379701645f4**** |
| AgentConfig | AIAgentConfig |
No |
The agent template configurations. The specified configurations are merged and updated with the agent template configurations in the console. If you do not specify this parameter, the default configurations of the agent in the console are used. Note
Compatibility rules for TemplateConfig: The fields in AgentConfig take precedence. If TemplateConfig contains fields that are not specified in AgentConfig, the fields in TemplateConfig are used. We recommend that you use AgentConfig instead of TemplateConfig. |
|
| ChatSyncConfig |
object |
No |
The configurations for synchronizing chat records. |
|
| IMAIAgentId |
string |
No |
The ID of the IM agent. |
******005e4f309379701645f4**** |
| ReceiverId |
string |
No |
The ID of the receiving user. |
4167626d312034b2b1c3b7f2f3e41884 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| AIAgentUserId |
string |
The name of the agent in the ARTC channel. |
877ae632caae49b1afc81c2e8194ffb4 |
| ChannelId |
string |
The ARTC channel ID. |
70f22d5784194938a7e387052f2b3208 |
| InstanceId |
string |
The instance ID of the generated agent. |
39f8e0bc005e4f309379701645f4**** |
| RequestId |
string |
The request ID. |
7B117AF5-2A16-412C-B127-FA6175ED1AD0 |
| Token |
string |
The ARTC token on the client side. |
eyJhcHBpZCI6ICIxMjM0MTIzNxxxxx |
| UserId |
string |
The username in the ARTC channel. |
user123 |
| AvatarUserId |
string |
The user ID of the digital human joining the channel. |
avatar_39f8e0bc005e4f309379701645f4**** |
Examples
Success response
JSON format
{
"AIAgentUserId": "877ae632caae49b1afc81c2e8194ffb4",
"ChannelId": "70f22d5784194938a7e387052f2b3208",
"InstanceId": "39f8e0bc005e4f309379701645f4****",
"RequestId": "7B117AF5-2A16-412C-B127-FA6175ED1AD0",
"Token": "eyJhcHBpZCI6ICIxMjM0MTIzNxxxxx",
"UserId": "user123",
"AvatarUserId": "avatar_39f8e0bc005e4f309379701645f4****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.