# AIGC-RTC ## API Docs - 角色配置 [创建角色配置](https://tange-ai-aichat.apifox.cn/485231793e0.md): 创建角色。 成功后从 data.id 取得角色 ID,用于查询、更新、删除和设备绑定。 首次接入可将 service_config.type 设置为 custom-compose,并传空 config 使用系统默认资源。 地域在 JSON 请求体的 region 字段中传入,例如 "region": "sg01"。 - 角色配置 [查询角色配置列表](https://tange-ai-aichat.apifox.cn/485231794e0.md): 查询当前应用及指定地域的角色。 type 按已保存的服务类型精确匹配,留空时查询全部类型。 空结果返回空数组。 响应无总条数。 地域通过查询参数传入,例如 GET /ai/aigcrtc/roles?region=sg01。查询时使用创建角色时的地域。 - 角色配置 [获取角色配置详情](https://tange-ai-aichat.apifox.cn/485231795e0.md): 按角色 ID 查询保存的配置。 响应保留角色保存时使用的资源引用。 更新前可先调用本接口读取要保留的配置。 - 角色配置 [更新角色配置](https://tange-ai-aichat.apifox.cn/485231796e0.md): 全量更新角色。 必须重新传入 name 和 service_config。 需要保留的可写字段应一并传回。 角色 ID、所属应用、地域和创建时间沿用原记录。 更新时不传 region,角色沿用原有地域。 - 角色配置 [删除角色配置](https://tange-ai-aichat.apifox.cn/485231797e0.md): 删除指定角色。 若仍被子角色引用,请先解除引用,再重试删除。 删除前应检查设备绑定。 成功时检查响应 code。 - 会话记录 [查询会话列表](https://tange-ai-aichat.apifox.cn/485231799e0.md): - 会话记录 [获取会话详情](https://tange-ai-aichat.apifox.cn/485231800e0.md): - 会话记录 [删除会话](https://tange-ai-aichat.apifox.cn/485231801e0.md): - 知识库 [查询知识库索引列表](https://tange-ai-aichat.apifox.cn/485231806e0.md): 分页查询当前应用下的知识库索引列表,可按索引名称模糊筛选。 - 知识库 [获取知识库索引详情](https://tange-ai-aichat.apifox.cn/485231807e0.md): 获取指定知识库索引的详细信息,包含已关联的 document_ids 列表。 - 知识库 [更新知识库索引](https://tange-ai-aichat.apifox.cn/485231808e0.md): 更新知识库索引的名称、描述,或同步关联的文档列表。 - 知识库 [删除知识库索引](https://tange-ai-aichat.apifox.cn/485231809e0.md): 删除指定知识库索引及其关联的文档记录(级联清理)。此操作不可恢复。 - 知识库 [查询知识库文档列表](https://tange-ai-aichat.apifox.cn/485231810e0.md): 分页查询**指定索引下已关联的文档(Document)**列表,包含入库/向量化处理状态。 - 知识库 [上传知识库文件](https://tange-ai-aichat.apifox.cn/485231811e0.md): 上传原始文件至知识库素材库,获得 `file_id`。 - 知识库 [查询知识库文件列表](https://tange-ai-aichat.apifox.cn/485231812e0.md): 分页查询当前应用下已上传的**原始文件(File)**列表,使用游标(next_token)翻页。 - 知识库 [删除知识库文件](https://tange-ai-aichat.apifox.cn/485231813e0.md): 删除指定 file_id 的上传文件。若该文件已关联为某索引下的文档,需先解除索引关联或删除对应索引。 - MCP [查询全局 MCP 工具列表](https://tange-ai-aichat.apifox.cn/485231814e0.md): 返回平台预置的全局 MCP 工具简要列表,供应用选型参考。 - MCP [获取全局 MCP 工具详情](https://tange-ai-aichat.apifox.cn/485231815e0.md): 获取指定全局 MCP 工具的简要信息(id、name、description)。全局工具配置为平台内置,只读不可修改。 - MCP [创建应用 MCP 工具](https://tange-ai-aichat.apifox.cn/485231816e0.md): 为当前应用创建一条自定义 MCP 工具配置、 - MCP [查询应用 MCP 工具列表](https://tange-ai-aichat.apifox.cn/485231817e0.md): 查询当前应用下已配置的全部 MCP 工具,含运行时配置与启用状态。 - MCP [获取应用 MCP 工具详情](https://tange-ai-aichat.apifox.cn/485231818e0.md): 获取指定应用 MCP 工具的完整配置。 - MCP [更新应用 MCP 工具](https://tange-ai-aichat.apifox.cn/485231819e0.md): 更新应用 MCP 工具的运行时配置或启用状态。未传字段保持原值。 - MCP [删除应用 MCP 工具](https://tange-ai-aichat.apifox.cn/485231820e0.md): 删除指定应用 MCP 工具配置。若角色 `agent_config.mcp_tools` 中仍引用该工具,需先解除引用。 - 设备插件 [创建设备端插件](https://tange-ai-aichat.apifox.cn/485231821e0.md): 注册一个设备端可执行插件,供 AI 智能体在对话中调用设备能力。 - 设备插件 [查询设备端插件列表](https://tange-ai-aichat.apifox.cn/485231822e0.md): 查询当前应用下已注册的全部设备端插件及其参数定义。 - 设备插件 [获取设备端插件详情](https://tange-ai-aichat.apifox.cn/485231823e0.md): 获取指定设备端插件的完整定义,含 input_params 与 return_params。 - 设备插件 [更新设备端插件](https://tange-ai-aichat.apifox.cn/485231824e0.md): 更新设备端插件的名称、描述、action 及入参/出参定义。action 命名规范同创建接口。 - 设备插件 [删除设备端插件](https://tange-ai-aichat.apifox.cn/485231825e0.md): 删除指定设备端插件。若角色 `agent_config.device_plugins` 中仍引用该插件,需先解除引用。 - 音色 [查询 TTS 音色列表](https://tange-ai-aichat.apifox.cn/485231826e0.md): 返回平台支持的 TTS 音色列表,供角色配置 `service_config.config.tts.provider_params.voice` 选型。 - 复刻音色 [申请声音样本直传地址](https://tange-ai-aichat.apifox.cn/499474526e0.md): 为当前应用生成私有 OSS 临时 PUT 地址。返回的对象键位于配置前缀下的当前应用目录, - 复刻音色 [创建复刻音色](https://tange-ai-aichat.apifox.cn/499474527e0.md): 使用已通过上传凭证接口直传的 `object_key` 创建当前应用专属音色。 - 复刻音色 [查询复刻音色列表](https://tange-ai-aichat.apifox.cn/499474528e0.md): 返回当前应用创建的复刻音色,按创建时间倒序排列,不与系统音色列表合并。 - 复刻音色 [查询复刻音色详情](https://tange-ai-aichat.apifox.cn/499474529e0.md): 查询当前应用范围内的复刻音色。若本地状态为 `DEPLOYING`,服务会尝试从阿里云刷新状态; - 复刻音色 [更新复刻音色](https://tange-ai-aichat.apifox.cn/499474530e0.md): `name` 与 `object_key` 至少提供一项。仅提供 `name` 时只修改显示名称。 - 复刻音色 [删除复刻音色](https://tange-ai-aichat.apifox.cn/499474531e0.md): 删除当前应用的阿里云音色、私有 OSS 样本和本地记录。 - 设备统计 [查询设备AI对话用量](https://tange-ai-aichat.apifox.cn/522471107e0.md): 查询设备在指定时间区间内的 AI 音频、视频对话时长,单位秒。无对应记录时,两项时长均返回 0。 ## Schemas - 用量统计 [ApiEnvelope](https://tange-ai-aichat.apifox.cn/294346459d0.md): - 用量统计 [ErrorEnvelope](https://tange-ai-aichat.apifox.cn/294346460d0.md): - 用量统计 [ClientStatResponse](https://tange-ai-aichat.apifox.cn/294346461d0.md): - 用量统计 [ClientStatListResponse](https://tange-ai-aichat.apifox.cn/294346462d0.md): - 用量统计 [ClientStatListEnvelope](https://tange-ai-aichat.apifox.cn/294346463d0.md): - 用量统计 [ClientStatSummaryResponse](https://tange-ai-aichat.apifox.cn/294346464d0.md): - 用量统计 [ClientStatSummaryEnvelope](https://tange-ai-aichat.apifox.cn/294346465d0.md): - [AlillmProviderParams](https://tange-ai-aichat.apifox.cn/293618616d0.md): - [AlillmComponent](https://tange-ai-aichat.apifox.cn/293618727d0.md): - [CreateVoiceCloneUploadRequest](https://tange-ai-aichat.apifox.cn/303097960d0.md): - [DeviceStatEnvelope](https://tange-ai-aichat.apifox.cn/319011201d0.md): - [ApiEnvelope](https://tange-ai-aichat.apifox.cn/293243126d0.md): - [VoiceCloneUploadInfo](https://tange-ai-aichat.apifox.cn/303097961d0.md): - [DeviceStatDTO](https://tange-ai-aichat.apifox.cn/319011202d0.md): - [IDEnvelope](https://tange-ai-aichat.apifox.cn/293243127d0.md): - [CreateVoiceCloneRequest](https://tange-ai-aichat.apifox.cn/303097962d0.md): - [DeviceRoleSaveRequest](https://tange-ai-aichat.apifox.cn/293243128d0.md): - [UpdateVoiceCloneRequest](https://tange-ai-aichat.apifox.cn/303097963d0.md): - [DeviceRoleDeviceIDsRequest](https://tange-ai-aichat.apifox.cn/293243129d0.md): - [VoiceCloneLanguage](https://tange-ai-aichat.apifox.cn/303097964d0.md): - [DeviceRoleItem](https://tange-ai-aichat.apifox.cn/293243130d0.md): - [VoiceCloneStatus](https://tange-ai-aichat.apifox.cn/303097965d0.md): - [DeviceRoleListEnvelope](https://tange-ai-aichat.apifox.cn/293243131d0.md): - [VoiceCloneInfo](https://tange-ai-aichat.apifox.cn/303097966d0.md): - [RoleConfigCreateRequest](https://tange-ai-aichat.apifox.cn/293243132d0.md): - [NoDataEnvelope](https://tange-ai-aichat.apifox.cn/293243195d0.md): - [ErrorEnvelope](https://tange-ai-aichat.apifox.cn/293243196d0.md): - [RoleReference](https://tange-ai-aichat.apifox.cn/303097967d0.md): - [RoleConfigUpdateRequest](https://tange-ai-aichat.apifox.cn/293243133d0.md): - [VoiceCloneUploadEnvelope](https://tange-ai-aichat.apifox.cn/303097968d0.md): - [RoleConfigResponse](https://tange-ai-aichat.apifox.cn/293243134d0.md): - [VoiceCloneEnvelope](https://tange-ai-aichat.apifox.cn/303097969d0.md): - [RoleConfigEnvelope](https://tange-ai-aichat.apifox.cn/293243135d0.md): - [RoleConfigListEnvelope](https://tange-ai-aichat.apifox.cn/293243136d0.md): - [VoiceCloneListData](https://tange-ai-aichat.apifox.cn/303097970d0.md): - [AgentConfig](https://tange-ai-aichat.apifox.cn/293243137d0.md): - [VoiceCloneListEnvelope](https://tange-ai-aichat.apifox.cn/303097971d0.md): - [ServiceConfig](https://tange-ai-aichat.apifox.cn/293243138d0.md): - [CustomComposeServiceConfig](https://tange-ai-aichat.apifox.cn/293243139d0.md): - [VoiceCloneDeleteBlockedEnvelope](https://tange-ai-aichat.apifox.cn/303097972d0.md): - [CozeServiceConfig](https://tange-ai-aichat.apifox.cn/293243140d0.md): - [QwenAgentServiceConfig](https://tange-ai-aichat.apifox.cn/293243141d0.md): - [CustomComposeConfig](https://tange-ai-aichat.apifox.cn/293243142d0.md): - [AliTtsComponent](https://tange-ai-aichat.apifox.cn/293243143d0.md): - [AliTtsProviderParams](https://tange-ai-aichat.apifox.cn/293243144d0.md): - [CozeConfig](https://tange-ai-aichat.apifox.cn/293243145d0.md): - [QwenAgentConfig](https://tange-ai-aichat.apifox.cn/293243146d0.md): - [DeviceConfigEnvelope](https://tange-ai-aichat.apifox.cn/293243147d0.md): - [DeviceConfigDTO](https://tange-ai-aichat.apifox.cn/293243148d0.md): - [DeviceInfoDTO](https://tange-ai-aichat.apifox.cn/293243149d0.md): - [SaveSessionRecordRequest](https://tange-ai-aichat.apifox.cn/293243150d0.md): - [SaveSessionRecordChatItem](https://tange-ai-aichat.apifox.cn/293243151d0.md): - [SaveSessionRecordResponse](https://tange-ai-aichat.apifox.cn/293243152d0.md): - [SaveSessionRecordEnvelope](https://tange-ai-aichat.apifox.cn/293243153d0.md): - [ConversationResponse](https://tange-ai-aichat.apifox.cn/293243154d0.md): - [ConversationListEnvelope](https://tange-ai-aichat.apifox.cn/293243155d0.md): - [ConversationDetailEnvelope](https://tange-ai-aichat.apifox.cn/293243156d0.md): - [ChatResponse](https://tange-ai-aichat.apifox.cn/293243157d0.md): - [CreateKnowledgeIndexRequest](https://tange-ai-aichat.apifox.cn/293243158d0.md): - [UpdateKnowledgeIndexRequest](https://tange-ai-aichat.apifox.cn/293243159d0.md): - [KnowledgeIndexInfo](https://tange-ai-aichat.apifox.cn/293243160d0.md): - [KnowledgeIndexSimpleResponse](https://tange-ai-aichat.apifox.cn/293243161d0.md): - [KnowledgeIndexSimpleEnvelope](https://tange-ai-aichat.apifox.cn/293243162d0.md): - [KnowledgeIndexEnvelope](https://tange-ai-aichat.apifox.cn/293243163d0.md): - [KnowledgeIndexListEnvelope](https://tange-ai-aichat.apifox.cn/293243164d0.md): - [KnowledgeDocument](https://tange-ai-aichat.apifox.cn/293243165d0.md): - [KnowledgeDocumentListEnvelope](https://tange-ai-aichat.apifox.cn/293243166d0.md): - [KnowledgeFileInfo](https://tange-ai-aichat.apifox.cn/293243167d0.md): - [KnowledgeFileSimpleEnvelope](https://tange-ai-aichat.apifox.cn/293243168d0.md): - [KnowledgeFileListEnvelope](https://tange-ai-aichat.apifox.cn/293243169d0.md): - [MCPToolBrief](https://tange-ai-aichat.apifox.cn/293243170d0.md): - [MCPToolBriefListEnvelope](https://tange-ai-aichat.apifox.cn/293243171d0.md): - [MCPToolBriefEnvelope](https://tange-ai-aichat.apifox.cn/293243172d0.md): - [MCPToolExternalRuntimeConfig](https://tange-ai-aichat.apifox.cn/293243173d0.md): - [AppMCPToolCreateRequest](https://tange-ai-aichat.apifox.cn/293243174d0.md): - [AppMCPToolUpdateRequest](https://tange-ai-aichat.apifox.cn/293243175d0.md): - [AppMCPTool](https://tange-ai-aichat.apifox.cn/293243176d0.md): - [AppMCPToolEnvelope](https://tange-ai-aichat.apifox.cn/293243177d0.md): - [AppMCPToolListEnvelope](https://tange-ai-aichat.apifox.cn/293243178d0.md): - [DevicePluginParam](https://tange-ai-aichat.apifox.cn/293243179d0.md): - [DevicePluginCreateRequest](https://tange-ai-aichat.apifox.cn/293243180d0.md): - [DevicePluginUpdateRequest](https://tange-ai-aichat.apifox.cn/293243181d0.md): - [DevicePlugin](https://tange-ai-aichat.apifox.cn/293243182d0.md): - [DevicePluginEnvelope](https://tange-ai-aichat.apifox.cn/293243183d0.md): - [DevicePluginListEnvelope](https://tange-ai-aichat.apifox.cn/293243184d0.md): - [VoiceInfo](https://tange-ai-aichat.apifox.cn/293243185d0.md): - [VoiceListEnvelope](https://tange-ai-aichat.apifox.cn/293243186d0.md): - [KnowledgeFileSimpleResponse](https://tange-ai-aichat.apifox.cn/293243187d0.md): - [MCPAuthenticationConfig](https://tange-ai-aichat.apifox.cn/293243188d0.md): - [RoleAliRAGConfig](https://tange-ai-aichat.apifox.cn/293243189d0.md): - [RoleAliMemoryConfig](https://tange-ai-aichat.apifox.cn/293243190d0.md): - [RoleMCPToolRefs](https://tange-ai-aichat.apifox.cn/293243191d0.md): - [RoleDevicePluginRefs](https://tange-ai-aichat.apifox.cn/293243192d0.md): - [IDEnvelope1](https://tange-ai-aichat.apifox.cn/293243193d0.md): - [ApiEnvelope2](https://tange-ai-aichat.apifox.cn/293243194d0.md): - [NoDataEnvelope3](https://tange-ai-aichat.apifox.cn/293243197d0.md): - [ErrorEnvelope4](https://tange-ai-aichat.apifox.cn/293243198d0.md):