MENU
      Driver's license

        Driver's license


        Article summary

        Available in Classic and VPC

        Recognize and extract key-value input information from driver's licenses using a specialized model engine.

        Request

        This section describes the request format. The method and URI are as follows:

        MethodURI
        POST/id-card

        Request headers

        For information about the headers common to all CLOVA OCR APIs, see CLOVA OCR request headers.

        Request body

        You can include the following data in the body of your request:

        If Content-Type: application/json

        You can include the following data in the body of your request if the request header's Content-Type is application/json:

        FieldTypeRequiredDescription
        versionString-Version information
        • Only use V2
        requestIdStringRequiredRandom API call UUID
        timestampIntegerRequiredRandom API call time (timestamp)
        imagesArrayRequiredimages details

        If Content-Type: multipart/form-data

        You can include the following data in the body of your request if the request header's Content-Type is multipart/form-data:

        FieldTypeRequiredDescription
        messageObjectRequiredRequest data information
        message.versionStringRequiredVersion information
        • Only use V2
        message.requestIdStringRequiredRandom API call UUID
        message.timestampIntegerRequiredRandom API call time (timestamp)
        message.imagesArrayRequiredimages details
        fileFileRequiredOCR recognition image file

        images

        The following describes images.

        FieldTypeRequiredDescription
        formatStringRequiredImage format
        • jpg | jpeg | png | pdf | tif | tiff
          • Image: jpg, jpeg, png
          • Single page: pdf, tif, tiff
        • Select and enter one of the image formats
        nameStringRequiredRandom image name
        • Use to identify images and check response results
        dataStringRequiredBase64-encoded image data
        • Can be entered if Content-Type: application/json

        Request example

        The request example is as follows:

        If Content-Type: application/json

        The request example if the request header's Content-Type is application/json is as follows:

        curl --location --request POST 'https://cbgrx5natw.apigw.ntruss.com/custom/v1/{DomainId}/{InvokeKey}/document/id-card' \
        --header 'Content-Type: application/json' \
        --header 'X-OCR-SECRET: {Secret key issued when registering the app}' \
        --data '{
            "version": "V2",
            "requestId": "string",
            "timestamp": 0,
            "images": [
                {
                    "format": "png",
                    "name": "driverlicense_test",
                    "data":"{Base64-encoded image data}"
                }
            ]
         }'
        Shell

        If Content-Type: multipart/form-data

        The request example if the request header's Content-Type is multipart/form-data is as follows:

        curl --location --request POST 'https://cbgrx5natw.apigw.ntruss.com/custom/v1/{DomainId}/{InvokeKey}/document/id-card' \
        --header 'X-OCR-SECRET: {Secret key issued when registering the app}' \
        --header 'Content-Type: multipart/form-data' \
        --form 'message="{\"version\": \"V2\", \"requestId\": \"1234\", \"timestamp\": 0, \"images\": [{\"format\": \"png\", \"name\": \"driverlicense_test\"}]}"' \
        --form 'file=@"{file}"'
        Shell

        Response

        This section describes the response format.

        Response body

        The response body includes the following data:

        FieldTypeRequiredDescription
        versionString-Version information
        • Only use V2
        requestIdString-Random API call UUID
        timestampInteger-API call time (timestamp)
        imagesArray-images details

        images

        The following describes images.

        FieldTypeRequiredDescription
        uidString-Driver's license image UID
        • Use for API validity checks
        nameString-Driver's license image name
        • Use to identify images and check response results
        inferResultString-Driver's license image recognition result
        • SUCCESS | FAILURE | ERROR
          • SUCCESS: recognition successful
          • FAILURE: recognition failure
          • ERROR: recognition processing exception
        messageString-Result message
        validationResultObject-Validity check result information
        validationResult.resultString-Validity check result code
        • NO_REQUESTED | UNCHECKED | ERROR | VALID | INVALID
          • NO_REQUESTED: no validation action requested (validity check failed)
          • UNCHECKED: unable to verify validation
          • ERROR: error on validation (validity check failed)
          • VALID: validation result valid (validity check succeeded)
          • INVALID: failed to pass validation
        validationResult.messageString-Validity check result details message
        • This value is not always returned
        convertedImageInfoObject-Converted image information
        • If format is pdf or tiff
        • Coordinate values are set relative to the called image file
        convertedImageInfo.widthInteger-Converted image width
        convertedImageInfo.heightInteger-Converted image height
        convertedImageInfo.pageIndexInteger-Converted image page index
        idCardObject-ID card details
        idCard.metaObject-Meta information
        idCard.meta.estimatedLanguageString-OCR estimated language
        • ko | en | ja
          • ko:Korean
          • en: English
          • ja: Japanese
        idCard.resultObject-ID card OCR recognition result

        result

        The following describes result.

        FieldTypeRequiredDescription
        isConfidentBoolean-Whether it has details for each type
        • true | false
          • true: has
          • false: doesn't have
        dlObject-Driver's license information
        dl.typeArray-Driver's license type details
        dl.numArray-Driver's license number details
        dl.nameArray-Name details
        dl.personalNumArray-Resident registration number details
        dl.addressArray-Address details
        dl.renewStartDateArray-Renewal period start date details
        dl.renewEndDateArray-Renewal period end date details
        dl.conditionArray-Driver's license condition details
        dl.codeArray-Driver's license code details
        dl.organDonationArray-Organ and tissue donation registration details
        dl.issueDateArray-Issuance date details
        dl.authorityArray-Issuing authority details
        roisArray-Object border position information
        idTypeString-ID card type
        • Driver's License

        type

        The following describes dl.type.

        FieldTypeRequiredDescription
        textString-Recognized type text
        keyTextString-Key value of recognized type text
        confidenceScoreFloat-Confidence of recognized type text
        • 0 - 1
        • The higher the confidence value, the more accurate the text is
        boundingPolysArray-boundingPoly details

        num

        The following describes dl.num.

        FieldTypeRequiredDescription
        textString-Recognized number text
        formattedObject-Recognized number text information
        formatted.valueString-Recognized number text value
        keyTextString-Key value of recognized number text
        confidenceScoreFloat-Confidence of recognized number text
        • 0 - 1
        • The higher the confidence value, the more accurate the text is
        boundingPolysArray-boundingPoly details
        maskingPolysArray-maskingPoly details

        name

        The following describes dl.name.

        FieldTypeRequiredDescription
        textString-Recognized name text
        formattedObject-Recognized name text information
        formatted.valueString-Recognized name text value
        keyTextString-Key value of recognized name text
        confidenceScoreFloat-Confidence of recognized name text
        • 0 - 1
        • The higher the confidence value, the more accurate the text is
        boundingPolysArray-boundingPoly details
        maskingPolysArray-maskingPoly details

        personalNum

        The following describes dl.personalNum.

        FieldTypeRequiredDescription
        textString-Recognized resident registration number text
        formattedObject-Recognized resident registration number text information
        formatted.valueString-Recognized resident registration number text value
        keyTextString-Key value of recognized resident registration number text
        confidenceScoreFloat-Confidence of recognized resident registration number text
        • 0 - 1
        • The higher the confidence value, the more accurate the text is
        boundingPolysArray-boundingPoly details
        maskingPolysArray-maskingPoly details

        address

        The following describes dl.address.

        FieldTypeRequiredDescription
        textString-Recognized address text
        formattedObject-Recognized address text information
        formatted.valueString-Recognized address text value
        keyTextString-Key value of recognized address text
        confidenceScoreFloat-Confidence of recognized address text
        • 0 - 1
        • The higher the confidence value, the more accurate the text is
        boundingPolysArray-boundingPoly details
        maskingPolysArray-maskingPoly details

        Date object information

        The following describes the date object.

        FieldTypeRequiredDescription
        textString-Recognized date text
        formattedObject-Recognized date text information
        formatted.yearString-Year (yyyy) of recognized date
        formatted.monthString-Month (MM) of recognized date
        formatted.dayString-Day (dd) of recognized date
        keyTextString-Key value of recognized date text
        confidenceScoreFloat-Confidence of recognized date text
        • 0 - 1
        • The higher the confidence value, the more accurate the text is
        boundingPolysArray-boundingPoly details
        maskingPolysArray-maskingPoly details

        condition

        The following describes dl.condition.

        FieldTypeRequiredDescription
        textString-Recognized condition text
        keyTextString-Key value of recognized condition text
        confidenceScoreFloat-Confidence of recognized condition text
        • 0 - 1
        • The higher the confidence value, the more accurate the text is
        boundingPolysArray-boundingPoly details
        maskingPolysArray-maskingPoly details

        code

        The following describes dl.code.

        FieldTypeRequiredDescription
        textString-Recognized code text
        formattedObject-Recognized code text information
        formatted.valueString-Recognized code text value
        keyTextString-Key value of recognized code text
        confidenceScoreFloat-Confidence of recognized code text
        • 0 - 1
        • The higher the confidence value, the more accurate the text is
        boundingPolysArray-boundingPoly details
        maskingPolysArray-maskingPoly details

        organDonation

        The following describes dl.organDonation.

        FieldTypeRequiredDescription
        textString-Recognized organ and tissue donation text
        keyTextString-Key value of recognized organ and tissue donation text
        confidenceScoreFloat-Confidence of recognized organ and tissue donation text
        • 0 - 1
        • The higher the confidence value, the more accurate the text is
        boundingPolysArray-boundingPoly details
        maskingPolysArray-maskingPoly details

        authority

        The following describes dl.authority.

        FieldTypeRequiredDescription
        textString-Recognized issuing authority text
        formattedObject-Recognized issuing authority text information
        formatted.valueString-Recognized issuing authority text value
        keyTextString-Key value of recognized issuing authority text
        confidenceScoreFloat-Confidence of recognized issuing authority text
        • 0 - 1
        • The higher the confidence value, the more accurate the text is
        boundingPolysArray-boundingPoly details
        maskingPolysArray-maskingPoly details

        rois

        The following describes rois.

        FieldTypeRequiredDescription
        FieldTypeRequiredDescription
        ------------
        xFloat-Object border position X-axis coordinate value
        yFloat-Object border position Y-axis coordinate value

        boundingPolys

        The following describes boundingPolys.

        FieldTypeRequiredDescription
        verticesArray-vertices details

        maskingPolys

        The following describes maskingPolys.

        FieldTypeRequiredDescription
        verticesArray-vertices details

        boundingPolyVertices

        The following describes boundingPolyVertices.

        FieldTypeRequiredDescription
        xFloat-X-axis coordinate value
        yFloat-Y-axis coordinate value

        Response status codes

        For response status codes common to all CLOVA OCR APIs, see Common CLOVA OCR response status codes.

        Response example

        The response example is as follows:

        Success

        The following is a sample response upon a successful call.

        {
            "version": "V2",
            "requestId": "1234",
            "timestamp": 1725409664957,
            "images": [
                {
                    "uid": "{uid}",
                    "name": "driverlicense_test",
                    "inferResult": "SUCCESS",
                    "message": "SUCCESS",
                    "validationResult": {
                        "result": "NO_REQUESTED"
                    },
                    "idCard": {
                        "meta": {
                            "estimatedLanguage": "ko"
                        },
                        "result": {
                            "isConfident": true,
                            "dl": {
                                "type": [
                                    {
                                        "text": "Class 1 Large Class 1 Ordinary Class 1 Small Special (Large tow, Small tow, Rescue) Class 2 Ordinary Class 2 Small Motorcycle",
                                        "keyText": "",
                                        "confidenceScore": 0.0,
                                        "boundingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 6.875,
                                                        "y": 20.625
                                                    },
                                                    {
                                                        "x": 77.5,
                                                        "y": 20.625
                                                    },
                                                    {
                                                        "x": 77.5,
                                                        "y": 42.5
                                                    },
                                                    {
                                                        "x": 6.875,
                                                        "y": 42.5
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                ],
                                "num": [
                                    {
                                        "text": "**-**-******-**",
                                        "formatted": {
                                            "value": "**-**-******-**"
                                        },
                                        "keyText": "",
                                        "confidenceScore": 0.0,
                                        "boundingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 270.66333,
                                                        "y": 81.96319
                                                    },
                                                    {
                                                        "x": 615.7258,
                                                        "y": 83.148964
                                                    },
                                                    {
                                                        "x": 615.59015,
                                                        "y": 122.63947
                                                    },
                                                    {
                                                        "x": 270.52765,
                                                        "y": 121.4537
                                                    }
                                                ]
                                            }
                                        ],
                                        "maskingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 404.75287,
                                                        "y": 78.474884
                                                    },
                                                    {
                                                        "x": 619.68854,
                                                        "y": 79.213486
                                                    },
                                                    {
                                                        "x": 619.5257,
                                                        "y": 126.60209
                                                    },
                                                    {
                                                        "x": 404.59003,
                                                        "y": 125.86349
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                ],
                                "name": [
                                    {
                                        "text": "Hong**",
                                        "formatted": {
                                            "value": "Hong**"
                                        },
                                        "keyText": "",
                                        "confidenceScore": 0.0,
                                        "boundingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 268.125,
                                                        "y": 130.0
                                                    },
                                                    {
                                                        "x": 358.75,
                                                        "y": 130.0
                                                    },
                                                    {
                                                        "x": 358.75,
                                                        "y": 164.375
                                                    },
                                                    {
                                                        "x": 268.125,
                                                        "y": 164.375
                                                    }
                                                ]
                                            }
                                        ],
                                        "maskingPolys": []
                                    }
                                ],
                                "personalNum": [
                                    {
                                        "text": "******-*******",
                                        "formatted": {
                                            "value": "******-*******"
                                        },
                                        "keyText": "",
                                        "confidenceScore": 0.0,
                                        "boundingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 264.71436,
                                                        "y": 161.93407
                                                    },
                                                    {
                                                        "x": 496.74896,
                                                        "y": 159.34149
                                                    },
                                                    {
                                                        "x": 497.16132,
                                                        "y": 196.25029
                                                    },
                                                    {
                                                        "x": 265.1267,
                                                        "y": 198.84286
                                                    }
                                                ]
                                            }
                                        ],
                                        "maskingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 376.99954,
                                                        "y": 156.98816
                                                    },
                                                    {
                                                        "x": 500.39862,
                                                        "y": 155.60939
                                                    },
                                                    {
                                                        "x": 500.89346,
                                                        "y": 199.89995
                                                    },
                                                    {
                                                        "x": 377.49442,
                                                        "y": 201.27872
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                ],
                                "address": [
                                    {
                                        "text": "Seoul***",
                                        "formatted": {
                                            "value": "Seoul***"
                                        },
                                        "keyText": "",
                                        "confidenceScore": 0.0,
                                        "boundingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 263.125,
                                                        "y": 232.5
                                                    },
                                                    {
                                                        "x": 301.25,
                                                        "y": 232.5
                                                    },
                                                    {
                                                        "x": 301.25,
                                                        "y": 258.75
                                                    },
                                                    {
                                                        "x": 263.125,
                                                        "y": 258.75
                                                    }
                                                ]
                                            }
                                        ],
                                        "maskingPolys": []
                                    }
                                ],
                                "renewStartDate": [
                                    {
                                        "text": "2029.01.01",
                                        "formatted": {
                                            "year": "2029",
                                            "month": "01",
                                            "day": "01"
                                        },
                                        "keyText": "",
                                        "confidenceScore": 0.0,
                                        "boundingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 402.39316,
                                                        "y": 300.80316
                                                    },
                                                    {
                                                        "x": 531.2038,
                                                        "y": 300.008
                                                    },
                                                    {
                                                        "x": 531.3579,
                                                        "y": 324.9801
                                                    },
                                                    {
                                                        "x": 402.54727,
                                                        "y": 325.7752
                                                    }
                                                ]
                                            }
                                        ],
                                        "maskingPolys": []
                                    }
                                ],
                                "renewEndDate": [
                                    {
                                        "text": "2029 12.31",
                                        "formatted": {
                                            "year": "2029",
                                            "month": "12",
                                            "day": "31"
                                        },
                                        "keyText": "",
                                        "confidenceScore": 0.0,
                                        "boundingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 425.987,
                                                        "y": 332.6018
                                                    },
                                                    {
                                                        "x": 481.51587,
                                                        "y": 329.9576
                                                    },
                                                    {
                                                        "x": 482.8507,
                                                        "y": 357.98932
                                                    },
                                                    {
                                                        "x": 427.32184,
                                                        "y": 360.6335
                                                    }
                                                ]
                                            }
                                        ],
                                        "maskingPolys": []
                                    }
                                ],
                                "condition": [
                                    {
                                        "text": "Geon 8",
                                        "keyText": "",
                                        "confidenceScore": 0.0,
                                        "boundingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 341.875,
                                                        "y": 361.25
                                                    },
                                                    {
                                                        "x": 367.5,
                                                        "y": 361.25
                                                    },
                                                    {
                                                        "x": 367.5,
                                                        "y": 388.75
                                                    },
                                                    {
                                                        "x": 341.875,
                                                        "y": 388.75
                                                    }
                                                ]
                                            }
                                        ],
                                        "maskingPolys": []
                                    }
                                ],
                                "code": [
                                    {
                                        "text": "H1***",
                                        "formatted": {
                                            "value": "H1***"
                                        },
                                        "keyText": "",
                                        "confidenceScore": 0.0,
                                        "boundingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 582.5,
                                                        "y": 351.87497
                                                    },
                                                    {
                                                        "x": 690.625,
                                                        "y": 351.87497
                                                    },
                                                    {
                                                        "x": 690.625,
                                                        "y": 379.99997
                                                    },
                                                    {
                                                        "x": 582.5,
                                                        "y": 379.99997
                                                    }
                                                ]
                                            }
                                        ],
                                        "maskingPolys": []
                                    }
                                ],
                                "organDonation": [
                                    {
                                        "text": "Organ and tissue donation",
                                        "keyText": "",
                                        "confidenceScore": 0.0,
                                        "boundingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 59.375,
                                                        "y": 454.375
                                                    },
                                                    {
                                                        "x": 105.625,
                                                        "y": 454.375
                                                    },
                                                    {
                                                        "x": 105.625,
                                                        "y": 479.375
                                                    },
                                                    {
                                                        "x": 59.375,
                                                        "y": 479.375
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                ],
                                "issueDate": [
                                    {
                                        "text": "2019.09.10",
                                        "formatted": {
                                            "year": "2019",
                                            "month": "09",
                                            "day": "10"
                                        },
                                        "keyText": "",
                                        "confidenceScore": 0.0,
                                        "boundingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 249.375,
                                                        "y": 443.75
                                                    },
                                                    {
                                                        "x": 368.125,
                                                        "y": 443.75
                                                    },
                                                    {
                                                        "x": 368.125,
                                                        "y": 475.0
                                                    },
                                                    {
                                                        "x": 249.375,
                                                        "y": 475.0
                                                    }
                                                ]
                                            }
                                        ],
                                        "maskingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 246.28294,
                                                        "y": 440.82266
                                                    },
                                                    {
                                                        "x": 411.842,
                                                        "y": 440.82266
                                                    },
                                                    {
                                                        "x": 411.842,
                                                        "y": 477.9273
                                                    },
                                                    {
                                                        "x": 246.28294,
                                                        "y": 477.9273
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                ],
                                "authority": [
                                    {
                                        "text": "Seoul Metropolitan Police Agency",
                                        "formatted": {
                                            "value": "Seoul Metropolitan Police Commissioner"
                                        },
                                        "keyText": "",
                                        "confidenceScore": 0.0,
                                        "boundingPolys": [
                                            {
                                                "vertices": [
                                                    {
                                                        "x": 402.79678,
                                                        "y": 436.09882
                                                    },
                                                    {
                                                        "x": 651.7483,
                                                        "y": 433.49652
                                                    },
                                                    {
                                                        "x": 652.1772,
                                                        "y": 474.53296
                                                    },
                                                    {
                                                        "x": 403.2257,
                                                        "y": 477.13528
                                                    }
                                                ]
                                            }
                                        ],
                                        "maskingPolys": []
                                    }
                                ]
                            },
                            "rois": [
                                {
                                    "vertices": [
                                        {
                                            "x": -4.7505364,
                                            "y": -5.066147
                                        },
                                        {
                                            "x": 712.13684,
                                            "y": -2.8448386
                                        },
                                        {
                                            "x": 714.93665,
                                            "y": 480.58566
                                        },
                                        {
                                            "x": -2.094209,
                                            "y": 492.42014
                                        }
                                    ]
                                }
                            ],
                            "idtype": "Driver's License"
                        }
                    }
                }
            ]
        }
        JSON

        Failure

        The following is a sample response upon a failed call.

        {
            "version": "V2",
            "requestId": "1234",
            "timestamp": 1725235840459,
            "images": [
                {
                    "uid": "{uid}",
                    "name": "idcard_sample",
                    "inferResult": "ERROR",
                    "message": "Read page:0 error.",
                    "validationResult": {
                        "result": "NO_REQUESTED"
                    }
                }
            ]
        }
        JSON

        Was this article helpful?

        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.