Skip to main content
POST
Upload Documents

Authorizations

Authorization
string
header
required

Your Nugen API key, sent as a Bearer token

Body

multipart/form-data

Multipart form to upload documents.

files
file[]
required

The document 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 documents

names
string[] | null

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

Response

Returns a list of document IDs.

Acknowledgement of uploaded documents, with their ids.

document_ids
string[]
required

List of unique document IDs for the uploaded documents. Use these IDs to track processing status, update categories, or download the documents.