Skip to content
Veritas AI

API Reference

Five endpoints cover the whole pipeline: ingest documents, stream grounded answers, and inspect your collections. Every example is copy-paste ready.

POST/v1/chat

Streams server-sent events: a [SOURCES] frame with the retrieved chunks first, then one frame per token, then [DONE]. Newlines inside tokens arrive escaped as \n.

Request

{
  "question": "What is the minimum balance?",
  "collection": "bank-policy",
  "top_k": 5,
  "retrieval_mode": "hybrid"
}

Response

data: [SOURCES] [{"file":"bank-policy.pdf","page":4,"score":0.92}]

data: The minimum balance

data:  for a standard savings account is $300 [1].

data: [DONE]