Skip to main content
A completed splitting job returns one entry per split file in result.files, each with a download URL and a confidence score for the classification. The example below is a real response from splitting a mixed PDF that contained an invoice followed by a restaurant menu.
{
  "job_id": "210d954a-237a-4387-8f84-3b497f7be387",
  "status": "completed",
  "progress": "Starting document splitting...",
  "error": null,
  "file_url": "https://example-bucket.s3.amazonaws.com/user_uploads/...?AWSAccessKeyId=...&Signature=...&Expires=...",
  "file_name": "mixed_documents.pdf",
  "parameters": {
    "classes": ["Invoice", "Menu", "Receipt", "Contract"],
    "page_count": 5,
    "enable_reordering": false,
    "category_descriptions": {
      "Invoice": "Financial invoices with itemized charges",
      "Menu": "Restaurant menus and price lists",
      "Receipt": "Purchase receipts",
      "Contract": "Legal contracts and agreements"
    }
  },
  "result": {
    "success": true,
    "message": "Successfully split PDF into 2 files",
    "files": [
      {
        "name": "Invoice.pdf",
        "path": "Invoice.pdf",
        "type": "file",
        "fileId": "32b8062d-9a02-4568-b96e-7d12bd4849b6",
        "full_path": "https://example-bucket.s3.amazonaws.com/files/...?AWSAccessKeyId=...&Signature=...&Expires=...",
        "confidence_score": 0.9999965762531025
      },
      {
        "name": "Menu.pdf",
        "path": "Menu.pdf",
        "type": "file",
        "fileId": "c68057be-4438-4f39-a67c-022039288651",
        "full_path": "https://example-bucket.s3.amazonaws.com/files/...?AWSAccessKeyId=...&Signature=...&Expires=...",
        "confidence_score": 0.9999965762531025
      }
    ]
  }
}

Top-Level Fields

  • job_id: unique identifier for the split job
  • status: job state. queued while the job waits to be picked up, processing while it runs, then completed or failed.
  • progress: human-readable progress message
  • error: error message if the job failed, otherwise null
  • file_url: presigned download URL for the original uploaded file. Expires roughly an hour after the response is generated. Re-issue GET /splitter/{job_id} to get a fresh URL.
  • file_name: name of the original file
  • parameters: echo of the parameters used for this job (described below)
  • result: the split files (described below)

Parameters Object

The parameters block echoes the inputs used for the split, including defaults applied by the API.
  • classes: the category names you submitted
  • page_count: number of pages in the uploaded document
  • enable_reordering: whether the splitter reordered pages within each category after classification. Only applied to categories with more than one matched page. Defaults to false.
  • category_descriptions: the descriptions you submitted for each category

Result Object

  • success: whether the split operation succeeded
  • message: human-readable success or failure message
  • files: array of generated split files, one per matched category. Pages sharing a category are grouped into a single file, so a bundle with two invoices yields one Invoice.pdf containing both.

File Object

Each entry in result.files represents one split document.
  • name: name of the split file, derived from the matched category
  • path: relative path to the file
  • type: file type, always "file"
  • fileId: unique identifier for the file
  • full_path: presigned download URL for the split file. Expires roughly an hour after the response is generated, so download or copy the file straight away rather than storing the URL. To get a fresh URL, re-issue GET /splitter/{job_id}.
  • confidence_score: confidence score for the classification (0–1)
For the full request and response specification, see the Split API reference.