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.astrocomponent in your docs pages.
Upload a document
POST /v1/documents
| Param | Type | Description |
|---|---|---|
file | file | The PDF to upload (scanned files are OCR’d). |
workspaceId | string | Optional workspace to group the document into. |
Ask a question
POST /v1/ask
| Param | Type | Description |
|---|---|---|
documentId | string | The document (or workspaceId) to ask against. |
question | string | The natural-language question. |
topK | number | How many passages to ground the answer in (default 6). |
Returns an answer string plus a citations array of { page, snippet }.