Skip to content

Split a PDF

POST
/v1/pdf/split
curl -H "X-Api-Key: $KEY" -F files=@report.pdf -F splitMode=intervals \
-F splitSpan=1 http://localhost:9027/v1/pdf/split -o pages.zip

Splits a PDF by page ranges or into fixed intervals; several outputs come back as a ZIP.

Media typemultipart/form-data
object
files
required
string format: binary
outputFilename
string | null
splitMode
required

pages or intervals.

string

Example

pages
splitSpan
required

For pages: ranges such as 1-3,5. For intervals: pages per file.

string

Example

1-2
splitUnify

For pages: one file holding every range instead of one per range.

boolean | null

A PDF, or a ZIP of PDFs

Media typeapplication/octet-stream

The file, as bytes.

string format: binary

The request is wrong

Media typeapplication/json

The JSON body of every error response.

object
error
required

A stable, machine-readable kind.

string
message
required

What went wrong, for a person.

string

Example

{
"error": "invalid_request",
"message": "unknown step 'teleport'"
}