Skip to main content
POST
Add Knowledge

Authorizations

Authorization
string
header
required

Your Nugen API key, sent as a Bearer token

Body

multipart/form-data

Multipart form to upload knowledge sources.

files
file[]
required

The knowledge files to upload. Plain text files, each at least 500 words, except training dataset JSONL files. If any file is shorter, the whole upload is refused with a 400 naming each short file.

categories
string[] | null

Categories for the knowledge items

names
string[] | null

Display names for the knowledge items, matched to files by position. Defaults to each document id if omitted.

Response

Returns the document ids of the knowledge you added.

Acknowledgement of added knowledge, with its document ids.

document_ids
string[]
required

List of unique document IDs, one per knowledge item added. Use these IDs to track processing status, update categories, or download the files.

duplicates
DuplicateKnowledgeError · object[]

Files that were already uploaded. Their existing document_id is included in document_ids.