Split pdf pages API
Split pdf pages API, PdfSplit connects the job to your own app: you send the file, poll the job and download the output. The endpoints run on the server; there is no browser in the loop.
Quick start
- Create a key in the Developer API section of your account; the plain-text key is shown only when it is created.
- Send the request to
https://api.pixepi.comwith theAuthorization: Bearer <key>header. - Poll the job in the response with
GET https://api.pixepi.com/api/v1/jobs/{id}; once the status isdone, download the output from thedownload_url.
Example request
curl -X POST "https://api.pixepi.com/api/v1/apps/pdfsplit/run" \
-H "Authorization: Bearer $PIXEPI_KEY" \
-F "[email protected]" \
-F "options[mode]=pages" \
-F "options[page_range]=1-3"
curl -H "Authorization: Bearer $PIXEPI_KEY" "https://api.pixepi.com/api/v1/jobs/42"
This tool's endpoints
| Method | Path | What it does |
|---|---|---|
POST | /run | Runs the tool, starts a job and returns the result. |
Options
Options are sent as options[<field>]; a field left empty uses its default.
| Field | Values | Default |
|---|---|---|
options[mode]Split mode | pages · range · chunks | pages |
options[page_range]Page ranges | 1-3 | |
options[chunk_size]Chunk size | 1–500 | 5 |
options[merge_output]Merge ranges into one PDF | enabled · disabled | disabled |
Shared endpoints
| Method | Path | What it does |
|---|---|---|
GET | /api/v1/apps | API catalog |
GET | /api/v1/apps/pdfsplit | Tool contract |
GET | /api/v1/jobs/{id} | Job status |
GET | /api/v1/jobs/{id}/download | Download the job output |
GET | /api/v1/usage | Usage summary |
GET | /api/v1/openapi.json | OpenAPI 3.1 document |
Limits
- At most 100 MB per file.
- Quota and plan information is tied to your account; check the current state with
GET /api/v1/usage.
Error codes
| Code | Meaning |
|---|---|
unauthorized | The API key is missing or invalid. |
forbidden | This operation is not allowed with this key. |
not_found | Tool, job or record not found (404 also for cross-account access). |
invalid_input | Input failed validation (missing or malformed field, invalid date, and so on). |
invalid_request | The request is malformed. |
too_large | File or body size exceeds the limit. |
unsupported_media | The file type is not accepted. |
not_supported | This tool cannot run on this endpoint (stateful app). |
not_ready | The job is not finished yet. |
expired | The output has expired. |
no_output | There is no output to download for the job. |
invalid_path | Invalid output path. |
quota_exceeded | Quota or rate limit exceeded. |
rate_limited | Too many requests in a short time; wait a bit and try again. |
csrf | Browser form verification failed (the external API uses keys). |
conflict | The operation conflicts with the current state. |
unavailable | The tool is temporarily closed. |
internal_error | Unexpected server error. |
Documents
Frequently asked questions
Where do I get an API key?
Create a key in the Developer API section of your account; the key is shown once, at the moment it is created.
How is a request sent?
The endpoints run at https://api.pixepi.com; every request includes the "Authorization: Bearer <key>" header.
Which files does the PdfSplit API accept?
Accepted types: PDF. The limit is 100 MB per file; the options are the same as on the tool page.
How do I read an error response?
The error body carries {ok:false, error, code, request_id} fields; code values are in the error codes table.