DocsOCR KTP API

OCR KTP API

Read data from processing KTP

POSThttp://178.105.157.85:3000/api/ocr?type=KTP

Request 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

NameTypeRequiredDescription
imageFileYesKTP image file (JPG, PNG, PDF)
enhanceBooleanNoEnable image enhancement before OCR

Headers

NameTypeRequiredDescription
AuthorizationStringYesBearer YOUR_API_KEY (Optional for local sandbox)
Content-TypeStringYesmultipart/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.