Skip to main content
GET
/
splitter
/
{job_id}
curl -X GET "https://prod.visionapi.unsiloed.ai/splitter/04a7a6d8-5ef7-465a-b22a-8a98e7104dd9" \
  -H "accept: application/json" \
  -H "api-key: your-api-key"
{
  "job_id": "c8a86841-beb1-4d00-ac4f-2f9fb9de9d5a",
  "status": "completed",
  "progress": "Starting document splitting...",
  "file_url": "https://example-bucket.s3.amazonaws.com/user_uploads/...?AWSAccessKeyId=...&Signature=...&Expires=...",
  "file_name": "mixed_documents.pdf",
  "parameters": {
    "classes": ["Invoice", "Receipt", "Contract"],
    "category_descriptions": {
      "Invoice": "Financial invoices with itemized charges",
      "Receipt": "Purchase receipts"
    },
    "enable_reordering": false,
    "page_count": 10
  },
  "result": {
    "success": true,
    "message": "Successfully split PDF into 3 files",
    "files": [
      {
        "name": "Invoice.pdf",
        "path": "Invoice.pdf",
        "type": "file",
        "fileId": "580e091d-c354-4558-8318-89e600346691",
        "full_path": "https://example-bucket.s3.amazonaws.com/files/...?AWSAccessKeyId=...&Signature=...&Expires=...",
        "confidence_score": 0.999147126422347
      },
      {
        "name": "Contract.pdf",
        "path": "Contract.pdf",
        "type": "file",
        "fileId": "680e091d-c354-4558-8318-89e600346692",
        "full_path": "https://example-bucket.s3.amazonaws.com/files/...?AWSAccessKeyId=...&Signature=...&Expires=...",
        "confidence_score": 0.987654321098765
      }
    ]
  },
  "error": null
}

Overview

The Get Split Status endpoint retrieves the status and results of a document splitting job. Use this endpoint to check if splitting is complete and download the resulting split documents.
Splitting jobs are processed asynchronously. Poll this endpoint to check completion status.

Path Parameters

job_id
string
required
The unique identifier of the splitting job

Response

job_id
string
Unique identifier for the splitting job
status
string
Current job status: “queued” while the job waits to be picked up, “processing” while it runs, then “completed” or “failed”
progress
string
Progress message describing current processing stage
file_url
string
Presigned download URL for the original uploaded file. Expires roughly an hour after the response is generated; re-issue this request to get a fresh URL.
file_name
string
Name of the original file
parameters
object
Echo of the parameters used for this job
result
object
Split results. Always present as a key; null until status is “completed”
error
string
Error message (if job failed, otherwise null)
curl -X GET "https://prod.visionapi.unsiloed.ai/splitter/04a7a6d8-5ef7-465a-b22a-8a98e7104dd9" \
  -H "accept: application/json" \
  -H "api-key: your-api-key"

Polling for Job Completion

Here are complete examples that poll the splitting job until it completes:
#!/bin/bash

JOB_ID="04a7a6d8-5ef7-465a-b22a-8a98e7104dd9"
API_KEY="your-api-key"
MAX_ATTEMPTS=60
SLEEP_INTERVAL=5

echo "Polling split job status..."

for ((i=1; i<=MAX_ATTEMPTS; i++)); do
  echo "Attempt $i..."
  
  RESPONSE=$(curl -s -X GET "https://prod.visionapi.unsiloed.ai/splitter/$JOB_ID" \
    -H "accept: application/json" \
    -H "api-key: $API_KEY")
  
  STATUS=$(echo $RESPONSE | grep -o '"status":"[^"]*"' | cut -d'"' -f4)
  
  echo "Status: $STATUS"
  
  if [ "$STATUS" = "completed" ]; then
    echo "Split completed successfully!"
    echo $RESPONSE | python -m json.tool
    break
  elif [ "$STATUS" = "failed" ]; then
    echo "Split failed!"
    echo $RESPONSE | python -m json.tool
    break
  else
    echo "Still processing... waiting $SLEEP_INTERVAL seconds"
    sleep $SLEEP_INTERVAL
  fi
done
{
  "job_id": "c8a86841-beb1-4d00-ac4f-2f9fb9de9d5a",
  "status": "completed",
  "progress": "Starting document splitting...",
  "file_url": "https://example-bucket.s3.amazonaws.com/user_uploads/...?AWSAccessKeyId=...&Signature=...&Expires=...",
  "file_name": "mixed_documents.pdf",
  "parameters": {
    "classes": ["Invoice", "Receipt", "Contract"],
    "category_descriptions": {
      "Invoice": "Financial invoices with itemized charges",
      "Receipt": "Purchase receipts"
    },
    "enable_reordering": false,
    "page_count": 10
  },
  "result": {
    "success": true,
    "message": "Successfully split PDF into 3 files",
    "files": [
      {
        "name": "Invoice.pdf",
        "path": "Invoice.pdf",
        "type": "file",
        "fileId": "580e091d-c354-4558-8318-89e600346691",
        "full_path": "https://example-bucket.s3.amazonaws.com/files/...?AWSAccessKeyId=...&Signature=...&Expires=...",
        "confidence_score": 0.999147126422347
      },
      {
        "name": "Contract.pdf",
        "path": "Contract.pdf",
        "type": "file",
        "fileId": "680e091d-c354-4558-8318-89e600346692",
        "full_path": "https://example-bucket.s3.amazonaws.com/files/...?AWSAccessKeyId=...&Signature=...&Expires=...",
        "confidence_score": 0.987654321098765
      }
    ]
  },
  "error": null
}

Authorizations

api-key
string
header
required

Path Parameters

job_id
string
required

The unique identifier of the splitting job

Response

200 - application/json

Split job status and results retrieved successfully

job_id
string

Unique identifier for the splitting job

status
string

Current job status (queued, processing, completed, failed)

progress
string

Progress message

file_url
string

Presigned download URL for the original uploaded file. Expires roughly an hour after the response is generated; re-issue this request for a fresh URL.

file_name
string

Name of the original file

parameters
object

Job parameters

result
object

Split results (only present when status is completed)

error
string

Error message if job failed