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

# Upload File



## OpenAPI

````yaml post /file
openapi: 3.0.0
info:
  title: cozmox API
  description: Voice AI for developers.
  version: '1'
  contact: {}
servers:
  - description: Cozmox APIs
    url: https://api.cozmox.ai
  - url: https://api.cozmox.ai
security: []
tags: []
paths:
  /file:
    post:
      tags:
        - Files
      summary: Upload File
      operationId: FileController_create
      parameters: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateFileDTO'
      responses:
        '201':
          description: File uploaded successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/File'
        '400':
          description: Invalid file
      security:
        - bearer: []
components:
  schemas:
    CreateFileDTO:
      type: object
      properties:
        file:
          type: string
          description: This is the File you want to upload for use with the Knowledge Base.
          format: binary
      required:
        - file
    File:
      type: object
      properties:
        object:
          type: string
          enum:
            - file
        status:
          enum:
            - processing
            - done
            - failed
          type: string
        name:
          type: string
          description: This is the name of the file. This is just for your own reference.
          maxLength: 40
        originalName:
          type: string
        bytes:
          type: number
        purpose:
          type: string
        mimetype:
          type: string
        key:
          type: string
        path:
          type: string
        bucket:
          type: string
        url:
          type: string
        parsedTextUrl:
          type: string
        parsedTextBytes:
          type: number
        metadata:
          type: object
        id:
          type: string
          description: This is the unique identifier for the file.
        orgId:
          type: string
          description: This is the unique identifier for the org that this file belongs to.
        createdAt:
          format: date-time
          type: string
          description: This is the ISO 8601 date-time string of when the file was created.
        updatedAt:
          format: date-time
          type: string
          description: >-
            This is the ISO 8601 date-time string of when the file was last
            updated.
      required:
        - id
        - orgId
        - createdAt
        - updatedAt
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: Bearer
      type: http
      description: Retrieve your API Key from [Dashboard](dashboard.cozmox.ai).

````