Get a test key
In the console, open Developers, then API keys, and create a key in test mode. It starts with
kt_test_. Put it in the environment asKONTIGA_API_KEY: the SDKs, the CLI and the MCP server read it from there. An agent can get one with no person involved: see Sign up as an agent.Shell export KONTIGA_API_KEY=kt_test_...Download a sample document
A test key takes Kontiga’s sample documents only, and every result is computed by the real checks. Each sample is an invented document with a change made after it was issued:
sample-payslip-altered.pdf, a payslip whose net pay was changed after it was issued;sample-bank-statement-altered.pdf, a bank statement with a salary credit added after it was issued;sample-invoice-altered.pdf, an invoice whose total and payment account were changed after it was issued.Shell curl -fsSLO https://kontiga.com/samples/sample-payslip-altered.pdfUpload the file
Files never travel inside an API call. Announce the file with its name, type, size and MD5 in base64; the answer gives its
upload_idand theurlto send its bytes to. The CLI does this and the next step for you when you name the file. See Uploads.curl -X POST https://api.kontiga.com/v1/uploads \ -H "Authorization: Bearer $KONTIGA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "purpose": "document", "files": [ { "file_name": "sample-payslip-altered.pdf", "content_type": "application/pdf", "byte_size": 36095, "checksum": "ec8SMOKHhctnJMrQ4oOFdw==" } ] }'POST /v1/uploads
Check the document
Name the upload when you check the document, within the hour.
waitholds the answer up to 10 seconds: if every check is done by then, the verdict is in it.curl -X POST https://api.kontiga.com/v1/documents \ -H "Authorization: Bearer $KONTIGA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "file_name": "sample-payslip-altered.pdf", "content_type": "application/pdf", "byte_size": 36095, "upload_id": "upl_5f2c8e1a9b7d4c3e6a0f1b2c3d4e5f60", "wait": 10 }'POST /v1/documents
Read the result
The answer is the document as it stands. If every check finished within the wait, it is 201 with the verdict, both scores and the findings. If not, it is 202 with verdict: null and the step its check is on; the verdict follows by webhook and on every read.
{
"id": "doc_7Kq2Xw9",
"object": "document",
"mode": "test",
"state": "checked",
"stage": "done",
"verdict": "high_risk",
"risk_score": 87,
"fraud_score": 74,
"findings": [
{
"id": "tag_6Rv2Np9",
"kind": "fraud",
"title": "The net pay was changed after the payslip was made",
"where": "Page 1, the net pay box",
"page": 1
},
{
"id": "tag_3Lm8Qe5",
"kind": "information",
"title": "The issuer's details are the same throughout the document",
"where": "Whole page",
"page": 1
}
]
}verdictis one word:trusted,revieworhigh_risk. It follows the higher of the two scores. See Verdicts and scores.risk_scoresays how likely the file was changed after it was issued, or made up.fraud_scoresays how likely the document is fraud, for its type.- Each finding has its kind, fraud, information or positive, and where on the page it was found. See Documents.