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

> Interactive playground for GET /v1/batches.

List batch jobs in your project. Use `after` with `last_id` from a previous page to paginate.

Full reference: [Batches API](/docs/batch/objects).


## OpenAPI

````yaml api-reference/openapi/batch.openapi.json GET /v1/batches
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/batches:
    get:
      tags:
        - Batches
      summary: List batches
      operationId: listBatches
      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: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
        - name: after
          in: query
          schema:
            type: string
          description: 'Cursor: `last_id` from the previous page'
      responses:
        '200':
          description: Batch list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchList'
        '400':
          description: Invalid limit
        '401':
          description: Missing authentication headers
        '403':
          description: Invalid credentials
        '429':
          description: Insufficient quota
        '500':
          description: Internal server error
components:
  schemas:
    BatchList:
      type: object
      properties:
        object:
          type: string
          enum:
            - list
        data:
          type: array
          items:
            $ref: '#/components/schemas/Batch'
        first_id:
          type: string
          nullable: true
        last_id:
          type: string
          nullable: true
        has_more:
          type: boolean
    Batch:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - batch
        endpoint:
          type: string
        status:
          type: string
          enum:
            - validating
            - in_progress
            - finalizing
            - completed
            - failed
            - expired
            - cancelling
            - cancelled
        input_file_id:
          type: string
        output_file_id:
          type: string
          nullable: true
        error_file_id:
          type: string
          nullable: true
        completion_window:
          type: string
        created_at:
          type: integer
        expires_at:
          type: integer
        request_counts:
          type: object
          properties:
            total:
              type: integer
            completed:
              type: integer
            failed:
              type: integer
        metadata:
          type: object
          additionalProperties: true
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key

````