OCR KTP

post
Get OCR (Optical Character Recognition)

https://api.cloud.nodeflux.io/v1/analytics/ocr-ktp
Send a POST request to https://api.cloud.nodeflux.io/v1/analytics/ocr-ktp by providing these arguments as application/json. 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
202: Accepted
"job": {
"id": "a-very-long-job-id",
"result": {
"status": "success",
"analytic_type": "OCR_KTP",
"result": [
{
"kabupaten_kota": "JAKARTA SELATAN",
"nik": "123456789012346",
"nama": "JANE DOE",
"agama": "ISLAM",
"rt_rw": "006 005",
"alamat": "JL ACME",
"kelurahan_desa": "DESA CONTOH",
"provinsi": "PROVINSI CONTOH",
"kecamatan": "KECAMATAN CONTOH",
"pekerjaan": "KARYAWAN SWASTA",
"golongan_darah": "-",
"jenis_kelamin": "PEREMPUAN",
"berlaku_hingga": "21-12-2016",
"kewarganegaraan": "WNI",
"tempat_lahir": "JAKARTA",
"tanggal_lahir": "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