Skip to main content
POST
Mint a hosted widget voice session

Headers

Origin
string<uri>
required

Path Parameters

publicId
string
required
Pattern: ^wdgt_[A-Za-z0-9_-]{32,64}$

Response

Short-lived widget session

object
string
Example:

"omni.session"

token
string

The ephemeral session token. Use as the WebSocket subprotocol pyai-key.<token>. Short-lived and origin-locked; safe to hand to the browser.

Example:

"pyai_live_sess_a1B2…"

expires_at
integer

Token expiry, Unix epoch milliseconds.

url
string

The Omni realtime WebSocket URL to connect to.

Example:

"wss://api.pyai.com/v1/omni?format=pcm16&rate=24000"

session_label
string | null

Echoed back when supplied on the request.