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

# Retrieve batch

> Fetch a batch, including its `status` and `request_counts`.



## OpenAPI

````yaml /api/openapi.json get /openai/v1/batches/{id}
openapi: 3.1.0
info:
  title: Liquid inference API
  version: 1.0.0
  description: >-
    OpenAI-compatible inference API plus native endpoints.


    **Authentication** — Every request needs an API key, sent as a bearer token:
    `Authorization: Bearer $LIQUID_API_KEY`. Create a key on the [API
    keys](https://console.liquid.ai/dashboard/api-keys) page of Liquid Console;
    it is shown once.


    **Batch uploads** — Batch input files are uploaded through a presigned URL
    from `POST /v1/files`; see the [Batch
    guide](https://docs.liquid.ai/api/guides/batch).


    **Decision models** — `POST /decisions/v1/systemone` implements TypeSafe's
    System One API for typed Choice, Score, and Noul decisions from decision
    models such as `d1.1` and `d1-ultra`.
servers:
  - url: https://api.liquid.ai
security:
  - apiKey: []
tags:
  - name: Models
  - name: Chat
  - name: Decision models
  - name: Files
  - name: Batches
  - name: Large uploads
paths:
  /openai/v1/batches/{id}:
    get:
      tags:
        - Batches
      summary: Retrieve batch
      description: Fetch a batch, including its `status` and `request_counts`.
      operationId: retrieve-batch
      parameters:
        - name: id
          in: path
          required: true
          description: The batch id.
          schema:
            type: string
            example: batch_abc123
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              example:
                id: batch_abc123
                object: batch
                endpoint: /v1/chat/completions
                input_file_id: file_abc123
                output_file_id: file_out456
                completion_window: 24h
                status: completed
                created_at: 1730419200
                in_progress_at: 1730419260
                completed_at: 1730419800
                expires_at: 1730505600
                request_counts:
                  total: 100
                  completed: 100
                  failed: 0
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The batch id.
                  object:
                    type: string
                    description: Always "batch".
                  endpoint:
                    type: string
                    description: The endpoint each request targets.
                  input_file_id:
                    type: string
                    description: The uploaded input file id.
                  output_file_id:
                    type: string
                    description: Result file id, once completed.
                  error_file_id:
                    type: string
                    description: Error file id, if any requests failed.
                  status:
                    type: string
                    description: >-
                      One of validating, in_progress, finalizing, completed,
                      failed, expired, cancelling, cancelled.
                  completion_window:
                    type: string
                    description: The requested completion window.
                  request_counts:
                    type: object
                    additionalProperties: true
                    description: 'Live counts: { total, completed, failed }.'
                  created_at:
                    type: integer
                    description: Unix timestamp (seconds) of creation.
                  errors:
                    type: object
                    additionalProperties: true
                    description: >-
                      Present when the input failed validation: { object:
                      "list", data: [...] }.
                  metadata:
                    type: object
                    additionalProperties: true
                    description: Any metadata supplied at creation.
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl https://api.liquid.ai/openai/v1/batches/batch_abc123 \
              -H "Authorization: Bearer $LIQUID_API_KEY"
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        A Liquid API key from the [API
        keys](https://console.liquid.ai/dashboard/api-keys) page of Liquid
        Console, sent as `Authorization: Bearer $LIQUID_API_KEY`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.