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 processing...",
  "file_url": "https://lyltzyvtloozzovxrupp.supabase.co/storage/v1/object/public/job-files-bucket/...",
  "file_name": "mixed_documents.pdf",
  "parameters": {
    "classes": ["Invoice", "Receipt", "Contract"],
    "category_descriptions": {
      "Invoice": "Financial invoices with itemized charges",
      "Receipt": "Purchase receipts"
    }
  },
  "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://lyltzyvtloozzovxrupp.supabase.co/storage/v1/object/public/files/...",
        "confidence_score": 0.999147126422347
      },
      {
        "name": "Contract.pdf",
        "path": "Contract.pdf",
        "type": "file",
        "fileId": "680e091d-c354-4558-8318-89e600346692",
        "full_path": "https://lyltzyvtloozzovxrupp.supabase.co/storage/v1/object/public/files/...",
        "confidence_score": 0.987654321098765
      }
    ]
  },
  "error": null,
  "quota_remaining": 450
}

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.

Response

job_id
string
Unique identifier for the splitting job
status
string
Current job status: “processing”, “completed”, or “failed”
progress
string
Progress message describing current processing stage
file_url
string
URL to the original uploaded file
file_name
string
Name of the original file
parameters
object
Job parameters including classes and category descriptions
result
object
Split results (only present when status is “completed”)
error
string
Error message (if job failed, otherwise null)
quota_remaining
number
Remaining API quota after this request
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 processing...",
  "file_url": "https://lyltzyvtloozzovxrupp.supabase.co/storage/v1/object/public/job-files-bucket/...",
  "file_name": "mixed_documents.pdf",
  "parameters": {
    "classes": ["Invoice", "Receipt", "Contract"],
    "category_descriptions": {
      "Invoice": "Financial invoices with itemized charges",
      "Receipt": "Purchase receipts"
    }
  },
  "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://lyltzyvtloozzovxrupp.supabase.co/storage/v1/object/public/files/...",
        "confidence_score": 0.999147126422347
      },
      {
        "name": "Contract.pdf",
        "path": "Contract.pdf",
        "type": "file",
        "fileId": "680e091d-c354-4558-8318-89e600346692",
        "full_path": "https://lyltzyvtloozzovxrupp.supabase.co/storage/v1/object/public/files/...",
        "confidence_score": 0.987654321098765
      }
    ]
  },
  "error": null,
  "quota_remaining": 450
}

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 (processing, completed, failed)

progress
string

Progress message

file_url
string

URL to the original uploaded file

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

quota_remaining
number

Remaining API quota