We’ll walk through splitting a single bundled PDF into separate category-specific files. For classifying a document (not splitting it), see Getting Started With Classification.Documentation Index
Fetch the complete documentation index at: https://docs.unsiloed.ai/llms.txt
Use this file to discover all available pages before exploring further.
Before You Start
- Get an Unsiloed AI API key by signing up.
- Have a PDF that contains multiple documents bundled together.
- Decide on the candidate categories the bundle should split into.
Keep your API key out of source control. The examples below read it from the
UNSILOED_API_KEY environment variable.1. Submit a Bundled PDF With Categories
The/splitter endpoint accepts a multipart upload with two fields: file (the bundled PDF) and categories (a JSON list of category objects, each with a name and an optional description). It returns a job_id you can poll for results.
The JavaScript example uses ES modules (top-level
await, import). Save it as script.mjs or add "type": "module" to your package.json. You’ll also need Node.js 18 or newer, which exposes fetch, FormData, and Blob as globals.2. Poll for Results
PollingGET /splitter/{job_id} returns the job’s current state. A status of completed indicates the split files are ready, failed indicates the job errored, and any other value (such as processing) means the job is still running.

