OpenAI-compatible realtime session (WebSocket)
The OpenAI Realtime-compatible WebSocket, served by the Omni engine. If you have code written against OpenAI’s Realtime API, repoint it here: change the base URL to wss://api.pyai.com/v1/realtime?model=pyai-omni-realtime and keep your session events.
Building something new? Prefer the native /v1/omni endpoint, it exposes the full Omni frame catalog (configure, tools, call control) without the compatibility shim.
Requires the omni:session scope; the session is authorized by your key’s org, there is nothing to create first. An optional session_label (alias: agent_id) is an opaque tag echoed to your own knowledge endpoint.
Auth: browsers can’t set Authorization on a WebSocket, so send the key as a subprotocol: Sec-WebSocket-Protocol: pyai-key.<API_KEY> (server clients may use ?api_key= / ?access_token= instead).
Authorizations
Use Authorization: Bearer pyai_live_... (or pyai_test_...).
Query Parameters
Realtime model. pyai-omni-realtime (Omni, agentic voice) is the default and the model served on this surface.
pyai-omni-realtime Omni only. Optional opaque tag echoed to your own kb_endpoint (PyAI stores no per-agent state). Nothing to pre-create; the session is authorized by your key's org.
Omni only. Deprecated alias for session_label; prefer session_label. If both are present, session_label wins.
Response
Switching Protocols, the duplex WebSocket is open.