> ## Documentation Index
> Fetch the complete documentation index at: https://docs.idmetagroup.com/llms.txt
> Use this file to discover all available pages before exploring further.

# KTP Details Extraction

> Extract structured fields from an Indonesian KTP without creating a Trust Validation.



## OpenAPI

````yaml stateless-verification-api/document-ocr/ktp-details-extraction.openapi.json POST /api/v3/verifications/indonesia/ktp-details-extraction-passthrough
openapi: 3.0.3
info:
  title: Document OCR API - KTP Details Extraction
  version: 1.0.0
servers:
  - url: https://{environment-subdomain}.idmetagroup.com
    description: Your environment (replace `{environment-subdomain}`)
    variables:
      environment-subdomain:
        default: integrate
        description: IDmeta environment subdomain
security:
  - bearerAuth: []
paths:
  /api/v3/verifications/indonesia/ktp-details-extraction-passthrough:
    post:
      tags:
        - Document OCR
      summary: KTP Details Extraction
      description: >-
        Extract structured fields from an Indonesian KTP without creating a
        Trust Validation.
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
            example: Bearer {your_api_token}
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - documentImage
              properties:
                documentImage:
                  type: string
                  format: binary
                  description: >-
                    The KTP image. JPG, JPEG, PNG, or PDF, up to 2 MB. A base64
                    string (raw or `data:` URI) is also accepted.
                metadata:
                  type: object
                  additionalProperties: true
                  description: Optional key-value pairs echoed back in the response.
                  example:
                    clientReference: ORDER-88213
      responses:
        '200':
          description: >-
            The document was processed. Check `data.outcome` and
            `verificationStatus` to determine the result.
          content:
            application/json:
              examples:
                extracted:
                  summary: extracted — VERIFIED
                  value:
                    success: true
                    message: Indonesia KTP details extraction processed successfully
                    data:
                      outcome: extracted
                      fields:
                        nik:
                          value: '3174012509870004'
                          confidence: 99.42%
                        name:
                          value: BUDI SANTOSO
                          confidence: 98.87%
                        placeOfBirth:
                          value: JAKARTA
                          confidence: 99.10%
                        dateOfBirth:
                          value: '1987-09-25'
                          confidence: 98.65%
                        gender:
                          value: LAKI-LAKI
                          confidence: 99.71%
                        bloodType:
                          value: O
                          confidence: 96.20%
                        address:
                          street:
                            value: JL. MERPATI RAYA NO. 12
                            confidence: 97.35%
                          rt:
                            value: '003'
                            confidence: 99.02%
                          rw:
                            value: '007'
                            confidence: 99.02%
                          village:
                            value: KEBAYORAN LAMA UTARA
                            confidence: 97.88%
                          district:
                            value: KEBAYORAN LAMA
                            confidence: 98.14%
                        religion:
                          value: ISLAM
                          confidence: 99.55%
                        maritalStatus:
                          value: KAWIN
                          confidence: 98.90%
                        occupation:
                          value: KARYAWAN SWASTA
                          confidence: 97.42%
                        citizenship:
                          value: WNI
                          confidence: 99.68%
                        validUntil:
                          value: SEUMUR HIDUP
                          confidence: 99.20%
                        province:
                          value: DKI JAKARTA
                          confidence: 99.33%
                        city:
                          value: JAKARTA SELATAN
                          confidence: 99.05%
                        issuedDate:
                          value: '2017-03-14'
                          confidence: 96.71%
                        signature: null
                        photo: null
                      missingFields: []
                    verificationStatus: VERIFIED
                    verificationStatusCode: 3
                    transactionId: 9f4c1b2e-8a3d-4c7f-b1e6-2d5a9c0f7e31
                    verificationType: ktp_details_extraction
                    metadata:
                      clientReference: ORDER-88213
                    createdAt: '2026-09-01T04:22:17.000000Z'
                partial:
                  summary: partial — REVIEW_NEEDED
                  value:
                    success: true
                    message: Indonesia KTP details extraction processed successfully
                    data:
                      outcome: partial
                      fields:
                        nik: null
                        name:
                          value: SITI RAHAYU
                          confidence: 97.63%
                        placeOfBirth:
                          value: BANDUNG
                          confidence: 98.21%
                        dateOfBirth:
                          value: '1992-04-11'
                          confidence: 97.04%
                        gender:
                          value: PEREMPUAN
                          confidence: 99.30%
                        bloodType: null
                        address:
                          street:
                            value: JL. ASIA AFRIKA NO. 45
                            confidence: 94.12%
                          rt:
                            value: '001'
                            confidence: 98.44%
                          rw:
                            value: '004'
                            confidence: 98.44%
                          village:
                            value: BRAGA
                            confidence: 96.70%
                          district:
                            value: SUMUR BANDUNG
                            confidence: 95.88%
                        religion:
                          value: ISLAM
                          confidence: 99.11%
                        maritalStatus:
                          value: BELUM KAWIN
                          confidence: 97.25%
                        occupation:
                          value: PELAJAR/MAHASISWA
                          confidence: 93.80%
                        citizenship:
                          value: WNI
                          confidence: 99.40%
                        validUntil:
                          value: SEUMUR HIDUP
                          confidence: 98.95%
                        province:
                          value: JAWA BARAT
                          confidence: 99.02%
                        city:
                          value: KOTA BANDUNG
                          confidence: 98.77%
                        issuedDate: null
                        signature: null
                        photo: null
                      missingFields:
                        - nik
                    verificationStatus: REVIEW_NEEDED
                    verificationStatusCode: 2
                    transactionId: 5c8e0a41-7b2f-4d93-a6c1-e04f8b3d7215
                    verificationType: ktp_details_extraction
                    metadata: null
                    createdAt: '2026-09-01T04:31:52.000000Z'
                rejected:
                  summary: rejected — REJECTED
                  value:
                    success: true
                    message: Indonesia KTP details extraction processed successfully
                    data:
                      outcome: rejected
                      fields:
                        nik: null
                        name: null
                        placeOfBirth: null
                        dateOfBirth: null
                        gender: null
                        bloodType: null
                        address:
                          street: null
                          rt: null
                          rw: null
                          village: null
                          district: null
                        religion: null
                        maritalStatus: null
                        occupation: null
                        citizenship: null
                        validUntil: null
                        province: null
                        city: null
                        issuedDate: null
                        signature: null
                        photo: null
                      missingFields:
                        - nik
                        - name
                      errorReason: wrong_document_type
                      errorMessage: The uploaded document does not appear to be a Ktp
                    verificationStatus: REJECTED
                    verificationStatusCode: 1
                    transactionId: b1d97f06-3ac5-4e28-9f70-8c6153ba04de
                    verificationType: ktp_details_extraction
                    metadata:
                      clientReference: ORDER-88219
                    createdAt: '2026-09-01T04:35:08.000000Z'
        '400':
          description: The request body or the submitted image failed validation.
          content:
            application/json:
              examples:
                missingImage:
                  summary: Missing documentImage
                  value:
                    success: false
                    code: VALIDATION_FAILED
                    message: >-
                      The request could not be validated. Please check the
                      submitted fields.
                    errors:
                      documentImage:
                        - documentImage is required.
                    transactionId: null
                    verificationType: ktp_details_extraction
                    createdAt: '2026-09-01T06:03:15.000000Z'
                invalidImage:
                  summary: Undecodable image
                  value:
                    success: false
                    code: VALIDATION_FAILED
                    message: documentImage must be a valid image file or base64 image
                    verificationStatus: FAILED
                    verificationStatusCode: 6
                    transactionId: 3b7d51e9-c204-48fa-91b6-05e7a83cd142
                    verificationType: ktp_details_extraction
                    metadata:
                      clientReference: ORDER-88231
                    createdAt: '2026-09-01T06:12:04.000000Z'
        '500':
          description: >-
            The request could not be processed — either an internal error
            occurred, or the OCR source was unavailable. Check `code` to
            distinguish the two.
          content:
            application/json:
              examples:
                sourceUnavailable:
                  summary: SOURCE_UNAVAILABLE
                  value:
                    success: false
                    code: SOURCE_UNAVAILABLE
                    message: Mistral upstream error (HTTP 503).
                    verificationStatus: FAILED
                    verificationStatusCode: 6
                    transactionId: aa17c4e2-58b9-4f03-9d61-7bc2054ea38f
                    verificationType: ktp_details_extraction
                    metadata:
                      clientReference: ORDER-88240
                    createdAt: '2026-09-01T06:21:09.000000Z'
                internalError:
                  summary: INTERNAL_ERROR
                  value:
                    success: false
                    code: INTERNAL_ERROR
                    message: >-
                      An internal error has occurred while processing your
                      request. Please try again later.
                    verificationStatus: FAILED
                    verificationStatusCode: 6
                    transactionId: e4c8103f-7a25-4b6d-8109-2fb95c7ed034
                    verificationType: ktp_details_extraction
                    metadata:
                      clientReference: ORDER-88255
                    createdAt: '2026-09-01T06:32:07.000000Z'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Use your API token as a Bearer token in the `Authorization` header.

````