Kita CaptureAPI reference

Documents

Upload documents and read extraction results.

List documents

GET /documents

GET/documents

curl

curl -X GET "https://api.kita.ai/api/v1/documents" \
  -H "Authorization: Bearer $KITA_API_KEY"

Query parameters

FieldTypeDescription
pageinteger
limitinteger
statusstringOne of: pending, completed, failed.
document_typestringOne of: bank_statement, bank_statement_summary, bank_certificate, payslip, credit_card_statement, credit_report, loan_statement, passbook, and 29 more.

Response · 200

FieldTypeDescription
successboolean
documentsobject[]
  documents[].idinteger
  documents[].file_namestring
  documents[].document_typestringTypes 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[].statusstringOne of: pending, completed, failed.
  documents[].uploaded_atstring(date-time)
  documents[].completed_atstring | null
  documents[].processing_time_secondsnumber
  documents[].file_size_bytesinteger
  documents[].total_cost_usdnumber | nullExact billed cost for universal-pipeline documents. `null` for the legacy per-type pipelines (`bank_statement`, `audited_financial_statement`, `general_information_sheet`).
  documents[].cost_reportobject | null
  documents[].resultobjectType-specific extraction output.
pageinteger
limitinteger
totalinteger

Errors

FieldTypeDescription
400errorThe 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.

POST/documents

curl

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

FieldTypeDescription
filerequiredfilePDF, PNG, JPG, TIFF or BMP. Max 100 MB.
document_typerequiredstringTypes 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.
passwordstringPDF password, if the file is protected.
webhook_urlstring(uri)Called with a POST when processing completes or fails.

Response · 202

FieldTypeDescription
successboolean
document_idinteger
job_idstring
document_typestringTypes 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.
statusstringOne of: pending, completed, failed.
status_urlstringPoll this for results.

Errors

FieldTypeDescription
400errorThe request was rejected. See `error` for the machine-readable code.
403errorNot permitted for this organization or plan.
413errorFile exceeds the 100 MB limit.
415errorFile is not PDF, PNG, JPG, TIFF or BMP.
502errorStorage 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.

POST/documents/async

curl

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

FieldTypeDescription
file_base64stringBase64-encoded file content. Requires `filename`.
file_urlstring(uri)S3 presigned or public HTTP/HTTPS URL. Private buckets need a presigned URL with `GetObject`; a plain private URL returns 403.
filenamestringRequired with `file_base64`. Auto-detected from the URL path otherwise.
document_typerequiredstringTypes 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.
passwordstring
webhook_urlstring(uri)

Response · 202

FieldTypeDescription
successboolean
document_idinteger
job_idstring
document_typestringTypes 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.
statusstringOne of: pending, completed, failed.
status_urlstringPoll this for results.

Errors

FieldTypeDescription
400errorThe 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.

POST/documents/merge

curl

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

FieldTypeDescription
filesrequiredobject[]Each entry needs either `file_url` or `file_base64`.
  files[].file_urlstring(uri)
  files[].file_base64string
  files[].filenamestringRequired with `file_base64`; auto-detected from a URL.
document_typerequiredstringTypes 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_filenamestringName for the merged file. Defaults to an auto-generated name.
passwordstring
webhook_urlstring(uri)

Response · 202

FieldTypeDescription
successboolean
document_idinteger
job_idstring
document_typestringTypes 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.
statusstringOne of: pending, completed, failed.
status_urlstringPoll this for results.
filenamestring
pagesinteger
size_bytesinteger
source_filesinteger

Errors

FieldTypeDescription
400errorThe request was rejected. See `error` for the machine-readable code.

Check processing status

GET /documents/jobs/{job_id}

GET/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

FieldTypeDescription
job_idrequiredstring

Response · 200

FieldTypeDescription
document_idinteger
file_namestring
document_typestringTypes 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.
statusstringOne of: pending, completed, failed.
processing_time_secondsnumber
errorstring | null
resultobject

Errors

FieldTypeDescription
404errorResource does not exist, or belongs to another organization.

Get a document

GET /documents/{document_id}

Returns full document detail, including results once processing completes.

GET/documents/{document_id}

curl

curl -X GET "https://api.kita.ai/api/v1/documents/42" \
  -H "Authorization: Bearer $KITA_API_KEY"

Path parameters

FieldTypeDescription
document_idrequiredintegerPositive integer document ID.

Response · 200

FieldTypeDescription
successboolean
documentobject
  document.idinteger
  document.file_namestring
  document.document_typestringTypes 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.statusstringOne of: pending, completed, failed.
  document.uploaded_atstring(date-time)
  document.completed_atstring | null
  document.processing_time_secondsnumber
  document.file_size_bytesinteger
  document.total_cost_usdnumber | nullExact billed cost for universal-pipeline documents. `null` for the legacy per-type pipelines (`bank_statement`, `audited_financial_statement`, `general_information_sheet`).
  document.cost_reportobject | null
  document.resultobjectType-specific extraction output.

Errors

FieldTypeDescription
404errorResource does not exist, or belongs to another organization.

Delete a document

DELETE /documents/{document_id}

Soft-deletes the document.

DELETE/documents/{document_id}

curl

curl -X DELETE "https://api.kita.ai/api/v1/documents/42" \
  -H "Authorization: Bearer $KITA_API_KEY"

Path parameters

FieldTypeDescription
document_idrequiredintegerPositive integer document ID.

Response · 200

FieldTypeDescription
successboolean

Errors

FieldTypeDescription
404errorResource does not exist, or belongs to another organization.

On this page