---
title: "Split PDF by pages"
method: POST
path: "/pdf/split"
tags: ["PDF"]
---

# Split PDF by pages

`POST /pdf/split`

## Request

- Base URL: `https://api.filegraph.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.filegraph.ai/pdf/split`
- Auth: API key in header `X-API-Key`

Split a PDF into multiple files based on page ranges.

## Page Range Syntax
- Single page: `5`
- Range: `1-10`
- Multiple ranges: `1-5,10-15,20`
- From page to end: `10-`

## Response `200`

Successful Response

- SplitResponse: Response for PDF split operation.
  - `files` FileResponse[], required: List of split PDF files
    - `filename` string, required: Output filename
    - `content_type` string, required: MIME type of the file
    - `size_bytes` integer, required: File size in bytes
    - `content_base64` string, required: Base64-encoded file content
  - `input_pages` integer, required: Total pages in input PDF
  - `output_count` integer, required: Number of output files created

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/filegraph/apis/docconvert-api.md) · [All operations](https://skmtc.dev/filegraph/apis/docconvert-api/llms.txt) · [OpenAPI document](https://skmtc.dev/filegraph/apis/docconvert-api/revisions/436255c85bd4?raw)
