Skip to main content
POST
KTP Details Extraction
Submit one image of the front of an Indonesian KTP as documentImage. The endpoint accepts JPG, JPEG, PNG, and PDF files up to 2 MB. The response returns every KTP field with its own confidence score, plus an overall data.outcome.

Image quality guide

The endpoint reads the KTP with OCR, so the quality of the image directly limits what it can extract. A sharp, evenly lit, uncropped image produces complete fields with high confidence. A blurred, dark, or partly covered image produces missing fields, low confidence scores, or values that were misread. A poor image does not usually make the request fail. The engine still returns an answer as HTTP 200, and the call is billed. Check the fields described below before you rely on any extracted value.

Success, status, and quality are separate

Read the response in three layers. Each layer answers a different question. A blurred image can still produce VERIFIED if the NIK and name were readable. A very poor image of a real KTP can produce REJECTED with wrong_document_type. This happens when the engine cannot read enough of the card to recognise it as a KTP. For guidance on capturing a clear, readable KTP image, see How to properly capture documents.

Authorizations

Authorization
string
header
required

Use your API token as a Bearer token in the Authorization header.

Headers

Authorization
string
required
Example:

"Bearer {your_api_token}"

Body

multipart/form-data
documentImage
file
required

The KTP image. JPG, JPEG, PNG, or PDF, up to 2 MB. A base64 string (raw or data: URI) is also accepted.

metadata
object

Optional key-value pairs echoed back in the response.

Example:

Response

The document was processed. Check data.outcome and verificationStatus to determine the result.