CLOVA OCR Document API
    • PDF

    CLOVA OCR Document API

    • PDF

    Article Summary

    version

    VersionDateChanges
    v1.0.02021-03-04First written
    v1.0.22021-07-22foundValuesSum -> foundValueSum
    Add maskingPolys to ID card
    v1.0.32021-09-16Add alien registration card to ID card
    v1.0.42022-04-21Indicate on the corner of the ID card
    Add alienRegNumEtc to alien registration card
    Add name to credit card
    v1.0.52023-05-25Passport MRZ API
    v1.0.62023-11-23Add receipt VAT and discount amount

    Requests

    MethodRequest URI
    POSTCalls to API Gateway's InvokeURL created from CLOVA OCR builder.
    A unique call URL is generated for each domain.

    Requesting document OCR recognition

    ClassificationDescriptionPath
    DocumentReceipt/document/receipt
    DocumentCredit card/document/credit-card
    DocumentBusiness card/document/name-card
    DocumentBusiness registration certificate/document/biz-license
    DocumentID card (resident registration certificate, driver's license, passport)/document/id-card
    DocumentPassport (global)/document/passport

    Request headers

    Header nameDescription
    X-OCR-SECRETX-OCR-SECRET:{Client Secret} created when linking API Gateway on the domain
    Content-TypeApplication/json: use the main text of JSON in the request. Supports image.data encoded with Base64.
    - multipart/form-data: use the multipart text in the request. Supports image files transmitted through streaming.

    Request bodies

    Content-Type : application/json

    1. Image recognition request
    ClassificationJson Model
    Image recognition request{
    "version": "string",
    "requestId": "string",
    "timestamp": 0,
    "images": [{ "format": "string", "data": "string", "name": "string"}]
    }

    Detailed descriptions of image recognition request fields

    Field nameRequirement statusTypeDescriptionRestrictions
    versionYesstringFix as "V2"
    requestIdYesstringIt is the API call UUID.
    timestampYes0It is the API call timestamp value.
    imagesYesstringThis is entered as a JSON array, but only 1 image can be entered currently. (Korean/Japanese)
    images.formatYesstringIt sets the image format.It supports ".jpg," ".jpeg," and ".png" images, as well as single-page ".pdf" and ".tiff" formats.
    image.dataYesstringimage.data is base64 encoding image bytes.
    image.nameYesstringEnter the name for the image. It is used to identify the image, as well as for checking the response result.

    CURL example:

    curl --request POST 'your apigw invoke url' \
    --header 'X-OCR-SECRET: your secret key' \
    --data-raw '{"images":[{"format":"jpg","name":"demo","data":"your image base64 bytes"}],"requestId":"guide-json-demo","version":"V2","timestamp":1584062336793}'
    

    Content-Type : multipart/form-data

    1. Image recognition request
    KEYRequiredVALUE
    messageY{"version": "string","requestId": "string","timestamp": 0,"images": [{ "format": "string", "name": "string" }]}
    fileYimage file steam data

    Form Data Message Value Description

    Field nameRequiredTypeDescriptionConstraints
    versionYesstringFix as "V2"
    requestIdYesstringIt is the API call UUID.
    timestampYesintegerIt is the API call timestamp value.
    imagesYesstringIt is entered as a JSON array, but only one image can be entered currently.
    images.formatYesstringIt sets the image format.It supports ".jpg," ".jpeg," and ".png" images, as well as single-page ".pdf" and ".tiff" formats.
    image.nameYesstringEnter the name for the image. It is used to identify the image, as well as for checking the response result.

    CURL example:

    curl --request POST 'your apigw invoke url' \
    --header 'X-OCR-SECRET: your secret key' \
    --form 'message={"images":[{"format":"png","name":"demo"}],"requestId":"guide-demo","version":"V2","timestamp":1584062336793}' \
    --form 'file=@image.png'
    

    Responses

    Response bodies

    1. Image recognition results
    ClassificationJson Model
    Image recognition results{
    "uid": "string",
    "name": "string",
    "inferResult": "string",
    "message": "string",
    "receipt": {},
    "creditCard": {},
    "bizLicense": {},
    "idCard": {},
    "nameCard": {},
    "passport": {},
    "validationResult": { "result": "string", "message": "string"}
    }

    Detailed description of the Image recognition results field

    Field NameData TypeDescription
    uidstringIt is a unique ID provided to check the validity of the API, and used to track the validity test request.
    namestringName of the requested image
    inferResultstringImage inference result
    "SUCCESS": image recognition successful. "FAILURE": image recognition failed. "ERROR": exception to image recognition.
    messagestring"SUCCESS" in case of successful image recognition.
    An error message is generated when image recognition fails.
    The error messages are displayed in detail at the bottom.
    receiptjson objectRefer to the receipt object
    creditCardjson objectRefer to the creditCard object
    bizLicensejson objectRefer to the bizLicense object
    idCardjson objectRefer to the idCard object
    nameCardjson objectRefer to the nameCard object
    passportjson objectRefer to the passport object
    validationResultjson objectValidity test result
    validationResult.resultstringResult code
    "NO_REQUESTED": the validation operation was not executed.
    "UNCHECKED": the response for the action wasn't confirmed, or the response was not accepted.
    "ERROR": error in validation operation.
    "VALID": the validation result is valid.
    "INVALID": the validation result is invalid.
    validationResult.messagestringIt is not a value always returned in the detailed message on the validation test.
    convertedImageInfojson objectIt responds only if the image format is PDF/TIFF.
    If the request format is PDF/TIFF, the coordinates are based on the converted image.
    convertedImageInfo.widthintegerDefault image width.
    convertedImageInfo.heightintegerDefault image height.
    convertedImageInfo.pageIndexintegerPage index of PDF/TIFF
    1. receipt object
    ClassificationJson Model
    receipt Field{
    "meta": {},
    "result": {},
    }

    Receipt Object Field Details

    Field NameData TypeDescription
    metajson objectMeta information
    meta.estimatedLanguagestringLanguage assumed by OCR (en: English, ja: Japanese, ko: Korean) | OCR recognition language
    resultjson objectRecognition result
    result.storeInfojson objectStore Information
    result.storeInfo.poiInfoPoiObject[]POI grounding result
    result.storeInfo.nameStringObjectCompany name
    result.storeInfo.subNameStringObjectBranch name
    result.storeInfo.bizNumStringObjectBusiness registration number
    result.storeInfo.movieNameStringObjectMovie name (item related to movie ticket)
    result.storeInfo.addressesStringObject[]Store address
    result.storeInfo.telTelObject[]Telephone number of the store
    result.paymentInfojson objectPayment information
    result.paymentInfo.dateDateObjectPayment date
    result.paymentInfo.timeTimeObjectPayment time
    result.paymentInfo.cardInfojson objectTransaction card information
    result.paymentInfo.cardInfo.companyStringObjectCard company name
    result.paymentInfo.cardInfo.numberStringObjectCard number
    result.paymentInfo.confirmNumBaseObjectPayment number
    result.subResultsjson arrayItem group information
    result.subResults.itemsjson arrayRecognized item information (menu, etc.)
    result.subResults.items.nameStringObjectItem name
    result.subResults.items.codeStringObjectItem code
    result.subResults.items.countFloatObjectItem quantity
    result.subResults.items.pricejson objectPricing data
    result.subResults.items.price.priceFloatObjectPrice
    result.subResults.items.price.unitPriceFloatObjectUnit price
    result.totalPricejson objectTotal amount information
    result.totalPrice.priceFloatObjectTotal amount
    result.subtotalFloatObjectGrand total information
    result.subtotal.taxpriceFloatObjectVAT
    result.subtotal.discountpriceFloatObjectDiscount amount
    1. creditCard object
    ClassificationJson Model
    creditCard Field{
    "meta": {},
    "result": {},
    }

    creditCard Object Field Details

    Field NameData TypeDescription
    metajson objectMeta information
    meta.estimatedLanguagestringLanguage assumed by OCR (en: English, ja: Japanese, ko: Korean)
    resultjson objectRecognition result
    result.numberField objectRefer to the Field object
    result.validThruField objectRefer to the Field object
    result.nameField objectName of card owner
    Refer to the Field object
    1. bizLicense object
    ClassificationJson Model
    bizLicense Field{
    "meta": {},
    "result": {},
    }

    bizLicense Object Field Details

    Field NameData TypeDescription
    metajson objectMeta information
    meta.estimatedLanguagestringLanguage assumed by OCR (en: English, ja: Japanese, ko: Korean)
    resultjson objectRecognition result
    result.birthBaseObject[]Date of birth
    result.bisAddressBaseObject[]Address of Business
    result.bisAreaBaseObject[]Business Place Location
    result.bisItemBaseObject[]Business item
    result.registerNumberBaseObject[]Business Registration Number
    result.bisTypeBaseObject[]Business area
    result.companyNameBaseObject[]Company name
    result.coRepNameBaseObject[]Name of joint representative
    result.corpNameBaseObject[]Name of corporation (group)
    result.corpRegisterNumBaseObject[]Business Registration Number
    result.coRepSocialNumBaseObject[]Resident registration number of joint representative
    result.documentTypeStringObject[]Document type
    result.headAddressBaseObject[]Head office address
    result.issuanceDateBaseObject[]Issuance date
    result.issuanceReasonBaseObject[]Reason for issuance
    result.openDateBaseObject[]Business start date
    result.repNameBaseObject[]Name of representative
    result.socialNumberBaseObject[]Resident registration number
    result.taxTypeBaseObject[]Type of taxation
    1. idCard object
    ClassificationJson Model
    idcard Field{
    "meta": {},
    "result": {},
    }

    idCard Object Field Details

    Field NameData TypeDescription
    metajson objectMeta information
    meta.estimatedLanguagestringLanguage assumed by OCR (en: English, ja: Japanese, ko: Korean)
    resultjson objectRecognition result
    result.isConfidentbooleanIndicator reflecting the required reliability criteria
    If each ID type contains the required detailed information, it generates "True," but if not, "False."
    result.IDTypestringID type
    The return result is "ID," "driver's license," "passport" or "unknown."
    result.roisBoundingPoly[]Object corner location information
    result.icjson objectResident registration card information
    result.ic.nameStringObject[]Name (Korean)
    result.ic.personalNumStringObject[]Resident registration number
    result.ic.addressStringObject[]Address
    result.ic.issueDateDateObject[]Issuance date
    result.ic.authorityStringObject[]Issuing institution
    result.dljson objectDriver's license information
    result.dl.typeBaseObject[]License type
    result.dl.numStringObject[]License number
    result.dl.nameStringObject[]Name (Korean)
    result.dl.personalNumStringObject[]Resident registration number
    result.dl.addressStringObject[]Address
    result.dl.renewStartDateDateObject[]Renewal Period Start Date
    result.dl.renewEndDateDateObject[]Renewal Period End Date
    result.dl.conditionStringObject[]Licensing Condition
    result.dl.codeStringObject[]License Code
    result.dl.organDonationBaseObject[]Organ and tissue donation registration
    result.dl.issueDateDateObject[]Issuance date
    result.dl.authorityStringObject[]Issuing institution
    result.ppjson objectPassport information
    result.pp.typeStringObject[]Passport type
    result.pp.issueCountryBaseObject[]Issuing country
    result.pp.numStringObject[]Passport number
    result.pp.surNameStringObject[]Last name
    result.pp.givenNameStringObject[]Name
    result.pp.nationalityStringObject[]Nationality
    result.pp.birthDateDateObject[]Date of birth
    result.pp.personalNumStringObject[]Resident registration number
    result.pp.sexStringObject[]Gender
    result.pp.issueDateDateObject[]Issuance date
    result.pp.expireDateDateObject[]Expiration date
    result.pp.authorityBaseObject[]Issuing institution
    result.pp.fullNameKorStringObject[]Name (Korean)
    result.pp.MRZ1StringObject[]Machine Readable Zone (MRZ) 1
    result.pp.MRZ2StringObject[]Machine Readable Zone (MRZ) 2
    result.acjson objectAlien registration information
    result.ac.alienRegNumStringObject[]Alien Registration Number
    result.ac.sexStringObject[]Gender
    result.ac.nameStringObject[]Name
    result.ac.nationalityStringObject[]Nationality
    result.ac.visaTypeStringObject[]Visa type
    result.ac.issueDateDateObject[]Issuance date
    result.ac.authorityStringObject[]Issuing institution
    result.ac.authorityEngStringObject[]Issuing institution (English)
    result.ac.alienRegNumEtcStringObject[]Alien Registration Number, etc.
    1. nameCard object
    ClassificationJson Model
    nameCard Field{
    "meta": {},
    "result": {},
    }

    nameCard Object Field Details

    Field NameData TypeDescription
    metajson objectMeta information
    meta.estimatedLanguagestringLanguage assumed by OCR (en: English, ja: Japanese, ko: Korean)
    resultjson objectRecognition result
    result.nameStringObject[]Name information
    result.nameFuriganaStringObject[]Furigana name information (respond only when the language is "ja")
    result.companyStringObject[]Company Information
    result.departmentStringObject[]Department Information
    result.addressStringObject[]Address information
    result.positionStringObject[]Job Title Information
    result.mobileTelObject[]Mobile phone information
    result.telTelObject[]Telephone information
    result.faxTelObject[]Fax information
    result.emailStringObject[]Email information
    result.homepageStringObject[]Website information
    1. passport object
    ClassificationJson Model
    passport Field{
    " passportResult": {},
    }

    passport Object Field Details

    Field NameData TypeDescription
    passportResultjson objectRecognition result
    passportResult.documentClassCodeMrzStringDocument code "Passport"
    passportResult.issuingStateCodeMrzStringIssuing country
    passportResult.firstNameMrzStringName
    passportResult.lastName1MrzStringFirst surname
    passportResult.lastName2MrzStringSecond surname
    passportResult.documentNumberMrzStringPassport number
    passportResult.checkDigitForDocumentNumberMrzStringConfirmation number on document number
    passportResult.nationalityMrzStringNationality
    passportResult.dateOfBirthMrzStringDate of birth
    passportResult.ageMrzIntAge
    passportResult.checkDigitForDateOfBirthMrzStringConfirmation number on date of birth
    passportResult.genderMrzStringGender
    passportResult.dateOfExpiryMrzStringExpiration date
    passportResult.checkDigitForDateOfExpiryMrzStringConfirmation number on expiration date
    passportResult.personalNumberMrzStringResident registration number
    passportResult.checkDigitForPersonalNumberMrzStringConfirmation number on resident registration number
    passportResult.finalCheckDigitMrzStringFinal confirmation number
    passportResult.mrzTypeMrzStringMRZ type
    passportResult.mrzLinesMrzStringMRZ text
    passportResult.isExpiredMrzboolExpired
    1. field object
    ClassificationJson Model
    field Field{
    "text": "",
    "confidence": 0.0,
    "boundingPoly": {},
    "subBoundingPolys": []
    }

    field Object Field Details

    Field NameData TypeDescription
    textstringRecognition result text
    confidencefloatReliability of inference result. The higher the value between 0–1, the higher the accuracy.
    boundingPolyBoundingPoly objectRefer to the boundingPoly object
    subBoundingPolysBoundingPoly[]Refer to the boundingPoly object
    1. boundingPoly object
    ClassificationJson Model
    boundingPoly{
    "vertices":[{}]
    }

    boundingPoly Object Field Details

    Field NameData TypeDescription
    verticesvertices objectRefer to the vertices object
    1. vertices object
    ClassificationJson Model
    vertices{
    "x": 0.0,
    "y": 0.0
    }

    vertices Object Field Details

    Field NameData TypeDescription
    xfloatX coordinates
    yfloatY coordinates
    1. baseObject
    ClassificationJson Model
    baseObject{
    "text": "",
    "boundingPolys": [],
    "keyText":"",
    "confidenceScore":0.0
    }

    baseObject Field Details

    Field NameData TypeDescription
    textstringParsed text
    boundingPolysBoundingPoly[]Refer to the boundingPoly object
    keyTextstringKey value related to the parsed text
    confidenceScorefloatReliability of inference result. The higher the value between 0–1, the higher the accuracy.
    1. dateObject
    ClassificationJson Model
    dateObject{
    "text": "",
    "formatted": {},
    "boundingPolys": [],
    "maskingPolys":[],
    "keyText":"",
    "confidenceScore":0.0
    }

    dateObject Field Details

    Field NameData TypeDescription
    textstringParsed text
    formattedjson objectAdditional information on parsed text
    formatted.yearstringYear. Indicates year in a four-digit number. Follows the standard ISO 8601 format except that it may be an empty row of letters.
    formatted.monthstringMonthly. Indicates month in a two-digit number. Follows the standard ISO 8601 format except that it may be an empty row of letters.
    formatted.daystringDate. Indicates date in a two-digit number. Follows the standard ISO 8601 format except that it may be an empty row of letters.
    boundingPolysBoundingPoly[]Refer to the boundingPoly object
    maskingPolysBoundingPoly[]Personal data masking
    keyTextstringKey value related to the parsed text
    confidenceScorefloatReliability of inference result. The higher the value between 0–1, the higher the accuracy.
    1. timeObject
    ClassificationJson Model
    timeObject{
    "text": "",
    "formatted": {},
    "boundingPolys": [],
    "keyText":"",
    "confidenceScore":0.0
    }

    timeObject Field Details

    Field NameData TypeDescription
    textstringParsed text
    formattedjson objectAdditional information on parsed text
    formatted.hourstringHour. Indicates hour in a two-digit number. Follows the standard ISO 8601 format except that it may be an empty row of letters.
    formatted.minutestringMinute(s). Indicates minutes in a two-digit number. Follows the standard ISO 8601 format except that it may be an empty row of letters.
    formatted.secondstringSecond(s). Indicates seconds in a two-digit number. Follows the standard ISO 8601 format except that it may be an empty row of letters.
    boundingPolysBoundingPoly[]Refer to the boundingPoly object
    maskingPolysBoundingPoly[]Personal data masking
    keyTextstringKey value related to the parsed text
    confidenceScorefloatReliability of inference result. The higher the value between 0–1, the higher the accuracy.
    1. TelObject
    ClassificationJson Model
    TelObject{
    "text": "",
    "formatted": {},
    "boundingPolys": [],
    "keyText":"",
    "confidenceScore":0.0
    }

    TelObject Field Details

    Field NameData TypeDescription
    textstringParsed text
    formattedjson objectAdditional information on parsed text
    formatted.valuestringText with form indicating telephone number type. While usually a row of numbers, may include a telephone-number identification character (+). May be an empty row of letters if detailed recognition fails.
    boundingPolysBoundingPoly[]Refer to the boundingPoly object
    keyTextstringKey value related to the parsed text
    confidenceScorefloatReliability of inference result. The higher the value between 0–1, the higher the accuracy.
    1. FloatObject
    ClassificationJson Model
    FloatObject{
    "text": "",
    "formatted": {},
    "boundingPolys": [],
    "keyText":"",
    "confidenceScore":0.0
    }

    FloatObject Field Details

    Field NameData TypeDescription
    textstringParsed text
    formattedjson objectAdditional information on parsed text
    formatted.valuestringText with form indicating error type. Type of erroneous row of letters. Useful in indicating item price and count. May be an empty row of letters if detailed recognition fails.
    boundingPolysBoundingPoly[]Refer to the boundingPoly object
    keyTextstringKey value related to the parsed text
    confidenceScorefloatReliability of inference result. The higher the value between 0–1, the higher the accuracy.
    1. StringObject
    ClassificationJson Model
    StringObject{
    "text": "",
    "formatted": {},
    "boundingPolys": [],
    "maskingPolys": [],
    "keyText":"",
    "confidenceScore":0.0
    }

    StringObject Field Details

    Field NameData TypeDescription
    textstringParsed text
    formattedjson objectAdditional information on parsed text
    formatted.valuestringRefined text. Process of refinement differs based on the type of ID. May be an empty row of letters.
    boundingPolysBoundingPoly[]Refer to the boundingPoly object
    maskingPolysBoundingPoly[]Personal information
    keyTextstringKey value related to the parsed text
    confidenceScorefloatReliability of inference result. The higher the value between 0–1, the higher the accuracy.
    1. PoiObject
    ClassificationJson Model
    PoiObject{
    "gid": "",
    "title": "",
    "phone": "",
    "address": "",
    "roadAddress": "",
    "biznum": "",
    "confidence": ""
    }

    PoiObject Field Details

    Field NameData TypeDescription
    gidstringUnique user ID
    titlestringCompany name
    phonestringPhone Number
    addressstringAddress
    roadAddressstringRoad name address
    biznumstringBusiness registration number (can be null since it is not yet supported officially, but may be added later)
    confidencestringReliability (The greater the value, the more accurate it is.)

    18.Checksum object

    ClassificationJson Model
    checksum Field{
    "found": "",
    "foundValueIds": [],
    "foundValueSum": "",
    "foundTotalIds": [],
    "foundTotalSum": "",
    "foundTotalSum": ""
    }

    Checksum Object Field Details

    Field NameData TypeDescription
    foundjson objectFlag showing whether checksum field has been discovered
    foundValueIdsint[]ID list of discovered value cell
    foundValueSumfloatSum of discovered values
    foundTotalIdsint[]ID list of all discovered cells
    foundTotalSumfloatSum of all discovered values
    differencefloatDifference between value and all cells

    19.KeyCell object

    ClassificationJson Model
    KeyCell Field{
    "boundingPoly": {},
    "depth": "",
    "formatted": "",
    "group": "",
    "value": ""
    }

    KeyCell Object Field Details

    Field NameData TypeDescription
    boundingPolyBoundingPolyCoordinates of cell corner box
    depthstringDepth of discovered key cell
    formattedstringGrounding text of key cell
    groupstringIdentifying character for distinguishing between row and column keys
    valuestringUngrounded text in key cells

    20.ValueCell object

    ClassificationJson Model
    ValueCell Field{
    "boundingPoly": {},
    "confidence": "",
    "value": ""
    }

    ValueCell Object Field Details

    Field NameData TypeDescription
    boundingPolyBoundingPolyCoordinates of cell corner box
    confidencefloatReliability of value cell
    valuestringText of value cell

    21.MrzString object

    ClassificationJson Model
    MrzString Field{
    "rawText": "",
    "refinedText ": "",
    "postprocessed": [0]
    }

    MrzString Object Field Details

    Field NameData TypeDescription
    rawTextstringOriginal text
    refinedTextstringRefined text
    postprocessedint32Refinement method

    22.Mrzbool object

    ClassificationJson Model
    Mrzbool Field{
    "rawText": "",
    "refinedText ": "",
    "postprocessed": [0]
    }

    Mrzbool Object Field Details

    Field NameData TypeDescription
    rawTextstringOriginal text
    refinedTextboolRefined text
    postprocessedint32Refinement method

    23.MrzInt object

    ClassificationJson Model
    MrzInt Field{
    "rawText": "",
    "refinedText ": 0,
    "postprocessed": [0]
    }

    MrzInt Object Field Details

    Field NameData TypeDescription
    rawTextstringOriginal text
    refinedTextintRefined text
    postprocessedint32Refinement method

    Examples

    Document OCR request examples

    {
      "version": "V2",
      "requestId": "string",
      "timestamp": 0,
      "images": [
        {
          "format": "jpg",
          "name": "test 1",
          "data": "data"
        }
      ]
    }
    

    Credit card response examples

    {
        "version": "V2",
        "requestId": "string",
        "timestamp": 1613984515468,
        "images": [
            {
                "creditCard": {
                    "result": {
                        "number": {
                            "text": "5307123456749012",
                            "confidence": 0.96435016,
                            "boundingPoly": {
                                "vertices": [
                                    {
                                        "x": 64.0,
                                        "y": 218.0
                                    },
                                    {
                                        "x": 582.0,
                                        "y": 222.0
                                    },
                                    {
                                        "x": 582.0,
                                        "y": 265.0
                                    },
                                    {
                                        "x": 64.0,
                                        "y": 261.0
                                    }
                                ]
                            },
                            "subBoundingPolys": [
                                {
                                    "vertices": [
                                        {
                                            "x": 65.0,
                                            "y": 222.0
                                        },
                                        {
                                            "x": 175.0,
                                            "y": 225.0
                                        },
                                        {
                                            "x": 174.0,
                                            "y": 260.0
                                        },
                                        {
                                            "x": 64.0,
                                            "y": 257.0
                                        }
                                    ]
                                },
                                {
                                    "vertices": [
                                        {
                                            "x": 202.0,
                                            "y": 225.0
                                        },
                                        {
                                            "x": 312.0,
                                            "y": 225.0
                                        },
                                        {
                                            "x": 312.0,
                                            "y": 262.0
                                        },
                                        {
                                            "x": 202.0,
                                            "y": 262.0
                                        }
                                    ]
                                },
                                {
                                    "vertices": [
                                        {
                                            "x": 340.0,
                                            "y": 225.0
                                        },
                                        {
                                            "x": 445.0,
                                            "y": 225.0
                                        },
                                        {
                                            "x": 445.0,
                                            "y": 260.0
                                        },
                                        {
                                            "x": 340.0,
                                            "y": 260.0
                                        }
                                    ]
                                },
                                {
                                    "vertices": [
                                        {
                                            "x": 470.0,
                                            "y": 222.0
                                        },
                                        {
                                            "x": 582.0,
                                            "y": 222.0
                                        },
                                        {
                                            "x": 582.0,
                                            "y": 260.0
                                        },
                                        {
                                            "x": 470.0,
                                            "y": 260.0
                                        }
                                    ]
                                }
                            ]
                        }
                    }
                },
                "uid": "5f824ebe5b9744bb81bd3e1ef7f42e4e",
                "name": "testV2Demo",
                "inferResult": "SUCCESS",
                "message": "SUCCESS",
                "validationResult": {
                    "result": "NO_REQUESTED"
                }
            }
        ]
    }
    

    Receipt response examples

    {
    	"version": "V2",
    	"requestId": "string",
    	"timestamp": 1613984672273,
    	"images": [{
    		"receipt": {
    			"meta": {
    				"estimatedLanguage": "ko"
    			},
    			"result": {
    				"storeInfo": {
    					"name": {
    						"text": "emart everyday",
    						"formatted": {
    							"value": "emart everyday"
    						},
    						"boundingPolys": [{
    							"vertices": [{
    									"x": 263.0,
    									"y": 96.0
    								},
    								{
    									"x": 390.0,
    									"y": 100.0
    								},
    								{
    									"x": 389.0,
    									"y": 141.0
    								},
    								{
    									"x": 262.0,
    									"y": 137.0
    								}
    							]
    						}]
    					},
    					"subName": {
    						"text": "Bundang Jeongja II",
    						"formatted": {
    							"value": "Bundang Jeongja II"
    						},
    						"boundingPolys": [{
    							"vertices": [{
    									"x": 530.0,
    									"y": 102.0
    								},
    								{
    									"x": 611.0,
    									"y": 102.0
    								},
    								{
    									"x": 611.0,
    									"y": 122.0
    								},
    								{
    									"x": 530.0,
    									"y": 122.0
    								}
    							]
    						}]
    					},
    					"bizNum": {
    						"text": "212-81-25544",
    						"formatted": {
    							"value": "212-81-25544"
    						},
    						"boundingPolys": [{
    							"vertices": [{
    									"x": 402.0,
    									"y": 125.0
    								},
    								{
    									"x": 515.0,
    									"y": 124.0
    								},
    								{
    									"x": 515.0,
    									"y": 141.0
    								},
    								{
    									"x": 402.0,
    									"y": 142.0
    								}
    							]
    						}]
    					},
    					"addresses": [{
    						"text": "120, Jeongjail-ro, Bundang-gu, Seongnam-si, Gyeonggi-do",
    						"formatted": {
    							"value": "120, Jeongjail-ro, Bundang-gu, Seongnam-si, Gyeonggi-do"
    						},
    						"boundingPolys": [{
    							"vertices": [{
    									"x": 401.0,
    									"y": 144.0
    								},
    								{
    									"x": 432.0,
    									"y": 144.0
    								},
    								{
    									"x": 432.0,
    									"y": 165.0
    								},
    								{
    									"x": 401.0,
    									"y": 165.0
    								}
    							]
    						}]
    					}],
    					"tel": [{
    						"text": "(031)786-1171",
    						"formatted": {
    							"value": "0317861171"
    						},
    						"boundingPolys": [{
    							"vertices": [{
    									"x": 569.0,
    									"y": 122.0
    								},
    								{
    									"x": 716.0,
    									"y": 118.0
    								},
    								{
    									"x": 716.0,
    									"y": 140.0
    								},
    								{
    									"x": 570.0,
    									"y": 144.0
    								}
    							]
    						}]
    					}]
    				},
    				"paymentInfo": {
    					"date": {
    						"text": "2020-04-16",
    						"formatted": {
    							"year": "2020",
    							"month": "04",
    							"day": "16"
    						},
    						"boundingPolys": [{
    							"vertices": [{
    									"x": 261.0,
    									"y": 256.0
    								},
    								{
    									"x": 432.0,
    									"y": 260.0
    								},
    								{
    									"x": 431.0,
    									"y": 284.0
    								},
    								{
    									"x": 260.0,
    									"y": 280.0
    								}
    							]
    						}]
    					},
    					"time": {
    						"text": "20: 11",
    						"formatted": {
    							"hour": "20",
    							"minute": "11",
    							"second": "00"
    						},
    						"boundingPolys": [{
    							"vertices": [{
    									"x": 437.0,
    									"y": 261.0
    								},
    								{
    									"x": 468.0,
    									"y": 261.0
    								},
    								{
    									"x": 468.0,
    									"y": 279.0
    								},
    								{
    									"x": 437.0,
    									"y": 279.0
    								}
    							]
    						}]
    					},
    					"cardInfo": {
    						"company": {
    							"text": "Shinhan",
    							"formatted": {
    								"value": "Shinhan"
    							},
    							"boundingPolys": [{
    								"vertices": [{
    										"x": 309.0,
    										"y": 585.0
    									},
    									{
    										"x": 334.0,
    										"y": 585.0
    									},
    									{
    										"x": 334.0,
    										"y": 610.0
    									},
    									{
    										"x": 309.0,
    										"y": 610.0
    									}
    								]
    							}]
    						},
    						"number": {
    							"text": "4221**8666",
    							"formatted": {
    								"value": "4221**8666"
    							},
    							"boundingPolys": [{
    								"vertices": [{
    										"x": 522.0,
    										"y": 586.0
    									},
    									{
    										"x": 716.0,
    										"y": 592.0
    									},
    									{
    										"x": 716.0,
    										"y": 612.0
    									},
    									{
    										"x": 522.0,
    										"y": 606.0
    									}
    								]
    							}]
    						}
    					},
    					"confirmNum": {
    						"text": "28672931",
    						"boundingPolys": [{
    							"vertices": [{
    									"x": 522.0,
    									"y": 586.0
    								},
    								{
    									"x": 716.0,
    									"y": 592.0
    								},
    								{
    									"x": 716.0,
    									"y": 612.0
    								},
    								{
    									"x": 522.0,
    									"y": 606.0
    								}
    							]
    						}]
    					}
    				},
    				"subResults": [{
    					"items": [{
    						"name": {
    							"text": "Seagram Lemon 350 ml",
    							"formatted": {
    								"value": "Seagram Lemon 350 ml"
    							},
    							"boundingPolys": [{
    								"vertices": [{
    										"x": 310.0,
    										"y": 345.0
    									},
    									{
    										"x": 372.0,
    										"y": 345.0
    									},
    									{
    										"x": 372.0,
    										"y": 369.0
    									},
    									{
    										"x": 310.0,
    										"y": 369.0
    									}
    								]
    							}]
    						},
    						"count": {
    							"text": "2",
    							"formatted": {
    								"value": "2"
    							},
    							"boundingPolys": [{
    								"vertices": [{
    										"x": 601.0,
    										"y": 348.0
    									},
    									{
    										"x": 615.0,
    										"y": 348.0
    									},
    									{
    										"x": 615.0,
    										"y": 365.0
    									},
    									{
    										"x": 601.0,
    										"y": 365.0
    									}
    								]
    							}]
    						},
    						"price": {
    							"price": {
    								"text": "1,600",
    								"formatted": {
    									"value": "1600"
    								},
    								"boundingPolys": [{
    									"vertices": [{
    											"x": 662.0,
    											"y": 347.0
    										},
    										{
    											"x": 716.0,
    											"y": 347.0
    										},
    										{
    											"x": 716.0,
    											"y": 367.0
    										},
    										{
    											"x": 662.0,
    											"y": 367.0
    										}
    									]
    								}]
    							},
    							"unitPrice": {
    								"text": "800",
    								"formatted": {
    									"value": "800"
    								},
    								"boundingPolys": [{
    									"vertices": [{
    											"x": 541.0,
    											"y": 347.0
    										},
    										{
    											"x": 577.0,
    											"y": 347.0
    										},
    										{
    											"x": 577.0,
    											"y": 368.0
    										},
    										{
    											"x": 541.0,
    											"y": 368.0
    										}
    									]
    								}]
    							}
    						}
    					}]
    				}],
    				"totalPrice": {
    					"price": {
    						"text": "1,600",
    						"formatted": {
    							"value": "1600"
    						},
    						"boundingPolys": [{
    							"vertices": [{
    									"x": 651.0,
    									"y": 546.0
    								},
    								{
    									"x": 717.0,
    									"y": 548.0
    								},
    								{
    									"x": 717.0,
    									"y": 569.0
    								},
    								{
    									"x": 651.0,
    									"y": 567.0
    								}
    							]
    						}]
    					}
    				}
    			}
    		},
    		"uid": "5b9de1f9765448eca574efc1a4231bbe",
    		"name": "testV2Demo",
    		"inferResult": "SUCCESS",
    		"message": "SUCCESS",
    		"validationResult": {
    			"result": "NO_REQUESTED"
    		}
    	}]
    }
    

    Biz license response examples

    {
    	"version": "V2",
    	"requestId": "string",
    	"timestamp": 1613984821070,
    	"images": [{
    		"bizLicense": {
    			"meta": {
    				"estimatedLanguage": "ko"
    			},
    			"result": {
    				"birth": [{
    					"text": "December 3, 1951",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 396.0,
    								"y": 254.0
    							},
    							{
    								"x": 421.0,
    								"y": 254.0
    							},
    							{
    								"x": 421.0,
    								"y": 265.0
    							},
    							{
    								"x": 396.0,
    								"y": 265.0
    							}
    						]
    					}]
    				}],
    				"bisAddress": [{
    					"": "54, Bogong-ro, Sacheon-eup, Sacheon-si, Gyeongsangnam-do",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 193.0,
    								"y": 288.0
    							},
    							{
    								"x": 235.0,
    								"y": 288.0
    							},
    							{
    								"x": 235.0,
    								"y": 300.0
    							},
    							{
    								"x": 193.0,
    								"y": 300.0
    							}
    						]
    					}]
    				}],
    				"bisArea": [],
    				"bisItem": [{
    					"text": "Renting of non-residential buildings (store, own land)",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 368.0,
    								"y": 325.0
    							},
    							{
    								"x": 399.0,
    								"y": 325.0
    							},
    							{
    								"x": 399.0,
    								"y": 334.0
    							},
    							{
    								"x": 368.0,
    								"y": 334.0
    							}
    						]
    					}]
    				}],
    				"registerNumber": [{
    					"text": "611-01-99810",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 290.0,
    								"y": 210.0
    							},
    							{
    								"x": 386.0,
    								"y": 211.0
    							},
    							{
    								"x": 386.0,
    								"y": 227.0
    							},
    							{
    								"x": 290.0,
    								"y": 225.0
    							}
    						]
    					}]
    				}],
    				"bisType": [{
    					"text": "Real estate and lease business",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 221.0,
    								"y": 322.0
    							},
    							{
    								"x": 262.0,
    								"y": 322.0
    							},
    							{
    								"x": 262.0,
    								"y": 333.0
    							},
    							{
    								"x": 221.0,
    								"y": 333.0
    							}
    						]
    					}]
    				}],
    				"companyName": [{
    					"text": "Dongseong Comprehensive Auto Repair",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 194.0,
    								"y": 232.0
    							},
    							{
    								"x": 293.0,
    								"y": 233.0
    							},
    							{
    								"x": 293.0,
    								"y": 247.0
    							},
    							{
    								"x": 194.0,
    								"y": 245.0
    							}
    						]
    					}]
    				}],
    				"coRepName": [],
    				"corpName": [],
    				"corpRegisterNum": [],
    				"coRepSocialNum": [],
    				"documentType": [{
    					"text": "Business Registration Certificate",
    					"formatted": {
    						"value": "Business Registration Certificate"
    					},
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 199.0,
    								"y": 157.0
    							},
    							{
    								"x": 396.0,
    								"y": 160.0
    							},
    							{
    								"x": 396.0,
    								"y": 189.0
    							},
    							{
    								"x": 198.0,
    								"y": 186.0
    							}
    						]
    					}]
    				}],
    				"headAddress": [],
    				"issuanceDate": [{
    					"text": "June 29, 2017",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 225.0,
    								"y": 623.0
    							},
    							{
    								"x": 259.0,
    								"y": 623.0
    							},
    							{
    								"x": 259.0,
    								"y": 637.0
    							},
    							{
    								"x": 225.0,
    								"y": 637.0
    							}
    						]
    					}]
    				}],
    				"issuanceReason": [{
    					"text": "June 29, 2017",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 225.0,
    								"y": 623.0
    							},
    							{
    								"x": 259.0,
    								"y": 623.0
    							},
    							{
    								"x": 259.0,
    								"y": 637.0
    							},
    							{
    								"x": 225.0,
    								"y": 637.0
    							}
    						]
    					}]
    				}],
    				"openDate": [{
    					"text": "June 9, 2014",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 193.0,
    								"y": 271.0
    							},
    							{
    								"x": 218.0,
    								"y": 271.0
    							},
    							{
    								"x": 218.0,
    								"y": 280.0
    							},
    							{
    								"x": 193.0,
    								"y": 280.0
    							}
    						]
    					}]
    				}],
    				"repName": [{
    					"text": "Yeong-du Kim",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 193.0,
    								"y": 251.0
    							},
    							{
    								"x": 228.0,
    								"y": 251.0
    							},
    							{
    								"x": 228.0,
    								"y": 264.0
    							},
    							{
    								"x": 193.0,
    								"y": 264.0
    							}
    						]
    					}]
    				}],
    				"socialNumber": [],
    				"taxType": [{
    					"text": "ordinary taxpayer",
    					"boundingPolys": [{
    						"vertices": [{
    								"x": 238.0,
    								"y": 185.0
    							},
    							{
    								"x": 357.0,
    								"y": 187.0
    							},
    							{
    								"x": 357.0,
    								"y": 209.0
    							},
    							{
    								"x": 238.0,
    								"y": 207.0
    							}
    						]
    					}]
    				}]
    			}
    		},
    		"uid": "ecf05843a1f444b6943e9d202475c3eb",
    		"name": "testV2Demo",
    		"inferResult": "SUCCESS",
    		"message": "SUCCESS",
    		"validationResult": {
    			"result": "NO_REQUESTED"
    		}
    	}]
    }
    

    Name card response examples

    {
        "version": "V2",
        "requestId": "string",
        "timestamp": 1613984872349,
        "images": [
            {
                "nameCard": {
                    "meta": {
                        "estimatedLanguage": "ko"
                    },
                    "result": {
                        "name": [
                            {
                                "text": "Gil-dong Hong",
                                "boundingPolys": [
                                    {
                                        "vertices": [
                                            {
                                                "x": 286.0,
                                                "y": 194.0
                                            },
                                            {
                                                "x": 348.0,
                                                "y": 194.0
                                            },
                                            {
                                                "x": 348.0,
                                                "y": 266.0
                                            },
                                            {
                                                "x": 286.0,
                                                "y": 266.0
                                            }
                                        ]
                                    }
                                ]
                            }
                        ],
                        "nameFurigana": [],
                        "company": [
                            {
                                "text": "Woori Bank",
                                "boundingPolys": [
                                    {
                                        "vertices": [
                                            {
                                                "x": 317.0,
                                                "y": 274.0
                                            },
                                            {
                                                "x": 356.0,
                                                "y": 274.0
                                            },
                                            {
                                                "x": 356.0,
                                                "y": 316.0
                                            },
                                            {
                                                "x": 317.0,
                                                "y": 316.0
                                            }
                                        ]
                                    }
                                ]
                            }
                        ],
                        "department": [],
                        "address": [
                            {
                                "text": "(Gil-dong Hong)",
                                "boundingPolys": [
                                    {
                                        "vertices": [
                                            {
                                                "x": 338.0,
                                                "y": 189.0
                                            },
                                            {
                                                "x": 414.0,
                                                "y": 189.0
                                            },
                                            {
                                                "x": 414.0,
                                                "y": 288.0
                                            },
                                            {
                                                "x": 338.0,
                                                "y": 288.0
                                            }
                                        ]
                                    }
                                ]
                            }
                        ],
                        "position": [
                            {
                                "text": "Complaint",
                                "boundingPolys": [
                                    {
                                        "vertices": [
                                            {
                                                "x": 286.0,
                                                "y": 194.0
                                            },
                                            {
                                                "x": 348.0,
                                                "y": 194.0
                                            },
                                            {
                                                "x": 348.0,
                                                "y": 266.0
                                            },
                                            {
                                                "x": 286.0,
                                                "y": 266.0
                                            }
                                        ]
                                    }
                                ]
                            }
                        ],
                        "mobile": [
                            {
                                "text": "010-1234-5678",
                                "boundingPolys": [
                                    {
                                        "vertices": [
                                            {
                                                "x": 297.0,
                                                "y": 183.0
                                            },
                                            {
                                                "x": 396.0,
                                                "y": 183.0
                                            },
                                            {
                                                "x": 396.0,
                                                "y": 305.0
                                            },
                                            {
                                                "x": 297.0,
                                                "y": 305.0
                                            }
                                        ]
                                    }
                                ]
                            }
                        ],
                        "tel": [
                            {
                                "text": "123-4567-8901",
                                "boundingPolys": [
                                    {
                                        "vertices": [
                                            {
                                                "x": 338.0,
                                                "y": 189.0
                                            },
                                            {
                                                "x": 414.0,
                                                "y": 189.0
                                            },
                                            {
                                                "x": 414.0,
                                                "y": 288.0
                                            },
                                            {
                                                "x": 338.0,
                                                "y": 288.0
                                            }
                                        ]
                                    }
                                ]
                            }
                        ],
                        "fax": [],
                        "email": [],
                        "homepage": []
                    }
                },
                "uid": "3277149ad2324de0b412669f7eac474a",
                "name": "testV2Demo",
                "inferResult": "SUCCESS",
                "message": "SUCCESS",
                "validationResult": {
                    "result": "NO_REQUESTED"
                }
            }
        ]
    }
    

    ID card response examples

    {
        "version": "V2",
        "requestId": "string",
        "timestamp": 1613984543939,
        "images": [
            {
                "idCard": {
                    "meta": {
                        "estimatedLanguage": "ko"
                    },
                    "result": {
                        "isConfident": true,
                        "ic": {
                            "name": [
                                {
                                    "text": "Sonic",
                                    "formatted": {
                                        "value": "Sonic"
                                    },
                                    "boundingPolys": [
                                        {
                                            "vertices": [
                                                {
                                                    "x": 93.0,
                                                    "y": 135.0
                                                },
                                                {
                                                    "x": 257.0,
                                                    "y": 135.0
                                                },
                                                {
                                                    "x": 257.0,
                                                    "y": 161.0
                                                },
                                                {
                                                    "x": 93.0,
                                                    "y": 161.0
                                                }
                                            ]
                                        }
                                    ]
                                }
                            ],
                            "personalNum": [
                                {
                                    "text": "910623-1062372",
                                    "formatted": {
                                        "value": "910623-1062372"
                                    },
                                    "boundingPolys": [
                                        {
                                            "vertices": [
                                                {
                                                    "x": 83.0,
                                                    "y": 166.0
                                                },
                                                {
                                                    "x": 260.0,
                                                    "y": 166.0
                                                },
                                                {
                                                    "x": 260.0,
                                                    "y": 186.0
                                                },
                                                {
                                                    "x": 83.0,
                                                    "y": 186.0
                                                }
                                            ]
                                        }
                                    ]
                                }
                            ],
                            "address": [
                                {
                                    "text": "Le Meilleur Jongno Town, 24, Jongno 1-ga, Jongno-gu, Seoul, Republic of Korea",
                                    "formatted": {
                                        "value": "Le Meilleur Jongno Town, 24, Jongno 1-ga, Jongno-gu, Seoul, Republic of Korea"
                                    },
                                    "boundingPolys": [
                                        {
                                            "vertices": [
                                                {
                                                    "x": 43.0,
                                                    "y": 232.0
                                                },
                                                {
                                                    "x": 148.0,
                                                    "y": 232.0
                                                },
                                                {
                                                    "x": 148.0,
                                                    "y": 255.0
                                                },
                                                {
                                                    "x": 43.0,
                                                    "y": 255.0
                                                }
                                            ]
                                        },
                                        {
                                            "vertices": [
                                                {
                                                    "x": 47.0,
                                                    "y": 212.0
                                                },
                                                {
                                                    "x": 150.0,
                                                    "y": 212.0
                                                },
                                                {
                                                    "x": 150.0,
                                                    "y": 234.0
                                                },
                                                {
                                                    "x": 47.0,
                                                    "y": 234.0
                                                }
                                            ]
                                        },
                                        {
                                            "vertices": [
                                                {
                                                    "x": 154.0,
                                                    "y": 232.0
                                                },
                                                {
                                                    "x": 240.0,
                                                    "y": 232.0
                                                },
                                                {
                                                    "x": 240.0,
                                                    "y": 255.0
                                                },
                                                {
                                                    "x": 154.0,
                                                    "y": 255.0
                                                }
                                            ]
                                        },
                                        {
                                            "vertices": [
                                                {
                                                    "x": 156.0,
                                                    "y": 212.0
                                                },
                                                {
                                                    "x": 219.0,
                                                    "y": 212.0
                                                },
                                                {
                                                    "x": 219.0,
                                                    "y": 234.0
                                                },
                                                {
                                                    "x": 156.0,
                                                    "y": 234.0
                                                }
                                            ]
                                        },
                                        {
                                            "vertices": [
                                                {
                                                    "x": 224.0,
                                                    "y": 212.0
                                                },
                                                {
                                                    "x": 302.0,
                                                    "y": 212.0
                                                },
                                                {
                                                    "x": 302.0,
                                                    "y": 235.0
                                                },
                                                {
                                                    "x": 224.0,
                                                    "y": 235.0
                                                }
                                            ]
                                        },
                                        {
                                            "vertices": [
                                                {
                                                    "x": 305.0,
                                                    "y": 213.0
                                                },
                                                {
                                                    "x": 333.0,
                                                    "y": 213.0
                                                },
                                                {
                                                    "x": 333.0,
                                                    "y": 234.0
                                                },
                                                {
                                                    "x": 305.0,
                                                    "y": 234.0
                                                }
                                            ]
                                        }
                                    ]
                                }
                            ],
                            "issueDate": [
                                {
                                    "text": "2011.3. 6.",
                                    "formatted": {
                                        "year": "2011",
                                        "month": "03",
                                        "day": "06"
                                    },
                                    "boundingPolys": [
                                        {
                                            "vertices": [
                                                {
                                                    "x": 261.0,
                                                    "y": 314.0
                                                },
                                                {
                                                    "x": 351.0,
                                                    "y": 314.0
                                                },
                                                {
                                                    "x": 351.0,
                                                    "y": 336.0
                                                },
                                                {
                                                    "x": 261.0,
                                                    "y": 336.0
                                                }
                                            ]
                                        },
                                        {
                                            "vertices": [
                                                {
                                                    "x": 354.0,
                                                    "y": 314.0
                                                },
                                                {
                                                    "x": 376.0,
                                                    "y": 314.0
                                                },
                                                {
                                                    "x": 376.0,
                                                    "y": 334.0
                                                },
                                                {
                                                    "x": 354.0,
                                                    "y": 334.0
                                                }
                                            ]
                                        }
                                    ]
                                }
                            ],
                            "authority": [
                                {
                                    "text": "Sodeok, Chairperson of the Sonic Presidential Campaign Committee",
                                    "formatted": {
                                        "Value": "Sodeok, Chairperson of the Sonic Presidential Campaign Committee"
                                    },
                                    "boundingPolys": [
                                        {
                                            "vertices": [
                                                {
                                                    "x": 172.0,
                                                    "y": 338.0
                                                },
                                                {
                                                    "x": 346.0,
                                                    "y": 338.0
                                                },
                                                {
                                                    "x": 346.0,
                                                    "y": 366.0
                                                },
                                                {
                                                    "x": 172.0,
                                                    "y": 366.0
                                                }
                                            ]
                                        },
                                        {
                                            "vertices": [
                                                {
                                                    "x": 347.0,
                                                    "y": 338.0
                                                },
                                                {
                                                    "x": 435.0,
                                                    "y": 336.0
                                                },
                                                {
                                                    "x": 435.0,
                                                    "y": 363.0
                                                },
                                                {
                                                    "x": 348.0,
                                                    "y": 365.0
                                                }
                                            ]
                                        }
                                    ]
                                }
                            ]
                        },
                        "idtype": "ID Card"
                    }
                },
                "uid": "0012374f247f4e70966d35eaa3c41d2a",
                "name": "testV2Demo",
                "inferResult": "SUCCESS",
                "message": "SUCCESS",
                "validationResult": {
                    "result": "NO_REQUESTED"
                }
            }
        ]
    }
    

    Passport response examples

    {
        "version": "V2",
        "requestId": "string",
        "timestamp": 1684203696126,
        "images": [
            {
                "passport": {
                    "passportResult": {
                        "documentClassCode": {
                            "rawText": "P<",
                            "refinedText": "Passport",
                            "postprocessed": [
                                1
                            ]
                        },
                        "issuingStateCode": {
                            "rawText": "KOR",
                            "refinedText": "Korea (the Republic of)",
                            "postprocessed": []
                        },
                        "firstName": {
                            "rawText": "HONG",
                            "refinedText": "HONG",
                            "postprocessed": []
                        },
                        "lastName1": {
                            "rawText": "GILSOON",
                            "refinedText": "GILSOON",
                            "postprocessed": []
                        },
                        "lastName2": {
                            "rawText": "-",
                            "refinedText": "-",
                            "postprocessed": []
                        },
                        "documentNumber": {
                            "rawText": "M123A4567",
                            "refinedText": "M123A4567",
                            "postprocessed": []
                        },
                        "checkDigitForDocumentNumber": {
                            "rawText": "0",
                            "refinedText": "0",
                            "postprocessed": []
                        },
                        "nationality": {
                            "rawText": "KOR",
                            "refinedText": "Korea (the Republic of)",
                            "postprocessed": []
                        },
                        "dateOfBirth": {
                            "rawText": "870201",
                            "refinedText": "1987/02/01",
                            "postprocessed": []
                        },
                        "age": {
                            "rawText": "",
                            "refinedText": 36,
                            "postprocessed": []
                        },
                        "checkDigitForDateOfBirth": {
                            "rawText": "0",
                            "refinedText": "0",
                            "postprocessed": []
                        },
                        "gender": {
                            "rawText": "F",
                            "refinedText": "Female",
                            "postprocessed": []
                        },
                        "dateOfExpiry": {
                            "rawText": "300815",
                            "refinedText": "2030/08/15",
                            "postprocessed": []
                        },
                        "checkDigitForDateOfExpiry": {
                            "rawText": "0",
                            "refinedText": "0",
                            "postprocessed": []
                        },
                        "personalNumber": {
                            "rawText": "V2000000000000",
                            "refinedText": "V2000000000000",
                            "postprocessed": []
                        },
                        "checkDigitForPersonalNumber": {
                            "rawText": "0",
                            "refinedText": "0",
                            "postprocessed": []
                        },
                        "finalCheckDigit": {
                            "rawText": "0",
                            "refinedText": "0",
                            "postprocessed": []
                        },
                        "mrzType": {
                            "rawText": "",
                            "refinedText": "ID-3",
                            "postprocessed": []
                        },
                        "mrzLines": {
                            "rawText": "PMKORHONG<<GILSOON<<<<<<<<<<<<<<<<<<<<<<<<<<<<\nM123A45670KOR8702010F3008150V20000000000000000",
                            "refinedText": "PMKORHONG<<GILSOON<<<<<<<<<<<<<<<<<<<<<<<<<<<<\nM123A45670KOR8702010F3008150V20000000000000000",
                            "postprocessed": [
                                1
                            ]
                        },
                        "isExpired": {
                            "rawText": "",
                            "refinedText": false,
                            "postprocessed": []
                        }
                    }
                },
                "uid": "8f8a04985a6e429e97c3ca4184b3c0e4",
                "name": "test 1",
                "inferResult": "SUCCESS",
                "message": "SUCCESS",
                "validationResult": {
                    "result": "NO_REQUESTED"
                }
            }
        ]
    }
    

    API examples

    The following are some examples of CLOVA OCR API implementation for each language.

    • Request with multipart/form-data
    import java.io.BufferedReader;
    import java.io.DataOutputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.net.HttpURLConnection;
    import java.net.URL;
    import java.util.UUID;
    
    import org.json.JSONArray;
    import org.json.JSONObject;
    
    public class OCRAPIDemo {
    
    	public static void main(String[] args) {
    		String apiURL = "YOUR_API_URL";
    		String secretKey = "YOUR_SECRET_KEY";
    		String imageFile = "YOUR_IMAGE_FILE";
    
    		try {
    			URL url = new URL(apiURL);
    			HttpURLConnection con = (HttpURLConnection)url.openConnection();
    			con.setUseCaches(false);
    			con.setDoInput(true);
    			con.setDoOutput(true);
    			con.setReadTimeout(30000);
    			con.setRequestMethod("POST");
    			String boundary = "----" + UUID.randomUUID().toString().replaceAll("-", "");
    			con.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary);
    			con.setRequestProperty("X-OCR-SECRET", secretKey);
    
    			JSONObject json = new JSONObject();
    			json.put("version", "V2");
    			json.put("requestId", UUID.randomUUID().toString());
    			json.put("timestamp", System.currentTimeMillis());
    			JSONObject image = new JSONObject();
    			image.put("format", "jpg");
    			image.put("name", "demo");
    			JSONArray images = new JSONArray();
    			images.put(image);
    			json.put("images", images);
    			String postParams = json.toString();
    
    			con.connect();
    			DataOutputStream wr = new DataOutputStream(con.getOutputStream());
    			long start = System.currentTimeMillis();
    			File file = new File(imageFile);
    			writeMultiPart(wr, postParams, file, boundary);
    			wr.close();
    
    			int responseCode = con.getResponseCode();
    			BufferedReader br;
    			if (responseCode == 200) {
    				br = new BufferedReader(new InputStreamReader(con.getInputStream()));
    			} else {
    				br = new BufferedReader(new InputStreamReader(con.getErrorStream()));
    			}
    			String inputLine;
    			StringBuffer response = new StringBuffer();
    			while ((inputLine = br.readLine()) != null) {
    				response.append(inputLine);
    			}
    			br.close();
    
    			System.out.println(response);
    		} catch (Exception e) {
    			System.out.println(e);
    		}
    	}
    
    	private static void writeMultiPart(OutputStream out, String jsonMessage, File file, String boundary) throws
    		IOException {
    		StringBuilder sb = new StringBuilder();
    		sb.append("--").append(boundary).append("\r\n");
    		sb.append("Content-Disposition:form-data; name=\"message\"\r\n\r\n");
    		sb.append(jsonMessage);
    		sb.append("\r\n");
    
    		out.write(sb.toString().getBytes("UTF-8"));
    		out.flush();
    
    		if (file != null && file.isFile()) {
    			out.write(("--" + boundary + "\r\n").getBytes("UTF-8"));
    			StringBuilder fileString = new StringBuilder();
    			fileString
    				.append("Content-Disposition:form-data; name=\"file\"; filename=");
    			fileString.append("\"" + file.getName() + "\"\r\n");
    			fileString.append("Content-Type: application/octet-stream\r\n\r\n");
    			out.write(fileString.toString().getBytes("UTF-8"));
    			out.flush();
    
    			try (FileInputStream fis = new FileInputStream(file)) {
    				byte[] buffer = new byte[8192];
    				int count;
    				while ((count = fis.read(buffer)) != -1) {
    					out.write(buffer, 0, count);
    				}
    				out.write("\r\n".getBytes());
    			}
    
    			out.write(("--" + boundary + "--\r\n").getBytes("UTF-8"));
    		}
    		out.flush();
    	}
    }
    
    import requests
    import uuid
    import time
    import json
    
    api_url = 'YOUR_API_URL'
    secret_key = 'YOUR_SECRET_KEY'
    image_file = 'YOUR_IMAGE_FILE'
    
    request_json = {
        'images': [
            {
                'format': 'jpg',
                'name': 'demo'
            }
        ],
        'requestId': str(uuid.uuid4()),
        'version': 'V2',
        'timestamp': int(round(time.time() * 1000))
    }
    
    payload = {'message': json.dumps(request_json).encode('UTF-8')}
    files = [
      ('file', open(image_file,'rb'))
    ]
    headers = {
      'X-OCR-SECRET': secret_key
    }
    
    response = requests.request("POST", api_url, headers=headers, data = payload, files = files)
    
    print(response.text.encode('utf8'))
    
    
    <?php
      $client_secret = "YOUR_SECRET_KEY";
      $url = "YOUR_API_URL";
      $image_file = "YOUR_IMAGE_FILE";
    
      $params->version = "V2";
      $params->requestId = uniqid();
      $params->timestamp = time();
      $image->format = "jpg";
      $image->name = "demo";
      $images = array($image);
      $params->images = $images;
      $json = json_encode($params);
      
      $boundary = uniqid();
      $is_post = true;
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_POST, $is_post);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      $post_form = array("message" => $json, "file" => new CURLFILE($image_file));
      curl_setopt($ch, CURLOPT_POSTFIELDS, $post_form);
      $headers = array();
      $headers[] = "X-OCR-SECRET: ".$client_secret;
      curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
      $response = curl_exec($ch);
      $err = curl_error($ch);
      $status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
      curl_close ($ch);
    
      echo $status_code;
      if($status_code == 200) {
        echo $response;
      } else {
        echo "ERROR: ".$response;
      }
    ?>
    
    • Request with application/json
    import java.io.BufferedReader;
    import java.io.DataOutputStream;
    import java.io.InputStreamReader;
    import java.net.HttpURLConnection;
    import java.net.URL;
    import java.util.UUID;
    
    import org.json.JSONArray;
    import org.json.JSONObject;
    
    public class OCRGeneralAPIDemo {
    
    	public static void main(String[] args) {
    		String apiURL = "YOUR_API_URL";
    		String secretKey = "YOUR_SECRET_KEY";
    
    		try {
    			URL url = new URL(apiURL);
    			HttpURLConnection con = (HttpURLConnection)url.openConnection();
    			con.setUseCaches(false);
    			con.setDoInput(true);
    			con.setDoOutput(true);
    			con.setRequestMethod("POST");
    			con.setRequestProperty("Content-Type", "application/json; charset=utf-8");
    			con.setRequestProperty("X-OCR-SECRET", secretKey);
    
    			JSONObject json = new JSONObject();
    			json.put("version", "V2");
    			json.put("requestId", UUID.randomUUID().toString());
    			json.put("timestamp", System.currentTimeMillis());
    			JSONObject image = new JSONObject();
    			image.put("format", "jpg");
    			image should be public, otherwise, should use data
    			FileInputStream inputStream = new FileInputStream("YOUR_IMAGE_FILE");
    			byte[] buffer = new byte[inputStream.available()];
    			inputStream.read(buffer);
    			inputStream.close();
    			image.put("data", buffer);
    			image.put("name", "demo");
    			JSONArray images = new JSONArray();
    			images.put(image);
    			json.put("images", images);
    			String postParams = json.toString();
    
    			DataOutputStream wr = new DataOutputStream(con.getOutputStream());
    			wr.writeBytes(postParams);
    			wr.flush();
    			wr.close();
    
    			int responseCode = con.getResponseCode();
    			BufferedReader br;
    			if (responseCode == 200) {
    				br = new BufferedReader(new InputStreamReader(con.getInputStream()));
    			} else {
    				br = new BufferedReader(new InputStreamReader(con.getErrorStream()));
    			}
    			String inputLine;
    			StringBuffer response = new StringBuffer();
    			while ((inputLine = br.readLine()) != null) {
    				response.append(inputLine);
    			}
    			br.close();
    
    			System.out.println(response);
    		} catch (Exception e) {
    			System.out.println(e);
    		}
    	}
    
    }
    
    
    import requests
    import uuid
    import time
    import base64
    import json
    
    api_url = 'YOUR_API_URL'
    secret_key = 'YOUR_SECRET_KEY'
    image_file = 'YOUR_IMAGE_FILE'
    with open(image_file,'rb') as f:
    file_data = f.read()
    
    request_json = {
        'images': [
            {
                'format': 'jpg',
                'name': 'demo',
                'data': base64.b64encode(file_data).decode()
            }
        ],
        'requestId': str(uuid.uuid4()),
        'version': 'V2',
        'timestamp': int(round(time.time() * 1000))
    }
    
    payload = json.dumps(request_json).encode('UTF-8')
    headers = {
      'X-OCR-SECRET': secret_key,
      'Content-Type': 'application/json'
    }
    
    response = requests.request("POST", api_url, headers=headers, data = payload)
    
    print(response.text)
    
    
    <?php
      $client_secret = "YOUR_SECRET_KEY";
      $url = "YOUR_API_URL";
      $image_file = "YOUR_IMAGE_FILE";
    
      $params->version = "V2";
      $params->requestId = "uuid";
      $params->timestamp = time();
      $image->format = "jpg";
      $image->data = base64_encode(file_get_contents($image_file));
      $image->name = "demo";
      $images = array($image);
      $params->images = $images;
      $json = json_encode($params);
    
      $is_post = true;
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_POST, $is_post);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
      $headers = array();
      $headers[] = "X-OCR-SECRET: ".$client_secret;
      $headers[] = "Content-Type:application/json; charset=utf-8";
      curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
      $response = curl_exec($ch);
      $err = curl_error($ch);
      $status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
      curl_close ($ch);
    
      echo $status_code;
      if($status_code == 200) {
        echo $response;
      } else {
        echo "ERROR: ".$response;
      }
    ?>
    
    

    Error code

    HttpStatusCodeDescription
    400The requested medium variable is invalid or there are issues with limitation conditions.
    401Erroneous API secret key (X-OCR-API-KEY)
    500Internal server error

    Error Response Body:

    {
      "code": "Error Code",
      "message": "error details message.",
      "path": "request API path",
      "timestamp": 1570776853475
    }
    
    ErrorCodeDescription
    0001Invalid URL
    0002Secret key validity test failed.
    0011Invalid request body.
    0021Unsupported protocol version.
    0022Invalid request domain.
    0023The number of API requests has reached the upper limit.
    0025Calls to this API have exceeded the rate limit.
    0500Unknown service error.
    0501OCR service error.

    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.