Upload flow
Uploads use a two-step presigned pattern so file bytes go straight to object storage, and processing begins automatically once the file lands.Processing starts automatically
Once the bytes land, the background pipeline begins on its own — no extra call needed.
The
upload_url is time-limited. Upload the file promptly after presigning; if the URL expires before you upload, request a new one.The processing pipeline
Once a file lands, it moves through a background pipeline that prepares it for grounded retrieval. Each stage runs on background workers, so large files process without blocking your integration.Parse
Text is extracted from the source. PDFs — including scanned documents via OCR — audio files (transcribed to text), and Office and structured documents are all supported.
Chunk
Content is split into content-aware chunks that respect the document’s structure, which improves retrieval quality.
Status values
Thestatus field tracks a document through ingestion:
| Status | Meaning |
|---|---|
pending_upload | Presigned; waiting for the file bytes to be uploaded. |
queued | Bytes received; queued for processing. |
processing | Moving through parse → summarize → chunk → embed → index. |
processed | Fully indexed and ready to query. |
failed | Processing did not complete. |
Other ingestion methods
Beyond file uploads, you can bring in web content and manage existing documents:Scrape a single URL
Scrape a single URL
POST /documents/upload-url fetches a URL and ingests its readable text as a document.Discover site URLs
Discover site URLs
POST /documents/upload-url-site discovers URLs from a site. It does not ingest those pages; submit each selected URL separately to POST /documents/upload-url.Reprocess
Reprocess
POST /documents/:id/reprocess runs a document through the pipeline again — useful after a failed status.Download
Download
GET /documents/:id/download returns a presigned URL to retrieve the original file.Delete
Delete
DELETE /documents/:id soft-removes the document from search and cleans up its stored bytes and index entries.Quotas
Uploads are checked against your tenant’s limits before they are accepted:- Document count — the number of documents the tenant may hold.
- Storage — the total bytes the tenant may store.
403 so you can surface the reason and prompt the user to free up space.
Endpoint summary
| Action | Method & path |
|---|---|
| Request an upload URL | POST /documents/presign |
| Upload file bytes | PUT <upload_url> |
| Check processing status | GET /documents/status?document_id=... |
| Scrape a single URL | POST /documents/upload-url |
| Discover site URLs | POST /documents/upload-url-site |
| Reprocess a document | POST /documents/:id/reprocess |
| Download original file | GET /documents/:id/download |
| Delete a document | DELETE /documents/:id |
Next steps
Documents in a knowledge base
How documents power the RAG corpus.
Documents API
Full request and response schemas.
Retrieval & grounding
How indexed chunks become cited answers.
Quickstart
Upload a document and run a chat end to end.