All functions
splitPdf
Split a multi-document PDF into separate PDF files. Supports page-based or AI prompt-based splitting. Returns an array of temporary signed URLs (1h expiry).
4 credits / 1 execution / request
Use cases
Split multi-invoice PDFs
Process batched invoices in one file. Use prompt-based splitting with "Split after each invoice" to automatically separate documents for accounting or archival.
Extract chapters or sections
Split scanned books or reports by chapter using page-based splitting. Specify pageIndices like [10, 25, 42] to create one PDF per section.
Parameters
| Name | Type | Description | |
|---|---|---|---|
| organizationId | string | required | The ID of the organization making the request |
| pdfBase64 | string | required | The PDF file encoded as a base64 string |
| strategy | string | required | Splitting strategy: 'pages' for manual page numbers, 'prompt' for AI-driven splitting |
| pageIndices | array | optional | 1-based page numbers to split after (e.g. [3, 6, 9]). Required when strategy is 'pages'. |
| prompt | string | optional | Natural language instruction for splitting (e.g. 'Split after each invoice'). Required when strategy is 'prompt'. |
Response
| Name | Type | Description |
|---|---|---|
| files | array | Array of { url, filename } objects with temporary signed URLs |