Voice API
progrok exposes Voice REST through the localhost HTTP bridge and provides typed clients for direct xAI WebSockets. The localhost servers do not accept WebSocket upgrades.
| Surface | Endpoint | Authentication |
|---|---|---|
| TTS, STT, voices, client secrets | http://127.0.0.1:18645/v1/* | progrok injects the stored bearer. |
| Realtime Voice | wss://api.x.ai/v1/realtime | Server bearer, or one fresh browser secret per connection. |
| Streaming STT | wss://api.x.ai/v1/stt | Server bearer, or one fresh browser secret per connection. |
| Streaming TTS | wss://api.x.ai/v1/tts | Server bearer. Browser ephemeral auth is not verified. |
Browser realtime and STT clients mint through same-origin POST /v1/realtime/client_secrets, pass the value only as xai-client-secret.<token> in Sec-WebSocket-Protocol, and discard it after one connection. Every reconnect needs a new secret.