Skip to main content
POST
Create realtime AI session

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Body

application/json

Provider, model, and voice are NOT accepted from the request — they are resolved server-side from the user's institution.rtModel setting. The client only needs to send requestArgs carrying the realtime context (assistant, course, user clock) so the server can build the right system prompt. An optional top-level token is accepted as an alternative to the Authorization / x-access-token headers for browser clients that cannot set custom headers.

token
string

Optional auth JWT — alternative to Authorization / x-access-token headers.

sdp
string

OpenAI GPT-Live only — the browser's WebRTC SDP offer (starts with v=, at most 64 KB). The server creates the GPT-Live session with it and returns the SDP answer; GPT-Live has no ephemeral browser key.

requestArgs
object

Realtime context bag merged into the user object before context build.

Response

Realtime session created successfully

OpenAI GPT-Live session (provider openai_live). GPT-Live only listens and speaks; the Digital Twin answers each request it hands off through /api/ai/rtProxy/voiceTurn.

provider
enum<string>
Available options:
openai_live
model
string
Example:

"gpt-live-1"

voice
string

The voice the session speaks with

sdp
string

WebRTC SDP answer to apply as the remote description

sessionId
string

GPT-Live session id — send it back with the conversation save so the voice minutes can be billed