curl --request POST \
--url https://pria.praxislxp.com/api/ai/rtProxy/turnPredict \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"phase": "listen",
"heard": "Can you book a meeting room for tomorrow morning",
"requestArgs": {
"conversationId": "65f0c0ffee0000000000abcd"
}
}
'import requests
url = "https://pria.praxislxp.com/api/ai/rtProxy/turnPredict"
payload = {
"phase": "listen",
"heard": "Can you book a meeting room for tomorrow morning",
"requestArgs": { "conversationId": "65f0c0ffee0000000000abcd" }
}
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({
phase: 'listen',
heard: 'Can you book a meeting room for tomorrow morning',
requestArgs: {conversationId: '65f0c0ffee0000000000abcd'}
})
};
fetch('https://pria.praxislxp.com/api/ai/rtProxy/turnPredict', 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/turnPredict",
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([
'phase' => 'listen',
'heard' => 'Can you book a meeting room for tomorrow morning',
'requestArgs' => [
'conversationId' => '65f0c0ffee0000000000abcd'
]
]),
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/turnPredict"
payload := strings.NewReader("{\n \"phase\": \"listen\",\n \"heard\": \"Can you book a meeting room for tomorrow morning\",\n \"requestArgs\": {\n \"conversationId\": \"65f0c0ffee0000000000abcd\"\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/turnPredict")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phase\": \"listen\",\n \"heard\": \"Can you book a meeting room for tomorrow morning\",\n \"requestArgs\": {\n \"conversationId\": \"65f0c0ffee0000000000abcd\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/ai/rtProxy/turnPredict")
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 \"phase\": \"listen\",\n \"heard\": \"Can you book a meeting room for tomorrow morning\",\n \"requestArgs\": {\n \"conversationId\": \"65f0c0ffee0000000000abcd\"\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"done": 0.91,
"lookup": {
"kind": "none",
"confidence": 0.88
},
"ms": 240
}Voice turn prediction check (is the speaker done, is it the same request, is it an interruption)
Asks the turn-prediction model one question about the words heard so far, so the
voice client can start answering before the speech-to-text end of turn. No credits
are used. The effective mode comes from the twin’s voice turn prediction setting and
the server switches; when it is off the answer is { ok:false, error:'off' }.
barge is answered only when barge-in prediction is enabled as well.
Phases: listen (is the speaker done; optionally which lookup the answer needs),
drift (would a reply to earlier still answer heard), end (done, and the same
question when earlier is set), barge (is the user taking the turn while the twin
speaks lastAssistant), react (how the speaking twin’s face and voice should react to
words that did not interrupt it; answered only when the session’s turn_predict.react
is set, else react-off), warm (opens the connection before the first check; no
heard; always answers { ok:true } at once).
Every failure (off, timeout, busy, rate) is a 200 with ok:false; only a
malformed body is a 400. The text is never logged or stored.
curl --request POST \
--url https://pria.praxislxp.com/api/ai/rtProxy/turnPredict \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"phase": "listen",
"heard": "Can you book a meeting room for tomorrow morning",
"requestArgs": {
"conversationId": "65f0c0ffee0000000000abcd"
}
}
'import requests
url = "https://pria.praxislxp.com/api/ai/rtProxy/turnPredict"
payload = {
"phase": "listen",
"heard": "Can you book a meeting room for tomorrow morning",
"requestArgs": { "conversationId": "65f0c0ffee0000000000abcd" }
}
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({
phase: 'listen',
heard: 'Can you book a meeting room for tomorrow morning',
requestArgs: {conversationId: '65f0c0ffee0000000000abcd'}
})
};
fetch('https://pria.praxislxp.com/api/ai/rtProxy/turnPredict', 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/turnPredict",
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([
'phase' => 'listen',
'heard' => 'Can you book a meeting room for tomorrow morning',
'requestArgs' => [
'conversationId' => '65f0c0ffee0000000000abcd'
]
]),
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/turnPredict"
payload := strings.NewReader("{\n \"phase\": \"listen\",\n \"heard\": \"Can you book a meeting room for tomorrow morning\",\n \"requestArgs\": {\n \"conversationId\": \"65f0c0ffee0000000000abcd\"\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/turnPredict")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phase\": \"listen\",\n \"heard\": \"Can you book a meeting room for tomorrow morning\",\n \"requestArgs\": {\n \"conversationId\": \"65f0c0ffee0000000000abcd\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/ai/rtProxy/turnPredict")
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 \"phase\": \"listen\",\n \"heard\": \"Can you book a meeting room for tomorrow morning\",\n \"requestArgs\": {\n \"conversationId\": \"65f0c0ffee0000000000abcd\"\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"done": 0.91,
"lookup": {
"kind": "none",
"confidence": 0.88
},
"ms": 240
}Authorizations
JWT token passed in x-access-token header
Body
listen, drift, end, barge, react, warm The words heard so far (capped at 2000 characters). Required for every phase except warm.
The text an earlier held answer was started for (drift and end).
What the twin said last, or is saying now for barge and react (capped at 600 characters).
^[A-Za-z0-9_-]{1,64}$Only the two fields that pick the conversation.
Show child attributes
Show child attributes
Response
The check's answer, or ok:false with an error.
Probability (0–1) that the speaker is done (listen, end).
Probability (0–1) that a reply to earlier still answers heard (drift, end).
Probability (0–1) that the user is taking the turn (barge).
How the speaking twin should react (react).
Show child attributes
Show child attributes
Show child attributes
Show child attributes
react-off: voice reactions are not on for this session (react only).
off, react-off, busy, rate, timeout, error, bad-input, bad-answer, bad-phase Was this page helpful?