Skip to main content
POST
/
api
/
ai
/
personal
/
qanda
Process personal Q&A requests with AI assistant
curl --request POST \
  --url https://pria.praxislxp.com/api/ai/personal/qanda \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": 1750660464754,
  "requestArgs": {
    "userISODate": "2025-06-23T06:34:24.754Z",
    "userTimezone": "Indian/Mauritius",
    "userGPSCoordinates": {
      "accuracy": 21126.837004634195,
      "latitude": -21.282816,
      "longitude": 55.4139648,
      "altitude": null,
      "altitudeAccuracy": null,
      "heading": null,
      "speed": null
    },
    "socketId": "DhXE7OVjCtfUmDFTAAAB",
    "selectedCourse": {
      "course_id": 1750532703472,
      "course_name": "SwaggerAnnotation Generator Saturday, Jun 21, 2025",
      "assistant": {
        "_id": "6856fa89cbafcff8d98680f5",
        "name": "SwaggerAnnotation Generator",
        "picture_url": ""
      },
      "history_count": 21,
      "last_dialogue_date": "2025-06-23T06:34:12.779Z"
    },
    "ragOnly": false
  },
  "inputs": [
    "hi"
  ],
  "outputs": []
}'
{
  "success": true,
  "streamingFailed": true,
  "outputs": [
    "Hello! 👋 I'm the SwaggerAnnotation Generator assistant..."
  ],
  "usage": 20287,
  "credits": 1244,
  "creditsUsed": 7083,
  "totalLength": 20287,
  "totalCredits": 3,
  "query_duration_ms": 11088,
  "model": "us.anthropic.claude-sonnet-4-20250514-v1:0"
}

Authorizations

Authorization
string
header
required

JWT token passed in x-access-token header

Body

application/json
id
number
required

Request unique identifier

requestArgs
object
required
inputs
string[]
required

Array of user input messages

outputs
string[]
required

Array of AI response messages

Response

Successful AI response with conversation data

success
boolean

Whether the request was successful

streamingFailed
boolean

Whether streaming response failed

outputs
string[]

AI generated responses

usage
number

Total tokens used

credits
number

Credits consumed for this request

creditsUsed
number

Total credits used by user

totalLength
number

Total response length

totalCredits
number

Total credits available

query_duration_ms
number

Query processing time in milliseconds

requestArgs
object
model
string

AI model used for processing

I