Driver Licence OCR

​Extract driver license information from image

Error Definition

http status
error_code
error_message

200

-

-

400

1001

Fail to do rotate image

400

1002

Can not find driver license on picture

500

2001

some error occur in serverside

Extract driver license information from image

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

Request Body

Name
Type
Description

image*

String

​Input 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())

Last updated