Add a document (file, URL, or text)
Knowledge Bases
Add a document (file, URL, or text)
Three ways to add content: a multipart file upload (pdf, docx, xlsx, txt, md, csv, html, json; 25MB max), a JSON { "url" } to fetch and parse, or a JSON { "text" } to paste content directly. The document registers as pending and is chunked + embedded asynchronously; poll its status until indexed. Requires the kb:manage scope.
POST
Add a document (file, URL, or text)
Authorizations
Use Authorization: Bearer pyai_live_... (or pyai_test_...).
Path Parameters
Response
Document registered (pending ingestion)
A knowledge base document and its ingestion state.
upload = file, url = fetched page, api = pasted text.
Available options:
upload, url, api Indexed chunk count (0 until indexed).
Available options:
pending, indexed, failed Human-readable failure/stall reason.
Unix ms.
Unix ms.