curl --request POST \
--url https://pria.praxislxp.com/api/ai/personal/qanda \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"id": 1750660464754,
"requestArgs": {
"userISODate": "2025-06-23T06:34:24.754Z",
"userTimezone": "America/New_York",
"socketId": "DhXE7OVjCtfUmDFTAAAB",
"institutionPublicId": "f831501f-b645-481a-9cbb-331509aaf8c1",
"assistantId": "6856fa89cbafcff8d98680f5",
"selectedCourse": {
"course_id": 1750532703472,
"course_name": "Research Discussion",
"assistant": {
"_id": "6856fa89cbafcff8d98680f5"
}
},
"ragOnly": false,
"ragIgnore": false
},
"inputs": [
"What is machine learning?"
],
"outputs": []
}
'import requests
url = "https://pria.praxislxp.com/api/ai/personal/qanda"
payload = {
"id": 1750660464754,
"requestArgs": {
"userISODate": "2025-06-23T06:34:24.754Z",
"userTimezone": "America/New_York",
"socketId": "DhXE7OVjCtfUmDFTAAAB",
"institutionPublicId": "f831501f-b645-481a-9cbb-331509aaf8c1",
"assistantId": "6856fa89cbafcff8d98680f5",
"selectedCourse": {
"course_id": 1750532703472,
"course_name": "Research Discussion",
"assistant": { "_id": "6856fa89cbafcff8d98680f5" }
},
"ragOnly": False,
"ragIgnore": False
},
"inputs": ["What is machine learning?"],
"outputs": []
}
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({
id: 1750660464754,
requestArgs: {
userISODate: '2025-06-23T06:34:24.754Z',
userTimezone: 'America/New_York',
socketId: 'DhXE7OVjCtfUmDFTAAAB',
institutionPublicId: 'f831501f-b645-481a-9cbb-331509aaf8c1',
assistantId: '6856fa89cbafcff8d98680f5',
selectedCourse: {
course_id: 1750532703472,
course_name: 'Research Discussion',
assistant: {_id: '6856fa89cbafcff8d98680f5'}
},
ragOnly: false,
ragIgnore: false
},
inputs: ['What is machine learning?'],
outputs: []
})
};
fetch('https://pria.praxislxp.com/api/ai/personal/qanda', 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/personal/qanda",
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([
'id' => 1750660464754,
'requestArgs' => [
'userISODate' => '2025-06-23T06:34:24.754Z',
'userTimezone' => 'America/New_York',
'socketId' => 'DhXE7OVjCtfUmDFTAAAB',
'institutionPublicId' => 'f831501f-b645-481a-9cbb-331509aaf8c1',
'assistantId' => '6856fa89cbafcff8d98680f5',
'selectedCourse' => [
'course_id' => 1750532703472,
'course_name' => 'Research Discussion',
'assistant' => [
'_id' => '6856fa89cbafcff8d98680f5'
]
],
'ragOnly' => false,
'ragIgnore' => false
],
'inputs' => [
'What is machine learning?'
],
'outputs' => [
]
]),
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/personal/qanda"
payload := strings.NewReader("{\n \"id\": 1750660464754,\n \"requestArgs\": {\n \"userISODate\": \"2025-06-23T06:34:24.754Z\",\n \"userTimezone\": \"America/New_York\",\n \"socketId\": \"DhXE7OVjCtfUmDFTAAAB\",\n \"institutionPublicId\": \"f831501f-b645-481a-9cbb-331509aaf8c1\",\n \"assistantId\": \"6856fa89cbafcff8d98680f5\",\n \"selectedCourse\": {\n \"course_id\": 1750532703472,\n \"course_name\": \"Research Discussion\",\n \"assistant\": {\n \"_id\": \"6856fa89cbafcff8d98680f5\"\n }\n },\n \"ragOnly\": false,\n \"ragIgnore\": false\n },\n \"inputs\": [\n \"What is machine learning?\"\n ],\n \"outputs\": []\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/personal/qanda")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1750660464754,\n \"requestArgs\": {\n \"userISODate\": \"2025-06-23T06:34:24.754Z\",\n \"userTimezone\": \"America/New_York\",\n \"socketId\": \"DhXE7OVjCtfUmDFTAAAB\",\n \"institutionPublicId\": \"f831501f-b645-481a-9cbb-331509aaf8c1\",\n \"assistantId\": \"6856fa89cbafcff8d98680f5\",\n \"selectedCourse\": {\n \"course_id\": 1750532703472,\n \"course_name\": \"Research Discussion\",\n \"assistant\": {\n \"_id\": \"6856fa89cbafcff8d98680f5\"\n }\n },\n \"ragOnly\": false,\n \"ragIgnore\": false\n },\n \"inputs\": [\n \"What is machine learning?\"\n ],\n \"outputs\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/ai/personal/qanda")
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 \"id\": 1750660464754,\n \"requestArgs\": {\n \"userISODate\": \"2025-06-23T06:34:24.754Z\",\n \"userTimezone\": \"America/New_York\",\n \"socketId\": \"DhXE7OVjCtfUmDFTAAAB\",\n \"institutionPublicId\": \"f831501f-b645-481a-9cbb-331509aaf8c1\",\n \"assistantId\": \"6856fa89cbafcff8d98680f5\",\n \"selectedCourse\": {\n \"course_id\": 1750532703472,\n \"course_name\": \"Research Discussion\",\n \"assistant\": {\n \"_id\": \"6856fa89cbafcff8d98680f5\"\n }\n },\n \"ragOnly\": false,\n \"ragIgnore\": false\n },\n \"inputs\": [\n \"What is machine learning?\"\n ],\n \"outputs\": []\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"streamingFailed": false,
"outputs": [
"Machine learning is a subset of artificial intelligence..."
],
"usage": 1234,
"credits": 5,
"query_duration_ms": 2500,
"model": "gpt-4o"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}Send a message to the AI assistant
Processes conversational AI requests with full context awareness including:
- User location and timezone
- Conversation history (via selectedCourse)
- Assistant personality and instructions
- RAG (Retrieval-Augmented Generation) from uploaded documents
Streaming: For real-time response streaming, include a valid socketId in requestArgs.
The AI will stream chunks via Socket.IO to the RECEIVE_STREAM event.
Without Streaming: If socketId is omitted, the full response is returned synchronously.
curl --request POST \
--url https://pria.praxislxp.com/api/ai/personal/qanda \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"id": 1750660464754,
"requestArgs": {
"userISODate": "2025-06-23T06:34:24.754Z",
"userTimezone": "America/New_York",
"socketId": "DhXE7OVjCtfUmDFTAAAB",
"institutionPublicId": "f831501f-b645-481a-9cbb-331509aaf8c1",
"assistantId": "6856fa89cbafcff8d98680f5",
"selectedCourse": {
"course_id": 1750532703472,
"course_name": "Research Discussion",
"assistant": {
"_id": "6856fa89cbafcff8d98680f5"
}
},
"ragOnly": false,
"ragIgnore": false
},
"inputs": [
"What is machine learning?"
],
"outputs": []
}
'import requests
url = "https://pria.praxislxp.com/api/ai/personal/qanda"
payload = {
"id": 1750660464754,
"requestArgs": {
"userISODate": "2025-06-23T06:34:24.754Z",
"userTimezone": "America/New_York",
"socketId": "DhXE7OVjCtfUmDFTAAAB",
"institutionPublicId": "f831501f-b645-481a-9cbb-331509aaf8c1",
"assistantId": "6856fa89cbafcff8d98680f5",
"selectedCourse": {
"course_id": 1750532703472,
"course_name": "Research Discussion",
"assistant": { "_id": "6856fa89cbafcff8d98680f5" }
},
"ragOnly": False,
"ragIgnore": False
},
"inputs": ["What is machine learning?"],
"outputs": []
}
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({
id: 1750660464754,
requestArgs: {
userISODate: '2025-06-23T06:34:24.754Z',
userTimezone: 'America/New_York',
socketId: 'DhXE7OVjCtfUmDFTAAAB',
institutionPublicId: 'f831501f-b645-481a-9cbb-331509aaf8c1',
assistantId: '6856fa89cbafcff8d98680f5',
selectedCourse: {
course_id: 1750532703472,
course_name: 'Research Discussion',
assistant: {_id: '6856fa89cbafcff8d98680f5'}
},
ragOnly: false,
ragIgnore: false
},
inputs: ['What is machine learning?'],
outputs: []
})
};
fetch('https://pria.praxislxp.com/api/ai/personal/qanda', 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/personal/qanda",
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([
'id' => 1750660464754,
'requestArgs' => [
'userISODate' => '2025-06-23T06:34:24.754Z',
'userTimezone' => 'America/New_York',
'socketId' => 'DhXE7OVjCtfUmDFTAAAB',
'institutionPublicId' => 'f831501f-b645-481a-9cbb-331509aaf8c1',
'assistantId' => '6856fa89cbafcff8d98680f5',
'selectedCourse' => [
'course_id' => 1750532703472,
'course_name' => 'Research Discussion',
'assistant' => [
'_id' => '6856fa89cbafcff8d98680f5'
]
],
'ragOnly' => false,
'ragIgnore' => false
],
'inputs' => [
'What is machine learning?'
],
'outputs' => [
]
]),
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/personal/qanda"
payload := strings.NewReader("{\n \"id\": 1750660464754,\n \"requestArgs\": {\n \"userISODate\": \"2025-06-23T06:34:24.754Z\",\n \"userTimezone\": \"America/New_York\",\n \"socketId\": \"DhXE7OVjCtfUmDFTAAAB\",\n \"institutionPublicId\": \"f831501f-b645-481a-9cbb-331509aaf8c1\",\n \"assistantId\": \"6856fa89cbafcff8d98680f5\",\n \"selectedCourse\": {\n \"course_id\": 1750532703472,\n \"course_name\": \"Research Discussion\",\n \"assistant\": {\n \"_id\": \"6856fa89cbafcff8d98680f5\"\n }\n },\n \"ragOnly\": false,\n \"ragIgnore\": false\n },\n \"inputs\": [\n \"What is machine learning?\"\n ],\n \"outputs\": []\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/personal/qanda")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 1750660464754,\n \"requestArgs\": {\n \"userISODate\": \"2025-06-23T06:34:24.754Z\",\n \"userTimezone\": \"America/New_York\",\n \"socketId\": \"DhXE7OVjCtfUmDFTAAAB\",\n \"institutionPublicId\": \"f831501f-b645-481a-9cbb-331509aaf8c1\",\n \"assistantId\": \"6856fa89cbafcff8d98680f5\",\n \"selectedCourse\": {\n \"course_id\": 1750532703472,\n \"course_name\": \"Research Discussion\",\n \"assistant\": {\n \"_id\": \"6856fa89cbafcff8d98680f5\"\n }\n },\n \"ragOnly\": false,\n \"ragIgnore\": false\n },\n \"inputs\": [\n \"What is machine learning?\"\n ],\n \"outputs\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/ai/personal/qanda")
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 \"id\": 1750660464754,\n \"requestArgs\": {\n \"userISODate\": \"2025-06-23T06:34:24.754Z\",\n \"userTimezone\": \"America/New_York\",\n \"socketId\": \"DhXE7OVjCtfUmDFTAAAB\",\n \"institutionPublicId\": \"f831501f-b645-481a-9cbb-331509aaf8c1\",\n \"assistantId\": \"6856fa89cbafcff8d98680f5\",\n \"selectedCourse\": {\n \"course_id\": 1750532703472,\n \"course_name\": \"Research Discussion\",\n \"assistant\": {\n \"_id\": \"6856fa89cbafcff8d98680f5\"\n }\n },\n \"ragOnly\": false,\n \"ragIgnore\": false\n },\n \"inputs\": [\n \"What is machine learning?\"\n ],\n \"outputs\": []\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"streamingFailed": false,
"outputs": [
"Machine learning is a subset of artificial intelligence..."
],
"usage": 1234,
"credits": 5,
"query_duration_ms": 2500,
"model": "gpt-4o"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}Authorizations
JWT token passed in x-access-token header
Body
Request payload for AI Q&A conversation
User messages to send to the AI
["What is machine learning?"]
Client-generated request identifier (epoch timestamp)
1750660464754
Context arguments for AI conversation requests
Show child attributes
Show child attributes
Previous AI responses (for context continuity)
[]
Response
AI response generated successfully
Response from AI Q&A conversation
Whether the request completed successfully
True if Socket.IO streaming failed (response still contains full output)
Error message if streaming failed
AI-generated response messages
Total tokens consumed (input + output)
Credits consumed for this request
User's total credits consumed
User's remaining credit balance
Total processing time in milliseconds
AI model identifier used for generation
"gpt-4o"
Was this page helpful?