Batch Processing

Process up to 100 documents per request.

Limits

Process up to 100 documents per request (paid plans). POST /api/v1/batch creates a job; poll GET /api/v1/batch/{batch_id} for status.

HTTP API

Create a batch job with document URLs, then poll for progress and retrieve results.

cURL

curl -X POST https://api.kita.ai/api/v1/batch \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "documents": [
    { "file_url": "https://example.com/stmt1.pdf", "document_type": "bank_statement" },
    { "file_url": "https://example.com/stmt2.pdf", "document_type": "bank_statement" },
    { "file_url": "https://example.com/payslip.pdf", "document_type": "payslip" }
  ]
}'
Batch status response
{
"batch_id": "batch_abc123",
"status": "processing",
"total_documents": 3,
"completed": 2,
"failed": 0,
"progress_percent": 66.67,
"documents": [
  { "document_id": 100, "filename": "stmt1.pdf", "status": "completed" },
  { "document_id": 101, "filename": "stmt2.pdf", "status": "completed" },
  { "document_id": 102, "filename": "payslip.pdf", "status": "processing" }
]
}
MethodPathDescription
POST/api/v1/batchCreate batch: pass documents array with file_url + document_type
GET/api/v1/batch/{batch_id}Poll status, progress_percent, per-document state
GET/api/v1/batch/{batch_id}/resultsGet full extracted data for all documents

Python SDK

Three input modes; toggle between them. All return the same result structure.

From Folder

batch = client.batch_process(
  "/path/to/statements",
  "bank_statement",
  extensions=['.pdf', '.png', '.jpg'],  # Default file types
  recursive=False,                       # Search subdirectories
  max_workers=5                          # Parallel upload threads
)

results = batch.results()  # {filepath: DocumentResult}

for filepath, result in results.items():
  print(f"{filepath}: {result.status}")
  result.save_json(f"{filepath}_output.json")

SDK options

From Folder accepts extensions (default ['.pdf','.png','.jpg']), recursive (default False), and max_workers (default 5). From Base64 requires file_base64, filename, and document_type per item.

On this page