Last Updated on : 2026-02-26 09:15:43download
Based on the device ID and role ID, modify the specified custom role for the AI agent.
PUT: /v1.0/cloud/agent/ai/chat/b/devices/{device_id}/custom-roles/{role_id}
| Parameter name | Type | IN | Required | Description |
|---|---|---|---|---|
| device_id | String | path | true | The ID of the specified device. |
| role_id | String | path | true | The ID of the specified role. |
Description of body
| Parameter name | Type | IN | Required | Description |
|---|---|---|---|---|
| role_name | String | body | false | The name of the specified role. |
| role_desc | String | body | false | The description of the specified role. |
| role_introduce | String | body | false | The introduction to the specified role. |
| role_img_url | String | body | false | The URL of the specified role image. |
| use_lang_code | String | body | false | The code of the specified language. |
| use_timbre_id | String | body | false | The ID of the specified voice tone. |
| use_llm_id | String | body | false | The ID of the specified large language model. |
| speed | String | body | false | The speech speed. |
| Parameter name | Type | Description |
|---|---|---|
| result | boolean | Indicates whether the operation is successful. |
PUT: /v1.0/cloud/agent/ai/chat/b/devices/{device_id}/custom-roles/{role_id}
{
"device_id": "6c3585ebfe301b40a8u***",
"role_id": "163000***",
"role_name": "Test***",
"role_desc": "The role description***",
"role_introduce": "You are a student tutor***",
"role_img_url": "https://images.tuyacn.com/***/icon/2***.png",
"use_lang_code": "zh",
"use_timbre_id": "6*",
"use_llm_id": "8*",
"speed": "30"
}
{
"tid": "6fa034fc1a6d11f0a8212220de940dcb",
"result": true,
"t": 1744771778112,
"success": true
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback