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

# List Files

> Returns a paginated list of files belonging to the caller's organization.
Cursor pagination via `after`; defaults match OpenAI's `/v1/files`.

List your organization's files. Supports `purpose` filtering and cursor pagination — pass the previous response's `last_id` as the `after` parameter to fetch the next page. Compatible with [OpenAI's List files endpoint](https://developers.openai.com/api/reference/resources/files/methods/list).

Rate limit: **100 requests/min**.


## OpenAPI

````yaml api-reference/openapi.json GET /v1/files
openapi: 3.1.0
info:
  title: Perceptron API
  contact:
    name: Perceptron API Support
    email: support@perceptron.inc
  version: 1.0.0
servers:
  - url: https://api.perceptron.inc
security: []
tags:
  - name: Chat Completions
    description: Chat completions API (OpenAI-compatible)
  - name: Detection
    description: Native Perceptron image detection API
  - name: Models
    description: Model listing and metadata API
  - name: Files
    description: File upload, listing, retrieval, and deletion API
paths:
  /v1/files:
    get:
      tags:
        - Files
      summary: List files
      description: >-
        Returns a paginated list of files belonging to the caller's
        organization.

        Cursor pagination via `after`; defaults match OpenAI's `/v1/files`.
      operationId: handle_list_files
      parameters:
        - name: after
          in: query
          description: >-
            Cursor for pagination — the `id` of the last file from the previous
            page.
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of objects to return (1-10000, default 10000).
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
        - name: order
          in: query
          description: Sort order by `created_at`.
          required: false
          schema:
            $ref: '#/components/schemas/SortOrder'
        - name: purpose
          in: query
          description: Filter files by purpose.
          required: false
          schema:
            $ref: '#/components/schemas/FilePurpose'
      responses:
        '200':
          description: Page of files.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListFilesResponse'
        '400':
          description: Invalid query parameter (bad `limit`, unknown `after` cursor, etc.).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
              example:
                error:
                  code: null
                  message: '''limit'' must be between 1 and 10000 (got 0)'
                  param: null
                  type: invalid_request_error
        '401':
          description: Authentication failed. Invalid or missing API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
              example:
                error:
                  code: null
                  message: Invalid API key
                  param: null
                  type: authentication_error
        '500':
          description: Internal server error while processing the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
              example:
                error:
                  code: null
                  message: The server had an error while processing your request.
                  param: null
                  type: server_error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    SortOrder:
      type: string
      enum:
        - asc
        - desc
    FilePurpose:
      type: string
      enum:
        - vision
        - user_data
      example: vision
    ListFilesResponse:
      type: object
      required:
        - object
        - data
        - first_id
        - last_id
        - has_more
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/File'
          description: List of file objects.
        first_id:
          type: string
          description: ID of the first file in the returned page.
        has_more:
          type: boolean
          description: Whether more results are available.
        last_id:
          type: string
          description: ID of the last file in the returned page.
        object:
          type: string
          description: Always "list".
    OpenAIErrorResponse:
      type: object
      description: OpenAI-compatible error response format.
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/OpenAIErrorDetail'
    File:
      type: object
      required:
        - object
        - id
        - bytes
        - created_at
        - filename
        - purpose
      properties:
        bytes:
          type: integer
          format: int64
          description: File size in bytes.
        created_at:
          type: integer
          format: int64
          description: Unix timestamp (seconds) when the file was created.
        filename:
          type: string
          description: Original file name.
        id:
          type: string
          description: File ID, e.g. `file-abc123`.
        object:
          type: string
          description: Always "file".
        purpose:
          $ref: '#/components/schemas/FilePurpose'
          description: File purpose.
    OpenAIErrorDetail:
      type: object
      description: OpenAI-compatible error detail.
      required:
        - message
      properties:
        code:
          type:
            - string
            - 'null'
        message:
          type: string
        param:
          type:
            - string
            - 'null'
        type:
          type:
            - string
            - 'null'
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication using your Perceptron API key

````