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

# Get Batch

> Get batch status from the upstream provider.
Usage logging and billing fire automatically on the first terminal observation.
When the batch is completed and has an output file, the response includes a
`results` key with the parsed output (list of per-request response objects).



## OpenAPI

````yaml /api/openapi.json get /v1/batches/{batch_id}
openapi: 3.1.0
info:
  title: MeshAPI
  description: One key, all AI models.
  version: 0.1.0
servers:
  - url: https://api.meshapi.ai
security:
  - BearerAuth: []
paths:
  /v1/batches/{batch_id}:
    get:
      tags:
        - Batch
      summary: Get Batch
      description: >-
        Get batch status from the upstream provider.

        Usage logging and billing fire automatically on the first terminal
        observation.

        When the batch is completed and has an output file, the response
        includes a

        `results` key with the parsed output (list of per-request response
        objects).
      operationId: get_batch
      parameters:
        - name: batch_id
          in: path
          required: true
          schema:
            type: string
            title: Batch Id
        - in: header
          name: X-Mesh-Version
          required: false
          schema:
            type: string
            enum:
              - 2026-08
            default: 2026-08
          example: 2026-08
          description: >-
            Dated version of the API contract to pin this request to. Omit it
            and the request is served under `2026-08` — the oldest supported
            version, so an existing integration is never moved by a release. A
            malformed or unsupported value is rejected with `400
            invalid_api_version` rather than falling back silently. The version
            actually served is echoed as `X-Mesh-Version` on every response,
            including errors.
      responses:
        '200':
          description: Batch details
          content:
            application/json:
              schema: {}
              examples:
                default:
                  summary: Successful batch details response
                  value:
                    id: batch_6a46708ba644819099dacb31e0339a86
                    object: batch
                    endpoint: /v1/chat/completions
                    model: gpt-5.4-2026-03-05
                    input_file_id: file-2LvNxHkyRFbSPcLEnEdHW9
                    completion_window: 24h
                    status: in_progress
                    created_at: 1783001227
                    in_progress_at: 1783001289
                    expires_at: 1783087627
                    request_counts:
                      total: 2
                      completed: 0
                      failed: 0
                    usage:
                      input_tokens: 0
                      output_tokens: 0
                      total_tokens: 0
                      input_tokens_details:
                        cached_tokens: 0
                      output_tokens_details:
                        reasoning_tokens: 0
                    metadata:
                      job_name: my-batch-job
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Enter your MeshAPI key (`rsk_...`) — sent as `Authorization: Bearer
        <key>`.

````