The Documents API manages files in your cf0 research workspace. Uploaded files are stored in cf0’s document store and made available to the AI in your Lab sessions. You can also share documents across your organisation. All Documents endpoints are prefixed withDocumentation Index
Fetch the complete documentation index at: https://docs.cf0.ai/llms.txt
Use this file to discover all available pages before exploring further.
/api/documents.
Supported file types
| Extension | MIME type |
|---|---|
pdf | application/pdf |
docx | Word document |
xlsx | Excel spreadsheet |
csv | text/csv |
pptx | PowerPoint presentation |
png, jpg, jpeg | Images |
txt | Plain text |
md | Markdown |
html | HTML |
Upload a document
multipart/form-data.
Scanned PDFs are automatically queued for OCR processing after upload. The
status field in the response reflects the current processing state.Form fields
The file to upload.
Optional entity name or ticker to associate the document with (e.g.
"NVDA").Response
Upload returns immediately with a job handle — the actual ingestion (text extraction, OCR, indexing) runs asynchronously. PollGET /api/documents/{doc_id}/status until status: "ready" before using the document in Lab.
Always
true if the upload was accepted.Document ID. Use this to poll status, fetch content, or reference the document in Lab.
Identifier for the async ingestion workflow.
Identifier for this specific workflow run.
Poll status
status is "ready" (or "failed").
Document ID.
"queued", "running", "ready", or "failed".Original filename.
Detected file extension (available once status is
"ready").Failure reason (only present when status is
"failed").This is a breaking change from earlier API versions, which returned the full document object synchronously. Clients on the old contract (
{ id, filename, file_type, ... }) need to switch to { ok, doc_id, ... } plus polling.List documents
Response
Array of document objects. Each includes:
id— document IDfilename— original filenamefile_type— file extensionsize_bytes— file size in bytesstatus—"ready","needs_ocr", or"ocr_running"created_at— upload timestamppage_count— page count (PDF only)sheet_names— sheet names (XLSX only)
Search documents
Query parameters
Search query. Minimum 1 character.
Get document content (preview)
- CSV / XLSX: returns structured
tabledata withcolumnsandrows - TXT / MD / HTML: returns raw
contentstring - PDF / other: returns any extracted text stored at ingest time
Response
Document ID.
Filename.
File type.
Extracted text content (non-tabular formats).
Structured table data for CSV/XLSX. Contains a
sheets array, each with name, columns, and rows. Capped at 500 data rows per sheet.Download raw file
Content-Type. Use this for rendering PDFs in a viewer or displaying images.
The response includes:
Content-Type— the detected MIME typeContent-Disposition: inline; filename="..."— for direct browser displayCache-Control: private, max-age=3600
List documents for an entity
Delete a document
true if the document was deleted.Shared documents
cf0 supports an org-level shared document library. Members can request to share their personal documents with the organisation; admins approve or deny these requests.List shared documents
Filter by tag.
Request sharing
doc_id as a form field.
List your share requests
Admin: list pending requests
Admin: approve a request
Admin: deny a request
deny_reason form field.
Admin: upload directly to shared
multipart/form-data with file and optional tags (comma-separated string).

