Start a check
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 "cached=False" \ -F "addons=gov_cross_check"
Response
Authentication
Send your key in the X-API-Key header. See Authentication.
Request
Body
| Name | Type | Required | Description |
|---|---|---|---|
file | file | Required | The document to check — an image or a PDF, at most 20 MB. A larger file is refused with |
reject_threshold | integer | Optional | Below this score the document is rejected. 0-100. Default |
accept_threshold | integer | Optional | At or above this score the document is accepted; the band between the two is flagged for review. Must be at or above Default |
response_mode | string | Optional | How the result reaches you. Default webhooksync |
cached | boolean | Optional | Return the result of an identical file checked by you or your team in the last 30 days by the same version, free, instead of running again. The response is then complete at once, with Default |
addons | string | Optional | 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
| Field | Type | Description |
|---|---|---|
id | uuid | This check. Use it to read the result. |
status | string |
|
trust_score | integer | null | How far the document can be trusted, 0-100. Null until the check finishes. |
route | string | 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. |
credits | integer | What this check was charged. 0 until it completes, and 0 forever if it fails. |
cached | boolean | True when this is a free copy of an identical file checked by you or your team in the last 30 days (you sent |
cached_from | datetime | null | When the check it was copied from ran; null on a fresh run. |
reject_threshold | integer | The thresholds this check ran with, echoed back. |
accept_threshold | integer | See above. |
selected_addons | string[] | The optional extras this check ran with. |
gov_cross_check | boolean | Whether the government-record cross-check ran. |
pipeline | object | null | Stage-by-stage progress — |
metadata_analysis_report | object | null | What the file's own metadata says — editing software, inconsistent timestamps. |
visual_analysis | object | null | What the image shows: screenshot and capture-type detection, occlusion, masking. |
key_information | object | null | The fields read off the document — |
ocr_result | object | null | The document's text as parsed layout blocks. |
raw_metadata | object | null | The extracted EXIF or PDF-Info fields, verbatim. |
original_filename | string | The filename you uploaded. |
file_type | string |
|
preview_url | string | null | A rendered preview of the document. Presigned and short-lived. |
created_at | date-time | When the check was created, UTC. |
Errors
| Status | Code | When |
|---|---|---|
| 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.
