Documents
Upload Documents
Upload multiple documents.
Request Body (multipart/form-data):
- files: List of files to upload (required)
- categories (optional): List of category names to organize documents
- names (optional): List of display names, matched to files by position
Returns:
- documents: One unique document id per uploaded file, for status polling and later use
Supported File Types:
- Text-based files only
- Each document needs at least 500 words; training dataset JSONL files are exempt. If any file is shorter, the whole upload is refused with 400 naming each short file
Editions:
The developer edition accepts plain text files only. PDF and other formats are available on the enterprise edition, which also accepts cloud storage URIs (s3://, gs://, oci://, abfss://) as the data source.
File Size Limit:
Maximum 100 MB per file
Example Request:
POST /api/v3/documents/create
Headers: {"Authorization": "Bearer <api_key>"}
Content-Type: multipart/form-data
Form Data:
files: [report.txt, analysis.md]
categories: ["financial", "2024-q1"]
Example Response:
{"document_ids": ["01KKBB7NPTMXM12", "01KKBB7NPTJDK43"]}
Processing:
Uploads are processed asynchronously. Poll GET /api/v3/documents/{id}/status until READY before using a document id elsewhere. Requires organisation membership.
post/api/v3/documents/create
Request
- Base URLhttps://api.nugen.in
- AuthHTTP bearer
Request body multipart/form-data
Response
Returns a list of document IDs.
Example response
{
"document_ids": [
"document_01k4x9m2p7q3r5s8"
]
}Changes
No recorded changes to this operation across all 1 revision of this API.