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

# List Batches

List your organization's batches.

## Query Parameters

<ParamField query="after" type="string">
  A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `batch_foo`, your subsequent call can include `after=batch_foo` in order to fetch the next page of the list.
</ParamField>

<ParamField query="limit" type="integer" default="20">
  A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
</ParamField>

## Response

A list of paginated `Batch` objects.

<RequestExample>
  ```python Python theme={null}
  from openai import OpenAI
  client = OpenAI()

  batches = client.batches.list(limit=10)
  for batch in batches:
      print(batch.id, batch.status)
  ```

  ```javascript Node.js theme={null}
  import OpenAI from "openai";
  const openai = new OpenAI();

  const batches = await openai.batches.list({ limit: 10 });
  for (const batch of batches.data) {
    console.log(batch.id, batch.status);
  }
  ```

  ```bash cURL theme={null}
  curl https://api.openai.com/v1/batches?limit=10 \\
    -H "Authorization: Bearer $OPENAI_API_KEY" \\
    -H "Content-Type: application/json"
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "object": "list",
    "data": [
      {
        "id": "batch_abc123",
        "object": "batch",
        "endpoint": "/v1/chat/completions",
        "status": "completed",
        "created_at": 1711073447
      },
      {
        "id": "batch_abc124",
        "object": "batch",
        "endpoint": "/v1/embeddings",
        "status": "in_progress",
        "created_at": 1711073450
      }
    ],
    "has_more": false
  }
  ```
</ResponseExample>
