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

# Retrieve a batch

> Get the status, progress, and results of a batch job.

## Phase

**Phase 1 (Launch)**

## Path parameters

<ParamField path="id" type="string" required>
  Batch ID, e.g., `bat_def456`.
</ParamField>

## Response

### While processing

```json theme={null}
{
  "id": "bat_def456",
  "object": "batch",
  "status": "processing",
  "total_items": 50,
  "completed_items": 23,
  "failed_items": 1,
  "output": "individual",
  "progress": 0.48,
  "metadata": {},
  "created_at": "2026-05-19T11:00:00Z",
  "estimated_completion": "2026-05-19T11:02:30Z"
}
```

### When completed (individual output)

```json theme={null}
{
  "id": "bat_def456",
  "object": "batch",
  "status": "completed",
  "total_items": 50,
  "completed_items": 49,
  "failed_items": 1,
  "output": "individual",
  "progress": 1.0,
  "results": [
    {
      "index": 0,
      "status": "completed",
      "pdf_id": "pdf_item1",
      "url": "https://files.pdfbase.dev/pdf_item1.pdf?token=sig_a",
      "pages": 2,
      "bytes": 89000
    },
    {
      "index": 1,
      "status": "failed",
      "error": {
        "type": "rendering_error",
        "code": "timeout_exceeded",
        "message": "Rendering exceeded 30s timeout."
      }
    }
  ],
  "metadata": {},
  "created_at": "2026-05-19T11:00:00Z",
  "completed_at": "2026-05-19T11:02:15Z",
  "total_render_time_ms": 62400
}
```

### When completed (merged output)

```json theme={null}
{
  "id": "bat_merged1",
  "object": "batch",
  "status": "completed",
  "total_items": 50,
  "completed_items": 50,
  "failed_items": 0,
  "output": "merged",
  "merged_pdf": {
    "id": "pdf_merged1",
    "url": "https://files.pdfbase.dev/pdf_merged1.pdf?token=sig_b",
    "pages": 100,
    "bytes": 4200000
  },
  "completed_at": "2026-05-19T11:02:15Z"
}
```

### When completed (zip output)

```json theme={null}
{
  "id": "bat_zipped1",
  "object": "batch",
  "status": "completed",
  "output": "zip",
  "zip_url": "https://files.pdfbase.dev/bat_zipped1.zip?token=sig_c",
  "zip_bytes": 3800000,
  "completed_at": "2026-05-19T11:02:15Z"
}
```

## Example

```bash theme={null}
curl https://api.pdfbase.dev/v1/batches/bat_def456 \
  -H "Authorization: Bearer pk_live_xxx"
```
