获取 WebRTC 令牌,以与需要授权的智能体开始会话

获取用于实时通信的 WebRTC 会话令牌。

请求头

xi-api-keystring可选

查询参数

agent_idstring必需

智能体 id(agent_…)或语音引擎外部 id(seng_),均会解析为同一底层资源。

participant_namestring or null可选

可选的自定义参与者名称。未提供时使用用户 ID。

branch_idstring or null可选

要使用的分支 ID

version_idstring or null可选

要使用的版本 ID

environmentstring or null可选

用于解析环境变量的环境(例如 ‘production’、‘staging’)。默认值为 ‘production’。

debug_events_requestboolean可选默认为 false

是否启用调试事件。仅适用于拥有该智能体编辑权限的用户。

响应

成功响应

tokenstring
conversation_idstring

错误

422
Unprocessable Entity Error