> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nugen.in/llms.txt
> Use this file to discover all available pages before exploring further.

# 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


**Returns:**

`list[str]` containing:

- List of unique IDs (strings) for tracking upload and processing status
- One ID is returned for each uploaded file
- Use these IDs to monitor processing progress

**Supported File Types:**
- Text-based files only

**File Size Limit:**

Maximum 100 MB per file


**Example Request:**

```
POST /api/v3/documents
Headers: {"Authorization": "Bearer <api_key>"}
Content-Type: multipart/form-data

Form Data:
  files: [report.txt, analysis.md]
  categories: ["financial", "2024-q1"]
```


**Example Response:**

```json
"document_ids":
[
  "01KKBB7NPTMXM12",
  "01KKBB7NPTJDK43"
]
```



## OpenAPI

````yaml https://api.nugen.in/openapi-public.json post /api/v3/documents/create
openapi: 3.1.0
info:
  title: Nugen Intelligence API
  description: 'Nugen Intelligence : Powering Specialized Intelligence At Scale'
  version: 25.4.20
servers: []
security: []
paths:
  /api/v3/documents/create:
    post:
      tags:
        - General
      summary: Upload Documents
      description: |-
        Upload multiple documents.

        **Request Body (multipart/form-data):**

        - `files`: List of files to upload (required)
        - `categories` (optional): List of category names to organize documents


        **Returns:**

        `list[str]` containing:

        - List of unique IDs (strings) for tracking upload and processing status
        - One ID is returned for each uploaded file
        - Use these IDs to monitor processing progress

        **Supported File Types:**
        - Text-based files only

        **File Size Limit:**

        Maximum 100 MB per file


        **Example Request:**

        ```
        POST /api/v3/documents
        Headers: {"Authorization": "Bearer <api_key>"}
        Content-Type: multipart/form-data

        Form Data:
          files: [report.txt, analysis.md]
          categories: ["financial", "2024-q1"]
        ```


        **Example Response:**

        ```json
        "document_ids":
        [
          "01KKBB7NPTMXM12",
          "01KKBB7NPTJDK43"
        ]
        ```
      operationId: documents_create
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_documents_create'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    Body_documents_create:
      properties:
        files:
          items:
            type: string
            format: binary
          type: array
          title: Files
          description: The document files to upload
        categories:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Categories
          description: Categories for the documents
      type: object
      required:
        - files
      title: Body_documents_create
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````