Mint an ephemeral Omni session token
Mint a short-lived, origin-locked token a browser can use to open ONE Omni realtime session directly — the public/private split for realtime. Call this from your server with your secret key (which must hold omni:session); never ship the secret key to a page. The returned token carries only omni:session, is limited to one concurrent session, is locked to the allowed_origins you supply, and expires after ttl_seconds (default 60s, max 600s). Use it as the WebSocket subprotocol pyai-key.<token> against the returned url. See the Omni browser guide for the full flow.
Authorizations
Use Authorization: Bearer pyai_live_... (or pyai_test_...).
Body
Browser origins (scheme://host[:port]) the token may connect from. Required and non-empty — a browser token must be origin-locked. * is not allowed.
1["https://acme.com"]Token lifetime in seconds. Keep it short; a leaked token is worth seconds, not minutes.
1 <= x <= 600Optional opaque tag echoed back to your kb_endpoint and recorded on the call.
Response
Minted session token
"omni.session"
The ephemeral session token. Use as the WebSocket subprotocol pyai-key.<token>. Short-lived and origin-locked; safe to hand to the browser.
"pyai_live_sess_a1B2…"
Token expiry, Unix epoch milliseconds.
The Omni realtime WebSocket URL to connect to.
"wss://api.pyai.com/v1/omni?format=pcm16&rate=24000"
Echoed back when supplied on the request.