Documents
Upload documents and read extraction results.
List documents
GET /documents
/documentscurl
curl -X GET "https://api.kita.ai/api/v1/documents" \
-H "Authorization: Bearer $KITA_API_KEY"Query parameters
| Field | Type | Description |
|---|---|---|
page | integer | |
limit | integer | |
status | string | One of: pending, completed, failed. |
document_type | string | One of: bank_statement, bank_statement_summary, bank_certificate, payslip, credit_card_statement, credit_report, loan_statement, passbook, and 29 more. |
Response · 200
| Field | Type | Description |
|---|---|---|
success | boolean | |
documents | object[] | |
documents[].id | integer | |
documents[].file_name | string | |
documents[].document_type | string | Types are normalized automatically. `bank-statement`, `Bank Statement` and `bank_statement` are all accepted, and common aliases resolve: `gis` maps to `general_information_sheet`, `afs` to `audited_financial_statement`. One of: bank_statement, bank_statement_summary, bank_certificate, payslip, credit_card_statement, credit_report, loan_statement, passbook, and 29 more. |
documents[].status | string | One of: pending, completed, failed. |
documents[].uploaded_at | string(date-time) | |
documents[].completed_at | string | null | |
documents[].processing_time_seconds | number | |
documents[].file_size_bytes | integer | |
documents[].total_cost_usd | number | null | Exact billed cost for universal-pipeline documents. `null` for the legacy per-type pipelines (`bank_statement`, `audited_financial_statement`, `general_information_sheet`). |
documents[].cost_report | object | null | |
documents[].result | object | Type-specific extraction output. |
page | integer | |
limit | integer | |
total | integer |
Errors
| Field | Type | Description |
|---|---|---|
400 | error | The request was rejected. See `error` for the machine-readable code. |
Upload and process a document
POST /documents
Upload a single document for processing. Provide exactly one of file
(multipart), file_base64, or file_url.
Private S3 buckets require a presigned URL with GetObject permission; a
plain s3:// or private bucket URL returns 403. Presigned URLs from GCS and
Azure Blob work too.
/documentscurl
curl -X POST "https://api.kita.ai/api/v1/documents" \
-H "Authorization: Bearer $KITA_API_KEY" \
-F "file=@file.pdf" \
-F "document_type=bank_statement"Request body · multipart/form-data
| Field | Type | Description |
|---|---|---|
filerequired | file | PDF, PNG, JPG, TIFF or BMP. Max 100 MB. |
document_typerequired | string | Types are normalized automatically. `bank-statement`, `Bank Statement` and `bank_statement` are all accepted, and common aliases resolve: `gis` maps to `general_information_sheet`, `afs` to `audited_financial_statement`. One of: bank_statement, bank_statement_summary, bank_certificate, payslip, credit_card_statement, credit_report, loan_statement, passbook, and 29 more. |
password | string | PDF password, if the file is protected. |
webhook_url | string(uri) | Called with a POST when processing completes or fails. |
Response · 202
| Field | Type | Description |
|---|---|---|
success | boolean | |
document_id | integer | |
job_id | string | |
document_type | string | Types are normalized automatically. `bank-statement`, `Bank Statement` and `bank_statement` are all accepted, and common aliases resolve: `gis` maps to `general_information_sheet`, `afs` to `audited_financial_statement`. One of: bank_statement, bank_statement_summary, bank_certificate, payslip, credit_card_statement, credit_report, loan_statement, passbook, and 29 more. |
status | string | One of: pending, completed, failed. |
status_url | string | Poll this for results. |
Errors
| Field | Type | Description |
|---|---|---|
400 | error | The request was rejected. See `error` for the machine-readable code. |
403 | error | Not permitted for this organization or plan. |
413 | error | File exceeds the 100 MB limit. |
415 | error | File is not PDF, PNG, JPG, TIFF or BMP. |
502 | error | Storage or queue failure. Safe to retry. |
Upload a document for polling
POST /documents/async
Identical request and response format to POST /documents. Returns
immediately so you can poll status_url.
/documents/asynccurl
curl -X POST "https://api.kita.ai/api/v1/documents/async" \
-H "Authorization: Bearer $KITA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"document_type": "bank_statement"
}'Request body · application/json
| Field | Type | Description |
|---|---|---|
file_base64 | string | Base64-encoded file content. Requires `filename`. |
file_url | string(uri) | S3 presigned or public HTTP/HTTPS URL. Private buckets need a presigned URL with `GetObject`; a plain private URL returns 403. |
filename | string | Required with `file_base64`. Auto-detected from the URL path otherwise. |
document_typerequired | string | Types are normalized automatically. `bank-statement`, `Bank Statement` and `bank_statement` are all accepted, and common aliases resolve: `gis` maps to `general_information_sheet`, `afs` to `audited_financial_statement`. One of: bank_statement, bank_statement_summary, bank_certificate, payslip, credit_card_statement, credit_report, loan_statement, passbook, and 29 more. |
password | string | |
webhook_url | string(uri) |
Response · 202
| Field | Type | Description |
|---|---|---|
success | boolean | |
document_id | integer | |
job_id | string | |
document_type | string | Types are normalized automatically. `bank-statement`, `Bank Statement` and `bank_statement` are all accepted, and common aliases resolve: `gis` maps to `general_information_sheet`, `afs` to `audited_financial_statement`. One of: bank_statement, bank_statement_summary, bank_certificate, payslip, credit_card_statement, credit_report, loan_statement, passbook, and 29 more. |
status | string | One of: pending, completed, failed. |
status_url | string | Poll this for results. |
Errors
| Field | Type | Description |
|---|---|---|
400 | error | The request was rejected. See `error` for the machine-readable code. |
Merge several files into one document
POST /documents/merge
Combine 2 to 50 files into a single PDF and process it as one document. Useful when a bank statement arrives as separate scanned pages. Images are embedded as pages in the merged PDF.
/documents/mergecurl
curl -X POST "https://api.kita.ai/api/v1/documents/merge" \
-H "Authorization: Bearer $KITA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"files": [
{
"file_url": "https://example.com/file.pdf",
"file_base64": "<file_base64>",
"filename": "<filename>"
}
],
"document_type": "bank_statement"
}'Request body · application/json
| Field | Type | Description |
|---|---|---|
filesrequired | object[] | Each entry needs either `file_url` or `file_base64`. |
files[].file_url | string(uri) | |
files[].file_base64 | string | |
files[].filename | string | Required with `file_base64`; auto-detected from a URL. |
document_typerequired | string | Types are normalized automatically. `bank-statement`, `Bank Statement` and `bank_statement` are all accepted, and common aliases resolve: `gis` maps to `general_information_sheet`, `afs` to `audited_financial_statement`. One of: bank_statement, bank_statement_summary, bank_certificate, payslip, credit_card_statement, credit_report, loan_statement, passbook, and 29 more. |
output_filename | string | Name for the merged file. Defaults to an auto-generated name. |
password | string | |
webhook_url | string(uri) |
Response · 202
| Field | Type | Description |
|---|---|---|
success | boolean | |
document_id | integer | |
job_id | string | |
document_type | string | Types are normalized automatically. `bank-statement`, `Bank Statement` and `bank_statement` are all accepted, and common aliases resolve: `gis` maps to `general_information_sheet`, `afs` to `audited_financial_statement`. One of: bank_statement, bank_statement_summary, bank_certificate, payslip, credit_card_statement, credit_report, loan_statement, passbook, and 29 more. |
status | string | One of: pending, completed, failed. |
status_url | string | Poll this for results. |
filename | string | |
pages | integer | |
size_bytes | integer | |
source_files | integer |
Errors
| Field | Type | Description |
|---|---|---|
400 | error | The request was rejected. See `error` for the machine-readable code. |
Check processing status
GET /documents/jobs/{job_id}
/documents/jobs/{job_id}curl
curl -X GET "https://api.kita.ai/api/v1/documents/jobs/{job_id}" \
-H "Authorization: Bearer $KITA_API_KEY"Path parameters
| Field | Type | Description |
|---|---|---|
job_idrequired | string |
Response · 200
| Field | Type | Description |
|---|---|---|
document_id | integer | |
file_name | string | |
document_type | string | Types are normalized automatically. `bank-statement`, `Bank Statement` and `bank_statement` are all accepted, and common aliases resolve: `gis` maps to `general_information_sheet`, `afs` to `audited_financial_statement`. One of: bank_statement, bank_statement_summary, bank_certificate, payslip, credit_card_statement, credit_report, loan_statement, passbook, and 29 more. |
status | string | One of: pending, completed, failed. |
processing_time_seconds | number | |
error | string | null | |
result | object |
Errors
| Field | Type | Description |
|---|---|---|
404 | error | Resource does not exist, or belongs to another organization. |
Get a document
GET /documents/{document_id}
Returns full document detail, including results once processing completes.
/documents/{document_id}curl
curl -X GET "https://api.kita.ai/api/v1/documents/42" \
-H "Authorization: Bearer $KITA_API_KEY"Path parameters
| Field | Type | Description |
|---|---|---|
document_idrequired | integer | Positive integer document ID. |
Response · 200
| Field | Type | Description |
|---|---|---|
success | boolean | |
document | object | |
document.id | integer | |
document.file_name | string | |
document.document_type | string | Types are normalized automatically. `bank-statement`, `Bank Statement` and `bank_statement` are all accepted, and common aliases resolve: `gis` maps to `general_information_sheet`, `afs` to `audited_financial_statement`. One of: bank_statement, bank_statement_summary, bank_certificate, payslip, credit_card_statement, credit_report, loan_statement, passbook, and 29 more. |
document.status | string | One of: pending, completed, failed. |
document.uploaded_at | string(date-time) | |
document.completed_at | string | null | |
document.processing_time_seconds | number | |
document.file_size_bytes | integer | |
document.total_cost_usd | number | null | Exact billed cost for universal-pipeline documents. `null` for the legacy per-type pipelines (`bank_statement`, `audited_financial_statement`, `general_information_sheet`). |
document.cost_report | object | null | |
document.result | object | Type-specific extraction output. |
Errors
| Field | Type | Description |
|---|---|---|
404 | error | Resource does not exist, or belongs to another organization. |
Delete a document
DELETE /documents/{document_id}
Soft-deletes the document.
/documents/{document_id}curl
curl -X DELETE "https://api.kita.ai/api/v1/documents/42" \
-H "Authorization: Bearer $KITA_API_KEY"Path parameters
| Field | Type | Description |
|---|---|---|
document_idrequired | integer | Positive integer document ID. |
Response · 200
| Field | Type | Description |
|---|---|---|
success | boolean |
Errors
| Field | Type | Description |
|---|---|---|
404 | error | Resource does not exist, or belongs to another organization. |

