Kita

Quickstart

Upload a document, wait for processing, and retrieve structured data.

1. Create an API key

Create a key in the Kita dashboard with document:write and document:read scopes. Keep it on your backend.

export KITA_API_KEY="kita_prod_REPLACE_ME"
export KITA_CAPTURE_BASE="https://api.kita.ai/api/v1"

2. Upload a document

Replace the file path and choose a document type enabled for your organization.

curl --fail-with-body "$KITA_CAPTURE_BASE/documents" \
  -H "Authorization: Bearer $KITA_API_KEY" \
  -F 'file=@./statement.pdf' \
  -F 'document_type=bank_statement'

The response is 202 Accepted. Save document_id:

{
  "success": true,
  "document_id": 42,
  "status": "pending",
  "status_url": "/api/v1/documents/jobs/42"
}

Response abbreviated. Poll with document_id, not the queue job_id.

3. Wait for completion

export KITA_DOCUMENT_ID="42"  # Replace with your document_id
 
curl --fail-with-body "$KITA_CAPTURE_BASE/documents/jobs/$KITA_DOCUMENT_ID" \
  -H "Authorization: Bearer $KITA_API_KEY"

Poll every few seconds with backoff and a client-side timeout. Continue while status is pending or processing. Stop on completed or failed; a failed job includes an error and can still return HTTP 200.

4. Retrieve the result

curl --fail-with-body "$KITA_CAPTURE_BASE/documents/$KITA_DOCUMENT_ID" \
  -H "Authorization: Bearer $KITA_API_KEY" \
  -o result.json

The response contains document.status and, after completion, document.result. For bank statements, transactions and metrics are in document.result.extracted_data. See Results.

On this page