Add a document
Add a document by inline `text`, a `url` to fetch, or a multipart file upload (PDF, DOCX, TXT, Markdown, HTML). Ingestion runs asynchronously; poll the document `status` until `ready`.
Add a document by inline text, a url to fetch, or a multipart file
upload (PDF, DOCX, TXT, Markdown, HTML). Ingestion runs asynchronously;
poll the document status until ready.
Authorization
TokenAuth Project API key as Token lb-sk_...
In: header
Path Parameters
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/knowledge/string/documents" \ -H "Content-Type: application/json" \ -d '{ "text": "Refunds within 30 days.", "title": "returns" }'{ "id": "string", "filename": "string", "source_type": "text", "status": "uploaded", "chunk_count": 0, "error": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Store a project secret POST POST
Envelope-encrypted at rest (AES-256-GCM). Reference it from a tool via `secret_ref` + `auth_header`; the value is injected server-side — the model never sees it. Returns 503 when the server has no `LIBRA_SECRET_KEY`.
Chat with a knowledge base POST POST
Grounded answer with citations over the knowledge base.