POST
http://178.105.157.85:3000/api/ocr?type=KTPRequest Example
cURL
curl -X POST \
"http://178.105.157.85:3000/api/ocr?type=KTP" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "image=@/path/to/document.jpg"Authentication Header
Authorization: Bearer YOUR_API_KEY
Generate an API key from your Dashboard → API Keys panel. For testing server/sandbox local environments, key verification is bypassed.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
image | File | Yes | KTP image file (JPG, PNG, PDF) |
enhance | Boolean | No | Enable image enhancement before OCR |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | String | Yes | Bearer YOUR_API_KEY (Optional for local sandbox) |
Content-Type | String | Yes | multipart/form-data |
Response Example
JSON
{
"success": true,
"data": {
"nik": "3201234567890001",
"name": "TANEKE SAPUTRO",
"birth_place": "NGILING",
"birth_date": "14-08-1990",
"gender": "LAKI-LAKI",
"address": "JATIMULYO...",
"rt_rw": "003/002",
"village": "JATIMULYO",
"district": "LOWOKWARU",
"religion": "ISLAM",
"marital_status": "MENIKAH",
"occupation": "KARYAWAN",
"nationality": "WNI",
"valid_until": "SEUMUR HIDUP"
},
"confidence": 98.65,
"processing_time": 0.32
}Rate Limit
Depending on your plan. Check your dashboard for current limits.