> ## 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.

# Split a PDF

> Split a PDF into individual pages or page ranges.

## Phase

**Phase 2**

## Request

<ParamField body="source" type="object" required>
  The PDF to split. One of:

  * `{ "pdf_id": "pdf_abc123" }`
  * `{ "url": "https://example.com/doc.pdf" }`
  * `{ "base64": "JVBERi0x..." }`
</ParamField>

<ParamField body="ranges" type="array" required>
  Array of page range strings. Each range produces one output PDF.

  * `["1", "2", "3"]` — splits into individual pages
  * `["1-3", "4-6", "7-10"]` — splits into chunks
  * `["1,3,5", "2,4,6"]` — cherry-pick pages into groups
</ParamField>

<ParamField body="output" type="string" default="url">
  `url` or `base64`.
</ParamField>

<ParamField body="metadata" type="object">
  Metadata applied to all output PDFs.
</ParamField>

## Response

```json theme={null}
{
  "id": "bat_split1",
  "object": "batch",
  "status": "completed",
  "results": [
    {
      "index": 0,
      "range": "1-3",
      "pdf_id": "pdf_split_1",
      "url": "https://files.pdfbase.dev/pdf_split_1.pdf?token=sig_a",
      "pages": 3,
      "bytes": 45000
    },
    {
      "index": 1,
      "range": "4-6",
      "pdf_id": "pdf_split_2",
      "url": "https://files.pdfbase.dev/pdf_split_2.pdf?token=sig_b",
      "pages": 3,
      "bytes": 52000
    }
  ],
  "created_at": "2026-05-19T12:05:00Z"
}
```

## Example

```bash theme={null}
curl -X POST https://api.pdfbase.dev/v1/pdfs/split \
  -H "Authorization: Bearer pk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "source": { "pdf_id": "pdf_report" },
    "ranges": ["1-5", "6-10", "11-15"],
    "output": "url"
  }'
```
