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

# List batch

<Callout icon="lock" color="#b2b1b1ff" iconType="regular">
  This feature is in [Private Preview](/support/preview-releases). For access or more information, [contact us](https://www.cerebras.ai/contact) or reach out to your account representative.
</Callout>

List all batch jobs associated with your organization. Supports pagination.

## Query Parameters

<ParamField path="limit" type="integer" required="true">
  The maximum number of files to return. Default: `20`, Maximum: `100`.
</ParamField>

<ParamField path="after" type="string" required="false">
  A cursor for pagination. Pass a batch ID to retrieve all files created after that file. For example, if you have files `[batch-abc123, batch-def456, batch-jkl789, batch-mno123]` and pass `after=batch-def456`, the response will return `[batch-jkl789, batch-mno123]`.
</ParamField>

## Response

<ResponseField name="object" type="list">
  The object type, which is always `list`.
</ResponseField>

<ResponseField name="data" type="array | null">
  An array of file objects that show file properties.
</ResponseField>

<ResponseField name="has_more" type="boolean | null">
  Indicates whether there are more files available beyond this page.
</ResponseField>

<RequestExample>
  ```python Python theme={null}
  from cerebras.cloud.sdk import Cerebras
  import os

  client = Cerebras(
      api_key=os.environ.get("CEREBRAS_API_KEY"),
  )

  batch = client.batches.list()

  print(batch)
  ```

  ```javascript Node.js theme={null}
  import Cerebras from '@cerebras/cerebras_cloud_sdk';

  const client = new Cerebras({
    apiKey: process.env['CEREBRAS_API_KEY'],
  });

  async function main() {
    const list = await client.batches.list();

    for await (const batch of list) {
      console.log(batch);
    }
  }

  main();
  ```

  ```bash cURL theme={null}
  curl --location --request GET 'https://api.cerebras.ai/v1/batches' \
  --header "Authorization: Bearer ${CEREBRAS_API_KEY}"

  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "object": "list",
      "data": [
          {
              "id": "batch_abc123",
              "object": "batch",
              "endpoint": "/v1/chat/completions",
              "errors": "Model 'cognition-devstral-small-2508-pc' is not supported for batch processing. Supported models: llama3.1-8b",
              "input_file_id": "file-abc123",
              "completion_window": "24h",
              "status": "failed",
              "output_file_id": null,
              "error_file_id": null,
              "created_at": 1765490209,
              "in_progress_at": null,
              "expires_at": null,
              "finalizing_at": null,
              "completed_at": null,
              "failed_at": 1765490211,
              "expired_at": null,
              "cancelling_at": null,
              "cancelled_at": null,
              "request_counts": {
                  "total": 0,
                  "completed": 0,
                  "failed": 0
              },
              "metadata": null
          },
          {
              "id": "batch_abc123",
              "object": "batch",
              "endpoint": "/v1/chat/completions",
              "errors": null,
              "input_file_id": "file-abc123",
              "completion_window": "24h",
              "status": "completed",
              "output_file_id": "file-abc123",
              "error_file_id": null,
              "created_at": 1765227145,
              "in_progress_at": null,
              "expires_at": null,
              "finalizing_at": null,
              "completed_at": 1765227301,
              "failed_at": null,
              "expired_at": null,
              "cancelling_at": null,
              "cancelled_at": null,
              "request_counts": {
                  "total": 656,
                  "completed": 656,
                  "failed": 0
              },
              "metadata": null
          },
          {
              "id": "batch_abc123",
              "object": "batch",
              "endpoint": "/v1/chat/completions",
              "errors": null,
              "input_file_id": "file-abc123",
              "completion_window": "24h",
              "status": "cancelled",
              "output_file_id": null,
              "error_file_id": null,
              "created_at": 1765492137,
              "in_progress_at": null,
              "expires_at": null,
              "finalizing_at": null,
              "completed_at": null,
              "failed_at": null,
              "expired_at": null,
              "cancelling_at": null,
              "cancelled_at": 1765492173,
              "request_counts": {
                  "total": 40,
                  "completed": 0,
                  "failed": 0
              },
              "metadata": null
          },
          {
              "id": "batch_abc123",
              "object": "batch",
              "endpoint": "/v1/chat/completions",
              "errors": "File service error: Failed to retrieve file content: Access denied to file file-8zOP2tNFQW2b7G4u3hsKDQ",
              "input_file_id": "file-abc123",
              "completion_window": "24h",
              "status": "failed",
              "output_file_id": null,
              "error_file_id": null,
              "created_at": 1765344102,
              "in_progress_at": null,
              "expires_at": null,
              "finalizing_at": null,
              "completed_at": null,
              "failed_at": 1765344103,
              "expired_at": null,
              "cancelling_at": null,
              "cancelled_at": null,
              "request_counts": {
                  "total": 0,
                  "completed": 0,
                  "failed": 0
              },
              "metadata": null
          },
          {
              "id": "batch_abc123",
              "object": "batch",
              "endpoint": "/v1/chat/completions",
              "errors": null,
              "input_file_id": "file-abc123",
              "completion_window": "24h",
              "status": "validating",
              "output_file_id": null,
              "error_file_id": null,
              "created_at": 1765211147,
              "in_progress_at": null,
              "expires_at": null,
              "finalizing_at": null,
              "completed_at": null,
              "failed_at": null,
              "expired_at": null,
              "cancelling_at": null,
              "cancelled_at": null,
              "request_counts": {
                  "total": 0,
                  "completed": 0,
                  "failed": 0
              },
              "metadata": null
          },
          {
              "id": "batch_abc123",
              "object": "batch",
              "endpoint": "/v1/chat/completions",
              "errors": null,
              "input_file_id": "file-abc123",
              "completion_window": "24h",
              "status": "completed",
              "output_file_id": "file-abc123",
              "error_file_id": "file-abc123",
              "created_at": 1765269860,
              "in_progress_at": null,
              "expires_at": null,
              "finalizing_at": null,
              "completed_at": 1765270045,
              "failed_at": null,
              "expired_at": null,
              "cancelling_at": null,
              "cancelled_at": null,
              "request_counts": {
                  "total": 4,
                  "completed": 1,
                  "failed": 3
              },
              "metadata": null
          },
          {
              "id": "batch_abc123",
              "object": "batch",
              "endpoint": "/v1/chat/completions",
              "errors": null,
              "input_file_id": "file-abc123",
              "completion_window": "24h",
              "status": "completed",
              "output_file_id": null,
              "error_file_id": null,
              "created_at": 1765223136,
              "in_progress_at": null,
              "expires_at": null,
              "finalizing_at": null,
              "completed_at": 1765223175,
              "failed_at": null,
              "expired_at": null,
              "cancelling_at": null,
              "cancelled_at": null,
              "request_counts": {
                  "total": 13,
                  "completed": 0,
                  "failed": 13
              },
              "metadata": null
          },
          {
              "id": "batch_abc123",
              "object": "batch",
              "endpoint": "/v1/chat/completions",
              "errors": "Model 'LLAMA3.1-8b' is not supported for batch processing. Supported models: gpt-oss-120b,llama3.1-8b",
              "input_file_id": "file-abc123",
              "completion_window": "24h",
              "status": "failed",
              "output_file_id": null,
              "error_file_id": null,
              "created_at": 1765344330,
              "in_progress_at": null,
              "expires_at": null,
              "finalizing_at": null,
              "completed_at": null,
              "failed_at": 1765344332,
              "expired_at": null,
              "cancelling_at": null,
              "cancelled_at": null,
              "request_counts": {
                  "total": 0,
                  "completed": 0,
                  "failed": 0
              },
              "metadata": null
          }
      ],
      "first_id": "batch_abc123",
      "last_id": "batch_abc123",
      "has_more": true
  }
  ```
</ResponseExample>
