AILIVE文档
API 参考接口列表

对手声音票据

换取一次性票据,用来发送 PK 对手的声音;只在当前场次有需要对手声音的 PK 回合时可用。

POST
/v1/room/audio-tickets

请求头参数

authorization?string|null

响应正文

Successful Response

application/json
  1. response

A one-time ticket for an audio channel (ADR 0014 §3).

expiresAt*Expiresat
格式date-time
pkId*|

The PK round the opponent's voice is for

ticket*Ticket

Send in the auth frame; valid 30 s, usable once

url*Url

WebSocket URL; connect with subprotocol ailive.audio.v1

请求示例
curl -X POST 'https://api.ailive.studio/v1/room/audio-tickets' \  -H 'Authorization: Bearer <ACCESS_TOKEN>'
响应示例
{  "expiresAt": "2019-08-24T14:15:22Z",  "pkId": "57d66b34-b5ac-48b2-9fc1-f002c74f4ec3",  "ticket": "string",  "url": "string"}