> ## 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.

# List Files

> List all files with pagination support and optional filtering by file type and category



## OpenAPI

````yaml GET /files/list
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/list:
    get:
      tags:
        - Files
      summary: List Files
      description: >-
        List all files with pagination support and optional filtering by file
        type and category
      operationId: listFiles
      parameters:
        - name: category
          in: query
          required: false
          description: Filter files by category
          schema:
            type: string
            enum:
              - audio
              - video
              - web
              - document
              - other
              - all
            description: Category of the file
        - name: limit
          in: query
          required: false
          description: Maximum number of files to return
          schema:
            type: integer
            default: 10
            minimum: 1
            maximum: 100
        - name: nextToken
          in: query
          required: false
          description: Token for getting the next page of results
          schema:
            type: string
        - name: previousToken
          in: query
          required: false
          description: Token for getting the previous page of results
          schema:
            type: string
      responses:
        '200':
          description: Files retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  files:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: File unique identifier
                        name:
                          type: string
                          description: Name of the file
                        extension:
                          type: string
                          description: File extension
                        fileType:
                          type: string
                          description: Type of the file
                        category:
                          type: string
                          description: File category
                        bronzeKey:
                          type: string
                          description: Bronze storage key
                        userID:
                          type: string
                          description: User ID
                        length:
                          type: number
                          description: Length of the file
                        size:
                          type: number
                          description: Size of the file
                        tokens:
                          type: integer
                          description: Number of tokens
                        numSpeakers:
                          type: integer
                          description: Number of speakers
                        createdAt:
                          type: string
                          format: date-time
                          description: Creation timestamp
                        updatedAt:
                          type: string
                          format: date-time
                          description: Last update timestamp
                  nextToken:
                    type: string
                    description: Token for the next page of results
                  previousToken:
                    type: string
                    description: Token for the previous page of results
                  count:
                    type: integer
                    description: Number of files in the current page
              example:
                files:
                  - id: 123e4567-e89b-12d3-a456-426614174000
                    name: meeting_recording.mp3
                    extension: mp3
                    fileType: audio
                    category: meeting
                    bronzeKey: raw/meeting_recording.mp3
                    userID: user123
                    length: 300.5
                    size: 1024
                    tokens: 1500
                    numSpeakers: 2
                    createdAt: '2024-01-01T00:00:00Z'
                    updatedAt: '2024-01-01T00:00:00Z'
                nextToken: >-
                  eyJpZCI6eyJTIjoiNDU2In0sInVwZGF0ZWRBdCI6eyJTIjoiMjAyNC0wMS0wMlQwMDowMDowMFoifX0=
                previousToken: null
                count: 1
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: 31eadf19-30a7-49e7-8b35-498eb63b2a48
        '401':
          description: Unauthorized - API key is missing
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                  status:
                    type: string
                    enum:
                      - unauthorized
                required:
                  - error
                  - status
                example:
                  error: API key is required
                  status: unauthorized
        '403':
          description: Forbidden - Invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                  status:
                    type: string
                    enum:
                      - forbidden
                required:
                  - error
                  - status
                example:
                  error: Invalid API key
                  status: forbidden
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                  status:
                    type: string
                    enum:
                      - internal server error
                required:
                  - error
                  - status
                example:
                  error: An error occurred while listing files
                  status: internal server error
components:
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'Your duohub API key. Type: str'

````