API reference

Core endpoints for uploading documents and asking questions.

Sample docs page. Replace with your real API reference. For a richer layout, use the ApiReference.astro component in your docs pages.

Upload a document

POST /v1/documents

ParamTypeDescription
filefileThe PDF to upload (scanned files are OCR’d).
workspaceIdstringOptional workspace to group the document into.

Ask a question

POST /v1/ask

ParamTypeDescription
documentIdstringThe document (or workspaceId) to ask against.
questionstringThe natural-language question.
topKnumberHow many passages to ground the answer in (default 6).

Returns an answer string plus a citations array of { page, snippet }.