Mint stream tokens
Text to speech
Mint stream tokens
Mint a single-use token for opening the streaming text-to-speech WebSocket from a browser, which cannot send an Authorization header: connect to wss://<host>/v1/audio/speech/stream?token=<token> (the url field). Valid for 60 seconds and one connection; the socket acts, and is billed, as the key that minted it, and dies with that key if it is revoked. Server code should connect with its API key in the Authorization header instead. API keys are never accepted in the URL.
POST
Mint stream tokens
Authorizations
Your workspace secret key, sk_live_ followed by 32 hex characters. Create one in the console under Developers.
Response
default
API response; preserves the endpoint's HTTP status and error envelope. Response schemas beyond agents are not yet exhaustive.