Split PDFs with Natural Language Instructions
Tell the AI how to split in plain English. It reads document content, detects boundaries, and names each file - things page-based splitters could never do.
- AI-powered boundary detection - with custom instructions
- 3 split modes - smart, fixed intervals, bookmarks
- Batch processing - multiple PDFs in one request
- Auto-naming - split files named by content
Just need to split a few files? Use the free web tool
Your instruction: "Split when you see a new invoice header or 'Page 1 of X'. Each vendor's documents should be separate."
Input
PDF containing: 12 invoices from 5 vendors, mixed dates, varying page counts
AI Output
reason: "New invoice detected - Acme Corp header"
reason: "New vendor letterhead - GlobeTech Inc"
Why AI splitting beats page-based tools
Page-based splitters count pages. AI reads content and understands boundaries.
Input:
mixed_invoices.pdf (47 pages)
Split every:
5 pages
Output:
split_1.pdf, split_2.pdf, ... (wrong boundaries)
- Cannot detect where documents actually start/end
- Cuts invoices in half, mixes vendors
- Generic filenames (split_1, split_2...)
- Cannot understand document content
Input:
mixed_invoices.pdf (47 pages)
Instruction:
"Split when you see new invoice header or vendor letterhead"
Output:
2025-01-15_AcmeCorp_Invoice_001.pdf (3 pages)
- Detects actual document boundaries from content
- Follows your natural language instructions
- Auto-names files based on extracted content
- Explains why each split was made
Quickstart
Two endpoints: upload a file directly, or pass a URL and we'll fetch it. Use mode=smart with instructions to tell the AI how to detect boundaries.
POST /api/v1/pdf-split - multipart file upload
curl -X POST https://www.renamed.to/api/v1/pdf-split \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -F "file=@mixed_documents.pdf" \ -F "mode=smart" \ -F 'instructions=Split when you detect a new document.Look for: invoice headers, "Page 1 of X", or new letterhead.Keep cover letters with their attachments.'POST /api/v1/pdf-split/from-url - JSON body, server fetches the file
curl -X POST https://www.renamed.to/api/v1/pdf-split/from-url \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/scanned-stack.pdf", "mode": "smart", "instructions": "Separate by patient name.\nEach patient'"'"'s records should be one file.\nInclude all pages until you see a new patient header." }'SDKs
Use our official SDKs for a better developer experience with type safety and error handling.
TypeScript SDK
import { RenamedClient } from '@renamed/sdk'const client = new RenamedClient({ apiKey: process.env.RENAMED_API_KEY })// AI reads the bundle, detects boundaries, names each splitconst job = await client.pdfSplit('./mixed_invoices.pdf', { mode: 'smart', instructions: `Split when you detect a new invoice.Look for: company letterhead, "Invoice #", or "Page 1 of X".Each vendor's invoice should be separate.`})// Poll for completionconst result = await job.waitForCompletion()console.log(result.splits)// => [{ filename: "2025-01-15_AcmeCorp_Invoice_001.pdf", reason: "New invoice detected - Acme Corp header" }, ...]Response
{ "jobId": "abc123", "status": "completed", "progress": 100, "results": { "results": [{ "originalFilename": "mixed_documents.pdf", "splits": [{ "filename": "2025-01-15_AcmeCorp_Invoice_001.pdf", "downloadUrl": "https://...", "expiresAt": "2025-01-16T12:00:00Z", "pages": 3, "reason": "New invoice detected - Acme Corp header" }, { "filename": "2025-01-14_GlobeTech_Invoice_002.pdf", "downloadUrl": "https://...", "expiresAt": "2025-01-16T12:00:00Z", "pages": 2, "reason": "New vendor letterhead - GlobeTech Inc" }] }] }, "creditsUsed": 2}SDKs on GitHub: github.com/renamed-to/renamed-sdk
Authentication
All API requests require authentication via Bearer token in the Authorization header.
API Token (recommended)
Generate API tokens from Settings → API Tokens. Tokens are prefixed with rt_ and provide full access to your account.
Authorization: Bearer rt_abc123def456...OAuth 2.0
For apps that authenticate on behalf of users, use OAuth 2.0. After the OAuth flow completes, you receive an access token that works the same way:
Authorization: Bearer <oauth_access_token>See API documentation for OAuth client registration and flow details.
API Parameters
Key parameters for controlling the split behavior.
| Parameter | Type | Required | Values / Notes |
|---|---|---|---|
file | File | Yes* | Single file upload. *At least one of file or files[] required. |
files[] | File[] | Yes* | Multiple files for batch processing. |
mode | string | No | Default: smart. Values: smart | every-n-pages | by-bookmarks |
instructions | string | No | For smart mode only. Natural language instructions for boundary detection. Max 5,000 characters. |
pagesPerSplit | integer | Yes if mode= | Number of pages per split. Range: 1-1000. |
URL endpoint (/api/v1/pdf-split/from-url)
Same parameters as above, but instead of file/files[], use url (string) or urls (string[]).
What your instructions can do
The AI interprets natural language and applies complex boundary detection that would require custom code to build yourself.
- Boundary detection
"Split when you see 'Page 1 of X' or a new company letterhead"- Document grouping
"Keep cover letters with their attachments. Don't split appendices from main documents."- Entity-based splitting
"Separate by patient name - each patient's records should be one file"- Header detection
"Each PURCHASE ORDER starts a new document. Invoice headers also indicate new documents."
Split modes
Choose the mode that fits your use case. Smart mode is the default.
smartdefaultAI detects document boundaries automatically. Optionally provide instructions to guide boundary detection.
every-n-pagesSplit at fixed intervals. Requires pagesPerSplit parameter (1-1000).
by-bookmarksSplit at PDF bookmark boundaries. Requires the source PDF to have bookmarks.
Built for production
Limits
- File size: 100MB max
- Formats: PDF only
- Instructions: 5,000 characters max
- Pages per split: 1-1,000 (for every-n-pages mode)
- Processing: 30s-2min typical
Common errors
400 no_filesNo files provided400 invalid_file_typeNot a PDF400 file_too_largeExceeds 100MB401 unauthorizedMissing or invalid API key402 insufficient_creditsNot enough credits404 not_foundJob not found
Security: All requests over TLS. The /from-url endpoint blocks localhost and private IP ranges.
Pricing
1 credit per 3 pages (rounded up). Then $9 per 1,000 credits.
- 50 free credits on signup
- Credits valid for 12 months
- 30-day money-back guarantee
Getting started
Four steps to integrate the PDF Split API into your workflow.
Get your API token
Generate an API token from your dashboard. You get 50 free credits on signup.
Upload PDF or provide URL
Submit to /api/v1/pdf-split (file upload) or /api/v1/pdf-split/from-url (URL). Include your instructions for smart mode.
Poll status endpoint
The initial response includes a statusUrl. Poll /api/v1/pdf-split/status/{jobId} until status=completed.
Download split files
Each split includes a downloadUrl. URLs expire in 24 hours. The reason field explains why each boundary was detected.
FAQ
- How does AI boundary detection work?
- In "smart" mode, the AI analyzes document content to identify where one document ends and another begins. It detects changes in letterhead, document type, vendor, "Page 1 of X" patterns, and structural elements. You can guide it with natural language instructions.
- What can I put in the instructions parameter?
- Natural language describing how to detect boundaries. Examples: "Split when you see a new invoice header or Page 1 of X", "Each document starts with a cover letter followed by attachments", "Separate by patient name - each patient's records should be one file".
- How long does processing take?
- Most jobs complete in 30 seconds to 2 minutes depending on file size and page count. The API is async - you submit a job and poll for completion.
- What's the max file size?
- PDF files up to 100MB. There is no hard page limit, but very large documents may take longer to process.
- How are split files named?
- In smart mode, the AI generates descriptive filenames based on document content - extracting dates, vendors, document types, and other entities. Each split also includes a "reason" field explaining why the boundary was detected.
- How is this different from traditional PDF splitters?
- Traditional splitters work on page numbers or bookmarks. This API reads document content, understands meaning, and applies your natural language instructions. It can split by vendor, patient, document type, or any semantic boundary - things impossible with page-based tools.