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

# List files

> GET /v1/files — list uploaded files in the current workspace.

```bash theme={null}
curl https://api.infery.ai/v1/files \
  -H "Authorization: Bearer $INFERY_API_KEY"
```

Returns files uploaded to the current workspace only. Pagination and filtering via query parameters are OpenAI-compatible.


## OpenAPI

````yaml openapi.json GET /v1/files
openapi: 3.0.0
info:
  title: Infery Gateway
  description: >-
    Infery Inference Gateway — OpenAI-compatible API for LLMs, embeddings,
    images, audio, and video
  version: '1.0'
  contact: {}
servers:
  - url: https://api.infery.ai
    description: Production
  - url: http://localhost:3001
    description: Local
security: []
tags: []
paths:
  /v1/files:
    get:
      tags:
        - Files
      summary: List uploaded files
      operationId: listFiles
      parameters:
        - name: purpose
          required: false
          in: query
          description: Filter by intended purpose
          schema:
            enum:
              - assistants
              - vision
              - user_data
              - batch
            type: string
        - name: limit
          required: false
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
          description: Max items to return (default server-side)
        - name: after
          required: false
          in: query
          schema:
            type: string
          description: Pagination cursor — pass the previous response's `last_id`
      responses:
        '200':
          description: Workspace-scoped list of uploaded files.
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    example: list
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: file_1hR9xTPZqK4mVLc2nJ7fY5wB
                        object:
                          type: string
                          example: file
                        bytes:
                          type: integer
                          example: 245192
                        created_at:
                          type: integer
                          example: 1713204900
                        filename:
                          type: string
                          example: report.pdf
                        purpose:
                          type: string
                          enum:
                            - assistants
                            - vision
                            - user_data
                            - batch
                          example: assistants
                        status:
                          type: string
                          example: processed
                  has_more:
                    type: boolean
                    example: false
                    description: Whether more pages exist after this one
                  last_id:
                    type: string
                    nullable: true
                    example: file_1hR9xTPZqK4mVLc2nJ7fY5wB
                    description: Cursor for the next page (null if this page is the end)
        '401':
          description: Unauthorized — invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
      security:
        - ApiKey: []
components:
  schemas:
    ErrorResponseDto:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetailDto'
      required:
        - error
    ErrorDetailDto:
      type: object
      properties:
        message:
          type: string
          example: Model not found
          description: Human-readable error message
        type:
          type: string
          example: invalid_request_error
          description: Error category
          enum:
            - invalid_request_error
            - authentication_error
            - permission_error
            - quota_exceeded
            - rate_limit_error
            - server_error
        code:
          type: object
          example: model_not_found
          nullable: true
          description: Stable machine-readable error code
        param:
          type: object
          example: model
          nullable: true
          description: >-
            Name of the request parameter that triggered the error, if
            applicable
      required:
        - message
        - type
        - code
        - param
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: 'API key in format: Bearer inf_***'

````