OCR (Optical Character Recognition)

Send a POST request to https://api.cloud.nodeflux.io/v1/analytics/ocr-ktp by providing these arguments as application/json.

post
Get OCR (Optical Character Recognition)

https://api.cloud.nodeflux.io/v1/analytics/ocr-ktp
This endpoint allows you to run OCR
Request
Response
Request
Headers
Content-type
required
string
application/json
Authorization
required
string
Your Authorization Key
x-nodeflux-timestamp
required
string
x-nodeflux-timestamp from your authorization keyOC{
Response
201: Created
"job": {
"id": "a-very-long-job-id",
"result": {
"status": "success",
"analytic_type": "OCR_KTP",
"result": [
{
"": "JAKARTA SELATAN",
"NIK": "123456789012346",
"Nama": "JANE DOE",
"Agama": "ISLAM",
"RT/RW": "006 005",
"Alamat": "JL ACME",
"Kel/Desa": "DESA CONTOH",
"PROVINSI": "PROVINSI CONTOH",
"Kecamatan": "KECAMATAN CONTOH",
"Pekerjaan": "KARYAWAN SWASTA",
"Gol. Darah": "-",
"Jenis Kelamin": "PEREMPUAN",
"Berlaku Hingga": "21-12-2016",
"Kewarganegaraan": "WNI",
"Tempat/Tgl Lahir": "JAKARTA 21-12-1990",
"Status Perkawinan": "BELUM KAWIN"
}
]
}
},
"message": "Job successfully submitted!",
"ok": true
}

Request Body

Note for image input:

  • The maximum allowed image file size is 800 KB per image The image should be represented in base64 data based on a.JPG format. You can use any online jpg-to-base64 encoder to get the base64 data.

  • Please provide exactly an image of Identity Card (IC) or known as well as KTP (Kartu Tanda Penduduk).

  • Please input KTP photo in landscape orientation.

  • For more detail about image configuration please check the page Image Configuration Guideline.

Your request body should follow this format:

{
"images": [
"{INSERT_JPEG_IMAGE_AS_BASE64_STRING_FOR_KTP}"
]
}

Please follow this example:

{
"images": [
"data:image/jpeg;base64,iVB\
ORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEU\
AAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8\
yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAEl\
FTkSuQmCC"
]
}

The base64 encoded jpeg string should follow the data URI scheme format. See below:

data:[<media type>][;base64],<data>

Valid base64 encoded jpeg string example:

data:image/jpeg;base64,iVB ORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEU AAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8 yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAEl FTkSuQmCC