National Identity
Text recognition on Indonesian Identity Card (KTP).
Last updated
Text recognition on Indonesian Identity Card (KTP).
Last updated
This endpoint only supports Indonesian identity cards (KTP)
Method
URL
POST
$vision
/v1/ocr/id/ktp
Header
Value
Content-Type
application/json
Authorization
The OCR inference time may vary. It depends on many factors, one of them is the image size. We recommend you to resize the image before sending it to Kredibel system.
Field
Type
Description
image
(Required)
<base64:image>
Image binary encoded in base64 without <data:image/png;>. - Supports: JPG, JPEG, PNG - Max Size: 2MB - Recommended size: 1024x768
cardDetect
Boolean
(Default: true)
Use card detection model
passCardDetect
Boolean
(Default: true)
If false
, when identity card is not detected on the image it will return an error message
flipImage
Boolean
(Default: false)
If true
, the system will flip your image
checkFlipImage
Boolean
(Default: false)
If true
, the system will check whether your image is flipped or not
validateResult
Boolean
(Default: false)
If true
, you will get format validation information about result.
result
Field
Type
Description
identityId
String
Identity id (NIK)
fullName
String
Full name
birthPlace
String
Place of birth
birthDate
Date
(dd-mm-yyyy)
Date of birth
gender
String
Gender
address
String
Address
province
String
Province
city
String
City
district
String
District
village
String
Village
rtrw
String
RT/RW
religion
String
Religion
maritalStatus
String
Marital status
occupation
String
Occupation
nationality
String
Nationality
information
tilt
Float
Tilt degree (0-360) on identity card. If it is upside-down, then the value is 180.
cardDetected
Boolean
Return true if out system detected identity card on the image.
Please read this page <Responses & Errors> to know more about response.
Error 4XX
invalid_base64_encoding
Invalid base64 encoding.
false
card_not_found
There is no identity card found in the image. This error only raised if you set passCardDetect = False
.
true
text_not_found
There is no text found in the image.
true
invalid_document_type
The document sent does not appear to be the right identity type.
true
parsing_failed
System fail to parse identity card.
true
Error 5XX
For every 5XX http code response, there will be no charge.
Bearer