Quickstart
From zero to a cited answer in five minutes.
1. Get an API key
Create a key from the dashboard, then export it:
bash
export API_KEY="vt_live_..."2. Ingest a document
bash
curl -X POST https://api.veritas.example.com/v1/ingest \
-H "Authorization: Bearer $API_KEY" \
-F "file=@bank-policy.pdf"The response includes a job_id. The pipeline parses the PDF (running OCR on
scanned pages), chunks it, embeds every chunk, and writes to the vector index.
Most documents are searchable within seconds.
3. Ask a question
bash
curl -N -X POST https://api.veritas.example.com/v1/chat \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"question": "What is the minimum balance?"}'The stream sends a [SOURCES] frame first — the retrieved chunks with file,
page, and score — then one frame per token, then [DONE]. Render citations
immediately; the answer's [1] markers index into that sources array.
What just happened
- Your question was embedded and searched against both the vector index and a BM25 index in parallel
- The two rankings were fused with Reciprocal Rank Fusion
- A cross-encoder reranked the fused candidates down to the top 5
- The LLM generated strictly from those chunks, citing as it went
Next: understand how ingestion works, or jump to the API Reference.