kriyam.aistudioAPI reference
Kriyam DocForensics v2

Start a check

POSThttps://studioapi.kriyam.ai/models/doc-forensics/v2

Content type multipart/form-data

Starts a tampering check on one document. By default it returns immediately with status: "uploaded" and the verdict arrives later at your webhook; with response_mode=sync an image is checked within the request and returned finished. The file type is detected from the bytes themselves, not from the declared content type.

Request

curl -X POST "https://studioapi.kriyam.ai/models/doc-forensics/v2" \
  -H "X-API-Key: $KRIYAM_API_KEY" \
  -F "file=@document.pdf" \
  -F "reject_threshold=40" \
  -F "accept_threshold=80" \
  -F "response_mode=webhook" \
  -F "addons=gov_cross_check"

Response

{11 items
"id":"c81f0a5d-3e94-4b27-a6f0-12d8be..."
"status":"uploaded"
"original_filename":"document.pdf"
"file_type":"pdf"
"reject_threshold":40
"accept_threshold":80
"selected_addons":[1 item
0:"gov_cross_check"
]
"credits":0
"trust_score":null
"route":null
"created_at":"2026-09-18T09:12:04.182741Z"
}

Authentication

Send your key in the X-API-Key header. See Authentication.

Request

Body

NameTypeRequiredDescription
filefileRequired

The document to check — an image or a PDF, at most 20 MB. A larger file is refused with 413.

reject_thresholdintegerOptional

Below this score the document is rejected. 0-100.

Default 40

accept_thresholdintegerOptional

At or above this score the document is accepted; the band between the two is flagged for review. Must be at or above reject_threshold.

Default 80

response_modestringOptional

How the result reaches you. webhook returns at once and delivers the verdict to the key's webhook. sync waits for the check to finish and returns it in this response, with no webhook — for images only; a PDF with sync is refused with 400.

Default webhook

webhooksync

addonsstringOptional

An optional extra to switch on, repeated once per extra. The extras a tool offers, and what each adds to the run, are shown on the tool's own screen — they're configurable, so they aren't listed here.

Response

200 OK

FieldTypeDescription
iduuid

This check. Use it to read the result.

statusstring

uploaded or processing while the pipeline runs; completed or failed once it is over. Only a terminal status means the verdict below is final.

trust_scoreinteger | null

How far the document can be trusted, 0-100. Null until the check finishes.

routestring | null

The skill evaluator's own three-way outcome, when a skill matched this document type. Null when none did — not a failure, and the score-against-thresholds verdict still applies.

creditsinteger

What this check was charged. 0 until it completes, and 0 forever if it fails.

reject_thresholdinteger

The thresholds this check ran with, echoed back.

accept_thresholdinteger

See above.

selected_addonsstring[]

The optional extras this check ran with.

gov_cross_checkboolean

Whether the government-record cross-check ran.

pipelineobject | null

Stage-by-stage progress — {stages: [{key, label, status, steps}], started_at, completed_at}. Useful for showing where a running check has got to.

metadata_analysis_reportobject | null

What the file's own metadata says — editing software, inconsistent timestamps.

visual_analysisobject | null

What the image shows: screenshot and capture-type detection, occlusion, masking.

key_informationobject | null

The fields read off the document — {document_type, key_data}.

ocr_resultobject | null

The document's text as parsed layout blocks.

raw_metadataobject | null

The extracted EXIF or PDF-Info fields, verbatim.

original_filenamestring

The filename you uploaded.

file_typestring

image or pdf, detected from the bytes themselves.

preview_urlstring | null

A rendered preview of the document. Presigned and short-lived.

created_atdate-time

When the check was created, UTC.

Errors

StatusCodeWhen
400—

The file is empty, isn't an image or a PDF, or the thresholds are outside 0-100 or in the wrong order.

Every keyed call can also get401402403404429— see Errors.