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

# Get Batch

> Retrieve information about a specific batch job.

```bash cURL theme={null}
curl https://gateway.bud.studio/v1/batches/batch_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```json 200 theme={null}
{
  "id": "batch_abc123",
  "object": "batch",
  "endpoint": "/v1/chat/completions",
  "errors": null,
  "input_file_id": "file-abc123",
  "completion_window": "24h",
  "status": "in_progress",
  "output_file_id": null,
  "error_file_id": null,
  "created_at": 1699123456,
  "in_progress_at": 1699123500,
  "expires_at": 1699209856,
  "finalizing_at": null,
  "completed_at": null,
  "failed_at": null,
  "expired_at": null,
  "cancelling_at": null,
  "cancelled_at": null,
  "request_counts": {
    "total": 100,
    "completed": 45,
    "failed": 2
  },
  "metadata": {
    "customer_id": "12345",
    "batch_name": "product_descriptions"
  }
}
```

## Headers

| Parameter | Type | Required | Description |
| - | - | - | - |
| Authorization | string | Yes | Bearer authentication header |

## Path Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| batch\_id | string | Yes | The ID of the batch to retrieve |

## Response Fields

| Field | Type | Description |
| - | - | - |
| id | string | Unique batch identifier |
| status | string | Current status: `validating`, `failed`, `in_progress`, `finalizing`, `completed`, `expired`, `cancelling`, `cancelled` |
| request\_counts | object | Progress tracking with `total`, `completed`, and `failed` counts |
| output\_file\_id | string | ID of results file (available when completed) |
| error\_file\_id | string | ID of error file (if any errors occurred) |

## Usage

Use this endpoint to monitor batch progress and retrieve output file IDs when processing completes.

```python theme={null}
import requests

response = requests.get(
    "https://gateway.bud.studio/v1/batches/batch_abc123",
    headers={"Authorization": "Bearer YOUR_API_KEY"}
)
batch = response.json()

print(f"Status: {batch['status']}")
print(f"Progress: {batch['request_counts']['completed']}/{batch['request_counts']['total']}")
```

> [!NOTE]
>
> For complete Batch API documentation including file upload, JSONL format, and usage examples, see [Create Batch](https://docs.budecosystem.com/api-sdk/batch/create-batch.md).


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