PDF Split Endpoints
AI-powered endpoints to split multi-page PDFs into individual documents. Automatically detect document boundaries and rename each output file based on extracted content.
Endpoint – Split PDF
POST /api/v1/pdf-splitRequest
Upload one or more PDF files using multipart form-data. The service automatically analyzes the content to find natural document boundaries (invoices, contracts, statements, etc.) and splits them into separate files with descriptive names.
Request fields:
| Field | Type | Required | Description |
|---|---|---|---|
file or files[] | File(s) | Yes | PDF file(s) to split. Max 100 MB per file. Use file for single file or files[] for batch processing. |
mode | string | No | Split mode: smart (AI analyzes content), every-n-pages (fixed intervals), by-bookmarks (uses PDF bookmarks). Default: smart. |
instructions | string | No | AI prompt for smart mode. Natural language instructions describing how to split and name files. Example: "Split by invoice number, name each file with vendor and date" |
pagesPerSplit | number | No | Number of pages per split (required for every-n-pages mode). Example: 2 splits every 2 pages. |
callback | string | No | Webhook URL for completion notification (for large PDFs). Receives POST with job results when processing completes. |
Response
All requests return a job ID immediately. Processing happens asynchronously via background workers. Poll the statusUrl or use webhooks for completion notification.
Job Completion (Poll Status)
Poll the statusUrl to get results when job completes:
Examples
cURL - Single File
cURL - Batch Processing
JavaScript / Node.js
Python
Credit Usage
PDF splitting costs 1 credit per 3 pages, rounded up. Example: a 45-page PDF costs 15 credits. Use the estimate endpoint to calculate costs before processing.
Processing Times
Small PDFs (<50 pages): < 1 minute
Medium PDFs (50-200 pages): 1-2 minutes
Large PDFs (200+ pages): 2-4 minutes
All jobs process asynchronously via background workers. Use webhooks or polling to get results.
Endpoint – Split PDF from URL
POST /api/v1/pdf-split/from-urlOverview
Split PDFs without uploading files. Provide URL(s) to publicly accessible PDF files and the service will download, process, and split them. This is ideal for integrations where PDFs are already hosted (S3, Google Drive, Dropbox, etc.).
Request
Send JSON with one or more PDF URLs:
| Field | Type | Required | Description |
|---|---|---|---|
url or urls | string | string[] | Yes | Publicly accessible PDF URL(s). Must return Content-Type: application/pdf. Max 100MB per file. |
mode | string | No | Split mode (same as main endpoint). Default: smart. |
instructions | string | No | AI prompt for smart mode. Example: "Split by invoice, name with date and amount" |
callback | string | No | Webhook URL for completion notification. |
Response
Same format as the main endpoint: all requests return a job ID immediately. Processing happens asynchronously via background workers.
Examples
cURL - Single URL
cURL - Batch URLs
JavaScript / Node.js
Python
URL Requirements
- URLs must be publicly accessible (no authentication required)
- Must return
Content-Type: application/pdf - Max 100MB per file
- HTTPS recommended for security
When to Use
Use from-url when:
- PDFs are already hosted (S3, Google Drive, etc.)
- Integrating with webhook-based workflows
- Processing PDFs from external systems
- Avoiding file upload bandwidth
Endpoint – Estimate Cost
POST /api/v1/pdf-split/estimateOverview
Calculate credits and processing time before splitting PDFs. Useful for budget planning, cost approval workflows, or displaying estimates to end users.
Request
Send JSON with page count or URL(s):
| Field | Type | Required | Description |
|---|---|---|---|
pageCount | number | No* | Total page count if already known. Fastest option for estimation. |
url or urls | string | string[] | No* | PDF URL(s) to estimate. Currently not implemented - use pageCount instead. |
* Either pageCount or url/urls required
Response
Examples
cURL
JavaScript / Node.js
Python
Cost Formula
Credits = ⌈totalPages ÷ 3⌉
- 1-3 pages = 1 credit
- 30 pages = 10 credits
- 100 pages = 34 credits
- 450 pages = 150 credits
Use Cases
- Show cost to users before they upload
- Implement budget approval workflows
- Rate limit expensive operations
- Display processing time estimates