Creates a knowledge base. TEXT and JSON sources accept inline content. FILE sources require filename, mimeType, and base64-encoded contentBase64 — the file is decoded server-side, stored in S3, and (for PDFs) text-extracted inline before the response returns.
Documentation Index
Fetch the complete documentation index at: https://docs.roark.ai/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Input for creating a knowledge base. See sourceType for which fields are required.
Customer-facing name. Unique within the project. Required.
1 - 120How the knowledge base content was provided. TEXT/JSON are stored as-is; FILE was uploaded and its text content extracted (PDF → text).
TEXT, FILE, JSON Optional short blurb shown in pickers.
500For TEXT: raw markdown/text. For JSON: a JSON string (validated server-side and re-formatted with stable whitespace). Required for TEXT and JSON; omit for FILE.
For FILE: customer-supplied filename (informational only — used for download links).
1 - 255For FILE: mime type of the uploaded file. Only application/pdf, text/plain, and text/markdown are accepted.
application/pdf, text/plain, text/markdown For FILE: base64-encoded file bytes. Required for FILE. Max 10 MB after decoding. PDFs are text-extracted server-side; image-only PDFs are rejected.
The created knowledge base.
A customer-uploaded reference document attached to custom metrics as ground truth at evaluation time.