get_ai_characters

get_ai_characters只读扩展
获取 AI 语音角色

Call via POST http://127.0.0.1:3000/get_ai_characters (JSON params as the body) or WebSocket.

Parameters

Param Type Required Default Description
group_id uint 群号
chat_type int 1

Returns (data)

按分类分组的 AI 语音角色列表,每组含分类名与角色(id、名称、试听 URL)。

Every response is wrapped in the standard envelope: { "status": "ok", "retcode": 0, "data": ... }. The table below describes data.

data is an array; each element:

Field Type Required Description
type string 角色分类名
characters object[] 该分类下的角色列表
Raw JSON Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "type": {
        "type": "string",
        "description": "角色分类名"
      },
      "characters": {
        "type": "array",
        "description": "该分类下的角色列表",
        "items": {
          "type": "object",
          "properties": {
            "character_id": {
              "type": "string",
              "description": "角色 ID"
            },
            "character_name": {
              "type": "string",
              "description": "角色显示名"
            },
            "preview_url": {
              "type": "string",
              "description": "试听音频 URL"
            }
          },
          "required": [
            "character_id",
            "character_name",
            "preview_url"
          ]
        }
      }
    },
    "required": [
      "type",
      "characters"
    ]
  }
}

Examples

curl
Python
JavaScript
Go
SnowLuma SDK
curl -X POST http://127.0.0.1:3000/get_ai_characters \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <access-token>' \
  -d '{"group_id":123456,"chat_type":1}'
Using an AI assistant?

MCP-capable clients can discover and call this action directly — no hand-written HTTP. See MCP.