Skip to main content
POST
/
api
/
ai
/
chat
/
completions
OpenAI-compatible Chat Completions endpoint (inbound integration)
curl --request POST \
  --url https://pria.praxislxp.com/api/ai/chat/completions \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <x-access-token>' \
  --data '
{
  "messages": [
    {
      "role": "system",
      "content": "<string>"
    }
  ],
  "model": "pria",
  "stream": true
}
'
"data: {\"id\":\"chatcmpl-1735...\",\"object\":\"chat.completion.chunk\",\"created\":1735000000,\"model\":\"pria\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"chatcmpl-1735...\",\"object\":\"chat.completion.chunk\",\"created\":1735000000,\"model\":\"pria\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"Hello\"},\"finish_reason\":null,\"logprobs\":null}]}\n\ndata: [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.

Headers

x-access-token
string
required

Praxis JWT

x-praxis-institution-public-id
string

Public ID of the institution context (optional, defaults to user's primary institution)

x-praxis-conversation-id
string

Conversation/course ID

x-praxis-assistant-id
string

Assistant ObjectId (24-char hex)

x-praxis-timezone
string

IANA timezone string (e.g. "America/New_York") for date-aware prompts

Body

application/json
messages
object[]
required

OpenAI-format messages array. The last user message is processed.

model
string

Ignored — the effective model is determined by institution.chatCompletionModel (when set) or the regular conversation cascade.

Example:

"pria"

stream
boolean

Required to be true. The endpoint always streams.

Example:

true

Response

SSE stream of OpenAI-format completion chunks. Terminated with a final data: [DONE] line.

The response is of type string.

Example:

"data: {\"id\":\"chatcmpl-1735...\",\"object\":\"chat.completion.chunk\",\"created\":1735000000,\"model\":\"pria\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"chatcmpl-1735...\",\"object\":\"chat.completion.chunk\",\"created\":1735000000,\"model\":\"pria\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"Hello\"},\"finish_reason\":null,\"logprobs\":null}]}\n\ndata: [DONE]\n"