Token Broker
# 在环境变量中配置上游 Provider Keybun run examples/token-broker/server.ts请求:
POST /api/voice/tokenContent-Type: application/json
{ "provider": "deepgram", "purpose": "asr", "sessionId": "optional"}响应:
{ "token": "short-lived-token", "url": "wss://optional-signed-endpoint", "expiresAt": 1784000000000}客户端 Provider:
createDeepgramASR({ tokenBrokerUrl: 'https://your.app/api/voice/token',});网关应做:用户鉴权、Provider/模型白名单、配额、速率限制、体积与超时、审计 ID。默认不要记原始音频、完整 transcript、上游凭证。更多见 安全指南。