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

# List batches

> List batches with optional pagination.



## OpenAPI

````yaml GET /batches
openapi: 3.1.0
info:
  title: Valar API
  version: '2026-02-18'
  description: >-
    Valar exposes Responses and Chat Completions endpoints that match the OpenAI
    shape. This reference documents the fields Valar supports today.
servers:
  - url: https://api.valarhq.ai/v1
security:
  - BearerAuth: []
tags:
  - name: Models API
    description: Discover which models you can call.
  - name: Responses API
    description: Responses endpoints that follow the OpenAI interface.
  - name: Chat Completions API
    description: Chat Completions endpoints that follow the OpenAI interface.
  - name: Batches API
    description: Submit request batches and track their progress.
paths:
  /batches:
    get:
      tags:
        - Batches API
      summary: List batches
      description: Retrieve your batches, paging through them when you need to.
      operationId: listBatches
      parameters:
        - name: after_id
          in: query
          required: false
          schema:
            type: string
          description: Only return batches created after this batch ID.
        - name: before_id
          in: query
          required: false
          schema:
            type: string
          description: Only return batches created before this batch ID.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 25
            minimum: 1
            maximum: 200
          description: >-
            How many batches to return at most. Ranges from 1 to 200 and
            defaults to 25.
      responses:
        '200':
          description: Your batches.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  required:
                    - id
                    - request_counts
                    - created_at
                  properties:
                    id:
                      type: string
                      description: The batch's unique ID.
                    request_counts:
                      type: integer
                      description: How many requests the batch contains.
                    created_at:
                      type: integer
                      description: When the batch was created, as a Unix timestamp.
                    label:
                      type: string
                      description: The label you gave the batch, when one was set.
              example:
                - id: batch_abc123
                  request_counts: 2
                  created_at: 1741564800
                  label: my-batch-job
        '400':
          description: The request was malformed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: We could not authenticate the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Something went wrong on Valar's side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
      additionalProperties: false
    ErrorObject:
      type: object
      required:
        - message
        - type
      properties:
        message:
          type: string
        type:
          type: string
        param:
          oneOf:
            - type: string
            - type: 'null'
        code:
          oneOf:
            - type: string
            - type: integer
            - type: 'null'
      additionalProperties: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````