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

# List batches

> List batches with optional pagination.



## OpenAPI

````yaml /openapi.json get /batches
openapi: 3.1.0
info:
  title: Sail API
  version: '2026-02-18'
  description: >-
    Sail provides OpenAI-compatible Responses and Chat Completions endpoints,
    plus an Anthropic-compatible Messages endpoint. This reference documents the
    currently supported subset of fields.
servers:
  - url: https://api.sailresearch.com/v1
security:
  - BearerAuth: []
tags:
  - name: Models API
    description: Model discovery endpoints.
  - name: Responses API
    description: OpenAI-compatible Responses API endpoints.
  - name: Chat Completions API
    description: OpenAI-compatible Chat Completions API endpoints.
  - name: Messages API
    description: Anthropic-compatible Messages API endpoints.
  - name: Batches API
    description: Submit and manage batches of requests.
paths:
  /batches:
    get:
      tags:
        - Batches API
      summary: List batches
      description: List batches with optional pagination.
      operationId: listBatches
      parameters:
        - name: after_id
          in: query
          required: false
          schema:
            type: string
          description: Return batches created after this batch ID.
        - name: before_id
          in: query
          required: false
          schema:
            type: string
          description: Return batches created before this batch ID.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 25
            minimum: 1
            maximum: 200
          description: Maximum number of batches to return. Min 1, defaults to 25, max 200.
      responses:
        '200':
          description: List of batches.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  required:
                    - id
                    - request_counts
                    - created_at
                  properties:
                    id:
                      type: string
                      description: Unique identifier for the batch.
                    request_counts:
                      type: integer
                      description: Total number of requests in the batch.
                    created_at:
                      type: integer
                      description: Unix timestamp of when the batch was created.
                    label:
                      type: string
                      description: The label for the batch, if provided.
              example:
                - id: batch_abc123
                  request_counts: 2
                  created_at: 1741564800
                  label: my-batch-job
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error.
          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

````