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

# Create Files

> Create a new file. If no ID is provided, a UUID will be generated.

<Warning>
  If you are not adding a web address, you must pass the key returned from the
  [`/files/upload`](/api-reference/files/upload) endpoint to the `key` param in
  the `/files/create` endpoint or file processing will fail.
</Warning>


## OpenAPI

````yaml POST /files/create
openapi: 3.1.0
info:
  title: duohub Retriever API
  description: >-
    Retrieve assisted or non-assisted memory from a duohub knowledge graph. For
    best performance, use the official `duohub` Python package.
  version: 1.0.0
servers:
  - url: https://api.duohub.ai
security:
  - APIKeyHeader: []
paths:
  /files/create:
    post:
      tags:
        - Files
      summary: Create File
      description: Create a new file. If no ID is provided, a UUID will be generated.
      operationId: createFile
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                id:
                  type: string
                  description: >-
                    Optional unique identifier for the file. If not provided, a
                    UUID will be generated.
                name:
                  type: string
                  description: Name of the file
                key:
                  type: string
                  description: Storage key for the file
                externalURI:
                  type: string
                  description: External URI for the file
                fileType:
                  $ref: '#/components/schemas/FileType'
                  description: Type of the file
              example:
                name: meeting_recording.mp3
                key: raw/meeting_recording.mp3
                external_uri: https://example.com/meeting_recording.mp3
                fileType: audio
      responses:
        '201':
          description: File created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        description: File unique identifier
                      name:
                        type: string
                      extension:
                        type: string
                      fileType:
                        type: string
                      category:
                        type: string
                      bronzeKey:
                        type: string
                      organisationID:
                        type: string
                      externalURI:
                        type: string
                      numSpeakers:
                        type: integer
                      originRegion:
                        type: string
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                required:
                  - status
                  - data
components:
  schemas:
    FileType:
      type: string
      enum:
        - website
        - sitemap
        - website_bulk
        - document
        - text
        - image
        - audio
        - video
        - other
      description: Enum representing the specific type of a file in the app
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'Your duohub API key. Type: str'

````