Skip to main content
Documents are the source material for grounded query. Provide exactly one of text, url, or file_base64 when ingesting. Ingest costs 5 credits.

Ingest a document

POST /v1/brain/documents
string
Raw text to ingest (exactly one of text / url / file_base64).
string
A URL to fetch and ingest (SSRF-guarded; private/local hosts blocked).
string
Base64-encoded file bytes (PDF/DOCX/XLSX/text).
string
Optional filename/label.
string
MIME type when uploading file_base64.
string
Provenance tag (e.g. upload, web, agent:researcher).
string
Target KB (defaults to the company’s default brain).
Large text, URLs, and files ingest asynchronously (status processingready/failed). Poll GET /v1/brain/documents/:id to refresh. Multipart upload of a file field is also supported.

Replace a document

PUT /v1/brain/documents/:id — replace/refresh content in place, keeping the document id. Same body as ingest; 5 credits.

List documents

GET /v1/brain/documents?knowledge_base_id=kb-uuid

Get a document

GET /v1/brain/documents/:id — returns the document with a refreshed processing status.

Delete a document

DELETE /v1/brain/documents/:id — permanent. Approval-gated for agent callers (returns 202 pending); returns a deletion receipt on completion.