Skip to main content
GET
/
v1
/
realtime
Open a realtime duplex session (WebSocket)
curl --request GET \
  --url https://api.pyai.com/v1/realtime \
  --header 'Authorization: Bearer <token>'
{
  "error": {
    "message": "<string>",
    "type": "<string>",
    "param": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Use Authorization: Bearer pyai_live_... (or pyai_test_...).

Query Parameters

model
enum<string>
default:pyai-omni-realtime
required

Realtime model. pyai-omni-realtime (default) enables the agent layer; pyai-flow-realtime is the retired legacy Flow engine.

Available options:
pyai-omni-realtime,
pyai-flow-realtime
session_label
string

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.

agent_id
string

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.