POST
/
splitter
/
split-pdf-v1
curl -X 'POST' \
  'https://prod.visionapi.unsiloed.ai/splitter/split-pdf-v1?classes=invoice%2Creport' \
  -H 'accept: application/json' \
  -H 'api-key: your-api-key' \
  -H 'Content-Type: multipart/form-data' \
  -F 'file=@mixed_documents.pdf;type=application/pdf' \
  -F 'categories={"invoice":"Business invoices with itemized charges","contract":"Legal agreements and binding documents"}'
{
  "success": true,
  "message": "Successfully split PDF into 2 files",
  "files": [
    {
      "name": "invoice.pdf",
      "fileId": "d079d09f-201c-4420-a50a-b25678a71ae9",
      "type": "file",
      "path": "invoice.pdf",
      "full_path": "https://lyltzyvtloozzovxrupp.supabase.co/storage/v1/object/public/files/ef3ec356-b407-4f9f-ac8f-0dfdef9034c0_invoice.pdf?",
      "confidence_score": 0.8
    },
    {
      "name": "contract.pdf",
      "fileId": "320616cc-8dfd-4b8a-8474-8e7a42d9e287",
      "type": "file",
      "path": "contract.pdf",
      "full_path": "https://lyltzyvtloozzovxrupp.supabase.co/storage/v1/object/public/files/dfaa5d30-6955-4a69-9c69-7e3c4efd8450_contract.pdf?",
      "confidence_score": 0.8
    }
  ]
}

Overview

The Split Document endpoint analyzes PDF pages, classifies them into predefined categories, and creates separate PDF files for each category. This is ideal for processing mixed document batches like scanned files containing invoices, contracts, and reports.
The endpoint returns a ZIP file containing the split documents, with classification and confidence score data provided in response headers.

Response

The endpoint returns a JSON response containing information about the split PDF documents that have been uploaded to cloud storage.
success
boolean
Whether the splitting operation succeeded
message
string
Descriptive message about the splitting operation
files
array
Array of split PDF files with their metadata

Request Examples

curl -X 'POST' \
  'https://prod.visionapi.unsiloed.ai/splitter/split-pdf-v1?classes=invoice%2Creport' \
  -H 'accept: application/json' \
  -H 'api-key: your-api-key' \
  -H 'Content-Type: multipart/form-data' \
  -F 'file=@mixed_documents.pdf;type=application/pdf' \
  -F 'categories={"invoice":"Business invoices with itemized charges","contract":"Legal agreements and binding documents"}'

Response Examples

{
  "success": true,
  "message": "Successfully split PDF into 2 files",
  "files": [
    {
      "name": "invoice.pdf",
      "fileId": "d079d09f-201c-4420-a50a-b25678a71ae9",
      "type": "file",
      "path": "invoice.pdf",
      "full_path": "https://lyltzyvtloozzovxrupp.supabase.co/storage/v1/object/public/files/ef3ec356-b407-4f9f-ac8f-0dfdef9034c0_invoice.pdf?",
      "confidence_score": 0.8
    },
    {
      "name": "contract.pdf",
      "fileId": "320616cc-8dfd-4b8a-8474-8e7a42d9e287",
      "type": "file",
      "path": "contract.pdf",
      "full_path": "https://lyltzyvtloozzovxrupp.supabase.co/storage/v1/object/public/files/dfaa5d30-6955-4a69-9c69-7e3c4efd8450_contract.pdf?",
      "confidence_score": 0.8
    }
  ]
}

Authorizations

api-key
string
header
required

Query Parameters

classes
string
required

Comma-separated categories (e.g., invoice,contract)

Body

multipart/form-data

Response

200 - application/json

Split started

The response is of type object.