curl --request POST \
--url https://pria.praxislxp.com/api/ai/rtProxy/deepgram/sttSession \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"requestArgs": {
"selectedCourse": {
"course": {
"title": "<string>"
},
"assistant": {
"name": "<string>"
}
},
"assistantName": "<string>",
"courseTitle": "<string>",
"keyterms": [
"<string>"
]
}
}
'{
"provider": "deepgram",
"access_token": "<string>",
"expires_in": 123,
"wss_url": "wss://api.deepgram.com/v1/listen",
"model": "<string>",
"eot_threshold": 123,
"eot_timeout_ms": 123,
"eager_eot_threshold": 123,
"local_vad": {
"enabled": true,
"threshold_db": 123,
"onset_ms": 123,
"hangover_ms": 123,
"hysteresis_db": 123
},
"encoding": "linear16",
"sample_rate": 16000,
"keyterms": [
"<string>"
]
}Mint a Deepgram streaming STT session
Mints a short-lived Deepgram bearer token (/v1/auth/grant) plus the
WSS URL the browser should open. The long-lived account API key never
leaves the backend — the browser passes access_token via the WS
subprotocol and streams 16 kHz mono linear16 PCM directly to Deepgram.
The endpoint also resolves keyterm hints from requestArgs
(institution name/ainame are added automatically) so the streaming
STT is biased toward the conversation’s terminology.
Dev fallback: when DEEPGRAM_DEV_RAW_KEY=true, the raw account key is
returned directly (visible in the browser) and expires_in=0. Never
enable that mode in production.
curl --request POST \
--url https://pria.praxislxp.com/api/ai/rtProxy/deepgram/sttSession \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"requestArgs": {
"selectedCourse": {
"course": {
"title": "<string>"
},
"assistant": {
"name": "<string>"
}
},
"assistantName": "<string>",
"courseTitle": "<string>",
"keyterms": [
"<string>"
]
}
}
'{
"provider": "deepgram",
"access_token": "<string>",
"expires_in": 123,
"wss_url": "wss://api.deepgram.com/v1/listen",
"model": "<string>",
"eot_threshold": 123,
"eot_timeout_ms": 123,
"eager_eot_threshold": 123,
"local_vad": {
"enabled": true,
"threshold_db": 123,
"onset_ms": 123,
"hangover_ms": 123,
"hysteresis_db": 123
},
"encoding": "linear16",
"sample_rate": 16000,
"keyterms": [
"<string>"
]
}Authorizations
JWT token passed in x-access-token header
Body
All fields optional. The endpoint only mines requestArgs for
keyterm hints — anything else is ignored.
Realtime context echoed from the client. Used to derive Deepgram keyterm hints (assistant name, conversation title, explicit keyterms[]).
Show child attributes
Show child attributes
Response
STT session minted.
deepgram Short-lived Deepgram bearer token. The browser passes this via the WebSocket subprotocol when opening the WSS stream.
Token TTL in seconds. 0 in dev raw-key mode.
Deepgram listen WSS URL the client should connect to.
"wss://api.deepgram.com/v1/listen"
Deepgram STT model in use (institution-tuned).
End-of-turn confidence threshold.
End-of-turn timeout in ms.
Optional. Present only when speculative early-start is enabled (>0). Lower confidence at which Flux emits EagerEndOfTurn/TurnResumed so the client can start answering early.
Client-side energy-VAD config for always-on fast barge-in (cut the avatar on local speech onset instead of waiting for Deepgram StartOfTurn). Always present on Anam sessions; client-only — does not affect the WSS URL.
Show child attributes
Show child attributes
Fixed PCM encoding the client AudioWorklet emits.
linear16 Fixed sample rate (16 kHz mono int16).
16000 Resolved keyterm list — institution name/ainame plus the derived/explicit terms.
Was this page helpful?