Skip to main content

Driver Licence OCR

API Documentation for Driver Licence OCR

Extract driver license information from image

Error Definition

http statuserror_codeerror_message
200--
4001001Fail to do rotate image
4001002Can not find driver license on picture
5002001some error occur in serverside

Extract driver license information from image

POST https://apis.aigen.online/aiscript/driver-license/v1

Request Body

NameTypeDescription
image*StringInput base64 image encoded utf-8
{
"status": "200",
"message": "success",
"response_id": "123wereqs2",
"error_list": [
{
"code": "string",
"message": "string"
}
],
"result": [
{
"keyname": "string",
"text": "string",
"confidence": 0
}
]
}

Example code

import requests
import json

api = "https://apis.aigen.online/aiscript/driver-license/v1"
headers = {"x-aigen-key": "<key>", "content-type": "application/json"}
data = json.dumps({"image": "<base64_string>"})

res = requests.post(api, data=data, headers=headers)
print(res.json())