Query Role Template List

Last Updated on : 2026-02-26 09:15:55download

Based on the device ID, query the list of role templates of the AI ​​agent.

API address

GET: /v1.0/cloud/agent/ai/chat/b/devices/{device_id}/role-templates

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringpathtrueThe ID of the specified device.

Return parameter

Parameter nameTypeDescription
resultListIndicates whether the operation is successful.

Description of result

Parameter nameTypeDescription
use_llm_idStringThe ID of the specified large language model.
use_timbre_idStringThe ID of the specified voice tone.
role_introduceStringThe introduction to the specified role.
role_descStringThe description of the specified role.
last_text_answerStringThe last text answer.
use_llm_nameStringThe name of the specified large language model (LLM).
role_nameStringThe name of the specified role.
use_lang_codeStringThe code of the specified language.
template_idStringThe ID of the specified template.
role_img_urlStringThe URL of the specified role image.
use_lang_nameStringThe name of the specified language.
use_timbre_nameStringThe name of the specified voice tone.
bind_statusBooleanThe binding status. Valid values:
  • true: Bound
  • false: Not bound

Request example

GET: /v1.0/cloud/agent/ai/chat/b/devices/{device_id}/role-templates
{
  "device_id": "6c3585ebfe301b40a8u***"
}

Return example

{
    "result": [
        {
            "use_llm_id": "8*",
            "use_timbre_id": "5*",
            "role_introduce": "I am a***",
            "last_text_answer": "I am***",
            "use_llm_name": "1.5 Pro ***",
            "role_name": "Template***",
            "bind_status": false,
            "use_lang_code": "zh",
            "template_id": "63700***",
            "role_desc": "I am***",
            "role_img_url": "https://images.tuyacn.com/smart/***/17459093538f665740***.png",
            "use_lang_name": "Chinese",
            "use_timbre_name": "Test***"
        }
    ],
    "t": 1753252060794,
    "success": true
}

Error code

For more information, see error code.