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

# List files

> Interactive playground for GET /v1/files.

List files for your project. Filter with `purpose=batch` (uploads) or `purpose=batch_output` (batch results; check `is_error` on each item for error files).

Use `last_id` from the response as `after` on the next request to page. Full reference: [Files API](/docs/batch/objects).


## OpenAPI

````yaml api-reference/openapi/batch.openapi.json GET /v1/files
openapi: 3.1.0
info:
  title: ZeroGPU Batch & Files API
  version: '1.0'
  description: >-
    JSONL file storage (`/v1/files`) and asynchronous batch inference
    (`/v1/batches`). Wire-compatible with OpenAI's files and batch APIs. Auth:
    `x-api-key` on every request; `x-project-id` is optional.
servers:
  - url: https://api.zerogpu.ai
    description: Production
security:
  - ApiKey: []
paths:
  /v1/files:
    get:
      tags:
        - Files
      summary: List files
      description: >-
        List project files, newest first by default. Use `last_id` as `after` to
        page.
      operationId: listFiles
      parameters:
        - name: x-project-id
          in: header
          required: false
          schema:
            type: string
          description: >-
            Optional project identifier. Scopes the request to a specific
            project when provided.
        - name: purpose
          in: query
          schema:
            type: string
            enum:
              - batch
              - batch_output
          description: >-
            Filter by purpose. `batch_output` includes success and error output
            files (`is_error` on each object).
        - name: order
          in: query
          schema:
            type: string
            enum:
              - desc
              - asc
            default: desc
        - name: after
          in: query
          schema:
            type: string
          description: >-
            Cursor: file `id` from the previous page (or `last_id` from the
            prior response).
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 10000
            default: 10000
      responses:
        '200':
          description: File list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileList'
        '400':
          description: Invalid limit
        '401':
          description: Missing authentication headers
        '403':
          description: Invalid credentials
        '429':
          description: Insufficient quota
        '500':
          description: Internal server error
components:
  schemas:
    FileList:
      type: object
      properties:
        object:
          type: string
          enum:
            - list
        data:
          type: array
          items:
            $ref: '#/components/schemas/File'
        first_id:
          type: string
          nullable: true
        last_id:
          type: string
          nullable: true
        has_more:
          type: boolean
    File:
      type: object
      properties:
        id:
          type: string
          description: Prefixed with `file-`.
        object:
          type: string
          enum:
            - file
        bytes:
          type: integer
        created_at:
          type: integer
        filename:
          type: string
        purpose:
          type: string
          enum:
            - batch
            - batch_output
          description: Uploads use `batch`; batch results use `batch_output`.
        status:
          type: string
          enum:
            - uploaded
            - processed
            - error
        status_details:
          type: string
        expires_at:
          type: integer
        is_error:
          type: boolean
          description: ZeroGPU extension. `true` on batch error output files only.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key

````