curl --request POST \
--url https://pria.praxislxp.com/api/ai/rtProxy/rtSession \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"token": "<string>",
"sdp": "<string>",
"requestArgs": {
"assistantId": "<string>",
"selectedCourse": {},
"userISODate": "2023-11-07T05:31:56Z",
"userTimezone": "<string>",
"socketId": "<string>"
}
}
'import requests
url = "https://pria.praxislxp.com/api/ai/rtProxy/rtSession"
payload = {
"token": "<string>",
"sdp": "<string>",
"requestArgs": {
"assistantId": "<string>",
"selectedCourse": {},
"userISODate": "2023-11-07T05:31:56Z",
"userTimezone": "<string>",
"socketId": "<string>"
}
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
token: '<string>',
sdp: '<string>',
requestArgs: {
assistantId: '<string>',
selectedCourse: {},
userISODate: '2023-11-07T05:31:56Z',
userTimezone: '<string>',
socketId: '<string>'
}
})
};
fetch('https://pria.praxislxp.com/api/ai/rtProxy/rtSession', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pria.praxislxp.com/api/ai/rtProxy/rtSession",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'token' => '<string>',
'sdp' => '<string>',
'requestArgs' => [
'assistantId' => '<string>',
'selectedCourse' => [
],
'userISODate' => '2023-11-07T05:31:56Z',
'userTimezone' => '<string>',
'socketId' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pria.praxislxp.com/api/ai/rtProxy/rtSession"
payload := strings.NewReader("{\n \"token\": \"<string>\",\n \"sdp\": \"<string>\",\n \"requestArgs\": {\n \"assistantId\": \"<string>\",\n \"selectedCourse\": {},\n \"userISODate\": \"2023-11-07T05:31:56Z\",\n \"userTimezone\": \"<string>\",\n \"socketId\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pria.praxislxp.com/api/ai/rtProxy/rtSession")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"<string>\",\n \"sdp\": \"<string>\",\n \"requestArgs\": {\n \"assistantId\": \"<string>\",\n \"selectedCourse\": {},\n \"userISODate\": \"2023-11-07T05:31:56Z\",\n \"userTimezone\": \"<string>\",\n \"socketId\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/ai/rtProxy/rtSession")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"<string>\",\n \"sdp\": \"<string>\",\n \"requestArgs\": {\n \"assistantId\": \"<string>\",\n \"selectedCourse\": {},\n \"userISODate\": \"2023-11-07T05:31:56Z\",\n \"userTimezone\": \"<string>\",\n \"socketId\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"provider": "openai_live",
"model": "gpt-live-1",
"voice": "<string>",
"sdp": "<string>",
"sessionId": "<string>"
}Create realtime AI session
Creates a new realtime AI session for voice/WebRTC communication.
Provider, model, and voice are resolved server-side from the user’s
institution rtModel setting (OpenAI / Google Gemini Live / xAI /
ElevenLabs). Returns either an ephemeral WebRTC key
(OpenAI / Gemini / xAI) or a signed-agent configuration (ElevenLabs).
curl --request POST \
--url https://pria.praxislxp.com/api/ai/rtProxy/rtSession \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"token": "<string>",
"sdp": "<string>",
"requestArgs": {
"assistantId": "<string>",
"selectedCourse": {},
"userISODate": "2023-11-07T05:31:56Z",
"userTimezone": "<string>",
"socketId": "<string>"
}
}
'import requests
url = "https://pria.praxislxp.com/api/ai/rtProxy/rtSession"
payload = {
"token": "<string>",
"sdp": "<string>",
"requestArgs": {
"assistantId": "<string>",
"selectedCourse": {},
"userISODate": "2023-11-07T05:31:56Z",
"userTimezone": "<string>",
"socketId": "<string>"
}
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
token: '<string>',
sdp: '<string>',
requestArgs: {
assistantId: '<string>',
selectedCourse: {},
userISODate: '2023-11-07T05:31:56Z',
userTimezone: '<string>',
socketId: '<string>'
}
})
};
fetch('https://pria.praxislxp.com/api/ai/rtProxy/rtSession', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pria.praxislxp.com/api/ai/rtProxy/rtSession",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'token' => '<string>',
'sdp' => '<string>',
'requestArgs' => [
'assistantId' => '<string>',
'selectedCourse' => [
],
'userISODate' => '2023-11-07T05:31:56Z',
'userTimezone' => '<string>',
'socketId' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pria.praxislxp.com/api/ai/rtProxy/rtSession"
payload := strings.NewReader("{\n \"token\": \"<string>\",\n \"sdp\": \"<string>\",\n \"requestArgs\": {\n \"assistantId\": \"<string>\",\n \"selectedCourse\": {},\n \"userISODate\": \"2023-11-07T05:31:56Z\",\n \"userTimezone\": \"<string>\",\n \"socketId\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pria.praxislxp.com/api/ai/rtProxy/rtSession")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"<string>\",\n \"sdp\": \"<string>\",\n \"requestArgs\": {\n \"assistantId\": \"<string>\",\n \"selectedCourse\": {},\n \"userISODate\": \"2023-11-07T05:31:56Z\",\n \"userTimezone\": \"<string>\",\n \"socketId\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/ai/rtProxy/rtSession")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"<string>\",\n \"sdp\": \"<string>\",\n \"requestArgs\": {\n \"assistantId\": \"<string>\",\n \"selectedCourse\": {},\n \"userISODate\": \"2023-11-07T05:31:56Z\",\n \"userTimezone\": \"<string>\",\n \"socketId\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"provider": "openai_live",
"model": "gpt-live-1",
"voice": "<string>",
"sdp": "<string>",
"sessionId": "<string>"
}Authorizations
JWT token passed in x-access-token header
Body
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.
Optional auth JWT — alternative to Authorization / x-access-token headers.
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.
Realtime context bag merged into the user object before context build.
Show child attributes
Show child attributes
Response
Realtime session created successfully
- Option 1
- Option 2
- Option 3
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.
openai_live "gpt-live-1"
The voice the session speaks with
WebRTC SDP answer to apply as the remote description
GPT-Live session id — send it back with the conversation save so the voice minutes can be billed
Was this page helpful?