---
title: "Gets a list of all batches owned by the Azure OpenAI resource."
method: GET
path: "/batches"
tags: ["Batch:"]
---

# Gets a list of all batches owned by the Azure OpenAI resource.

`GET /batches`

## Query parameters

- `after` string
- `limit` integer
- `$filter` string
- `$orderby` string
- `api-version` string, required

## Response `200`

Success

- BatchesList — Represents a list of batches.
  - `object` 'list' | 'fine_tuning.job' | 'file' | 'fine_tuning.job.event' | 'fine_tuning.job.checkpoint' | 'model' | 'upload' | 'upload.part' | 'batch' | 'wandb' — Defines the type of an object.
  - `data` Batch[] — The list of items.
    - `id` string, required — The identity of this item.
    - `object` 'list' | 'fine_tuning.job' | 'file' | 'fine_tuning.job.event' | 'fine_tuning.job.checkpoint' | 'model' | 'upload' | 'upload.part' | 'batch' | 'wandb' — Defines the type of an object.
    - `endpoint` string — The API endpoint used by the batch.
    - `errors` BatchErrors — For batches that have failed, this will contain more information on the cause of the failures.
      - `object` string — The type of the errors object. This is always 'list'.
      - `data` BatchErrorData — Error information for a failure in batch.
        - `code` string — An error code identifying the error type.
        - `message` string — A human-readable message providing more details about the error.
        - `param` string — The name of the parameter that caused the error, if applicable (can be null).
        - `line` string — The line number of the input file where the error occurred, if applicable (can be null).
    - `input_file_id` string, required — The ID of the input file for the batch.
    - `input_blob` string — The blob url containing the input file for the batch.
    - `completion_window` string — The time frame within which the batch should be processed.
    - `status` 'validating' | 'failed' | 'in_progress' | 'finalizing' | 'completed' | 'expired' | 'cancelling' | 'cancelled' — The status of a batch.
    - `output_file_id` string — The ID of the file containing outputs of successfully executed requests.
    - `output_blob` string — The blob url containing outputs of successfully executed requests.
    - `error_file_id` string — The ID of the file containing outputs of requests with errors.
    - `error_blob` string — The blob url containing outputs of requests with errors.
    - `created_at` integer — A timestamp when this batch was created (in unix epochs).
    - `in_progress_at` integer — A timestamp when this batch started progressing (in unix epochs).
    - `expires_at` integer — A timestamp when this batch will expire (in unix epochs).
    - `finalizing_at` integer — A timestamp when this batch started finalizing (in unix epochs).
    - `completed_at` integer — A timestamp when this batch was completed (in unix epochs).
    - `failed_at` integer — A timestamp when this batch failed (in unix epochs).
    - `expired_at` integer — A timestamp when this batch expired (in unix epochs).
    - `cancelling_at` integer — A timestamp when this batch started cancelling (in unix epochs).
    - `cancelled_at` integer — A timestamp when this batch was cancelled (in unix epochs).
    - `request_counts` BatchRequestCounts — The request counts for different statuses within the batch.
      - `total` integer — The total number of requests in the batch.
      - `completed` integer — The number of requests in the batch that have been completed successfully.
      - `failed` integer — The number of requests in the batch that have failed.
    - `metadata` object — A set of key-value pairs that can be attached to the batch. This can be useful for storing additional infomration about the batch in a structured format.
  - `first_id` string — The id of the first batch in the list of batches returned.
  - `last_id` string — The id of the last batch in the list of batches returned.
  - `has_more` boolean — A value indicating whether the list contains more elements than returned.

## Other responses

- `default` — An error occurred.

---

[API](https://skmtc.net/azure/apis/cognitiveservices-azureopenai-authoring.md) · [All operations](https://skmtc.net/azure/apis/cognitiveservices-azureopenai-authoring/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/cognitiveservices-azureopenai-authoring/revisions/b177dc430e39/schema)
