Security enhancements to IP Vault and new Gemini 3.1 Flash Live STS model for Convo mode
curl --request POST \
--url https://pria.praxislxp.com/api/ai/personal-stream/qanda-stream \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"inputs": [
"What is machine learning?"
],
"requestArgs": {
"institutionPublicId": "f831501f-b645-481a-9cbb-331509aaf8c1",
"assistantId": "6856fa89cbafcff8d98680f5",
"selectedCourse": {
"course_id": 1750532703472,
"course_name": "AI Fundamentals"
},
"ragOnly": false,
"ragIgnore": false,
"userTimezone": "America/New_York"
}
}
'"data: {\"type\":\"connected\",\"message\":\"Stream connected\"}\n\ndata: {\"type\":\"stream\",\"prompt\":\"Machine\",\"delta\":\"Machine\"}\n\ndata: {\"type\":\"stream\",\"prompt\":\"Machine learning is\",\"delta\":\" learning is\"}\n\ndata: {\"type\":\"stream\",\"prompt\":\"Machine learning is a branch of AI...\",\"delta\":\" a branch of AI...\"}\n\ndata: {\"type\":\"complete\",\"success\":true,\"usage\":1234,\"outputs\":[\"Machine learning is a branch of AI...\"],\"model\":\"us.anthropic.claude-sonnet-4-5-20250929-v1:0\",\"cached\":0,\"completion\":42}\n\ndata: {\"type\":\"done\"}\n"Alternative to Socket.IO streaming - uses standard HTTP Server-Sent Events (SSE). Ideal for server-side integrations, SDKs, and environments where WebSockets aren’t available.
Returns text/event-stream; charset=utf-8 with SSE-formatted JSON chunks.
Each line is prefixed with data: followed by a JSON object and two newlines.
data: {"type":"connected","message":"Stream connected"}
data: {"type":"stream","prompt":"The capital","delta":"The capital"}
data: {"type":"stream","prompt":"The capital of France is Paris.","delta":" of France is Paris."}
data: {"type":"tool_call","call_id":"tooluse_abc123","name":"search_uploads","arguments":null,"displayInfo":{"icon":"search","label":"Searching documents"}}
data: {"type":"tool_result","call_id":"tooluse_abc123","name":"search_uploads","arguments":{"query":"France capital"},"response":"...","responseLength":512,"responseDurationMs":150,"success":true}
data: {"type":"complete","success":true,"usage":1234,"outputs":["The capital of France is Paris."],"model":"us.anthropic.claude-sonnet-4-5-20250929-v1:0","cached":0,"completion":42}
data: {"type":"done"}
| Type | Description | Key Fields |
|---|---|---|
connected | Stream established | message |
stream | Text chunk from AI | prompt (cumulative), delta (incremental) |
tool_call | Tool invocation started | call_id, name, arguments, displayInfo |
tool_result | Tool execution completed | call_id, name, response, success, responseDurationMs |
complete | Final response with metrics | success, usage, outputs, model, cached, completion |
error | Processing error | error.message, error.status |
done | Stream ended | (none) |
Content-Type: text/event-stream; charset=utf-8
Cache-Control: no-cache, no-transform
Connection: keep-alive
Content-Encoding: none
Transfer-Encoding: chunked
X-Accel-Buffering: no
Close the HTTP connection to cancel the request. The server will detect the disconnect and abort any in-progress AI generation.
curl --request POST \
--url https://pria.praxislxp.com/api/ai/personal-stream/qanda-stream \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"inputs": [
"What is machine learning?"
],
"requestArgs": {
"institutionPublicId": "f831501f-b645-481a-9cbb-331509aaf8c1",
"assistantId": "6856fa89cbafcff8d98680f5",
"selectedCourse": {
"course_id": 1750532703472,
"course_name": "AI Fundamentals"
},
"ragOnly": false,
"ragIgnore": false,
"userTimezone": "America/New_York"
}
}
'"data: {\"type\":\"connected\",\"message\":\"Stream connected\"}\n\ndata: {\"type\":\"stream\",\"prompt\":\"Machine\",\"delta\":\"Machine\"}\n\ndata: {\"type\":\"stream\",\"prompt\":\"Machine learning is\",\"delta\":\" learning is\"}\n\ndata: {\"type\":\"stream\",\"prompt\":\"Machine learning is a branch of AI...\",\"delta\":\" a branch of AI...\"}\n\ndata: {\"type\":\"complete\",\"success\":true,\"usage\":1234,\"outputs\":[\"Machine learning is a branch of AI...\"],\"model\":\"us.anthropic.claude-sonnet-4-5-20250929-v1:0\",\"cached\":0,\"completion\":42}\n\ndata: {\"type\":\"done\"}\n"Documentation Index
Fetch the complete documentation index at: https://docs.praxis-ai.com/llms.txt
Use this file to discover all available pages before exploring further.
JWT token passed in x-access-token header
SSE stream of AI response chunks
Server-Sent Event payload structure for HTTP streaming.
Each event is a JSON object sent as data: {json}\n\n.
The type field determines which other fields are present.
Event type indicator:
connected: Stream established successfullystream: AI-generated text chunk (cumulative + delta)tool_call: Tool/function invocation started (RAG, web search, etc.)tool_result: Tool/function execution completed with resultscomplete: Final response with usage metrics and full outputerror: Error occurred during processingdone: Stream terminated — no more events will followconnected, stream, tool_call, tool_result, complete, error, done Was this page helpful?