Endpoints
All endpoints are authenticated via a Bearer key.
All endpoints are authenticated via Authorization: Bearer <key>. Responses are JSON unless otherwise noted.
| Method | Path | Description |
|---|---|---|
POST | /api/v1/documents | Upload a file, base64, or URL for processing (supports webhook_url) |
GET | /api/v1/documents/jobs/{document_id} | Retrieve full result by document ID |
GET | /api/v1/documents/{id}/summary | 48 summary metrics (bank statements) |
GET | /api/v1/documents/{id}/custom-export | Download org-configured Excel export |
GET | /api/v1/documents/{id}/export | Schema-based Excel export (audited_financial_statement, credit report, SLIK) |
GET | /api/v1/documents | List documents with optional filters |
DELETE | /api/v1/documents/{id} | Soft-delete a document |
POST | /api/v1/verify | Cross-document verification across 2–50 processed documents |
POST | /api/v1/batch | Create a batch job or process from URL |
POST | /api/v1/batch/upload | Batch upload multiple files as multipart form-data |
GET | /api/v1/batch/{batch_id} | Check batch status and progress |
GET | /api/v1/batch/{batch_id}/results | Get full results for all batch documents |
POST | /api/v1/documents/merge | Merge multiple files into one document for processing |
PUT | /api/v1/documents/{id}/transactions | Edit transactions on a processed document |
POST | /api/v1/documents/{id}/transactions/revert | Restore original extracted transactions |
POST | /api/v1/documents/{id}/transactions/revalidate | Re-run validation and metrics after edits |
POST
/api/v1/documentsbody parameters
| Field | Type | Description |
|---|---|---|
file | file | Multipart file upload (PDF, PNG, JPG; maximum 100 MB). |
file_base64 | string | Base64-encoded file content (data URI prefix accepted). |
file_url | string | Public or S3 presigned URL to fetch the file from. |
filename | string | Required with file_base64; optional with file_url; inferred for multipart uploads. |
document_typerequired | string | Document type (see table above). |
password | string | PDF password, if encrypted. |
webhook_url | string | URL that receives a POST when processing completes or fails. |
folder_id | string | Assign the document to a folder. |
applicant_id | string | Link the document to an applicant record. |
schema_definition | object | Custom extraction schema (JSON) for enterprise custom document types. |
One input per request
Provide exactly one of file, file_base64, or file_url.
Option A: File upload (multipart)
Python
result = client.process(
"statement.pdf",
"bank_statement",
wait=True, # Wait for completion (default: True)
poll_interval=2, # Seconds between status checks
timeout=600, # Max wait time in seconds
password=None, # PDF password if encrypted
show_progress=True # Show progress spinner
)Option B: Base64 JSON upload
Send file contents as a base64 string in a JSON body. Useful when the file is already in memory (browser FileReader, database, another API). Data URI prefix is accepted and stripped automatically.
Python
import base64
with open("invoice.pdf", "rb") as f:
b64 = base64.b64encode(f.read()).decode()
result = client.process_base64(b64, "invoice.pdf", "sales_invoice")Option C: URL (S3 presigned, public URL)
Pass a file_url and Kita will fetch the file server-side. Works with S3 presigned URLs, GCS signed URLs, or any publicly accessible link. Pair with webhook_url for a fully async fire-and-forget flow.
Python
result = client.process_url(
"https://my-bucket.s3.amazonaws.com/docs/statement.pdf?X-Amz-...",
"bank_statement"
)GET
/api/v1/documents/jobs/{document_id}Python
result = client.get_result(12345)
print(result.metadata)
result.save_json("output.json")

