The SmartLicense Reader API provided by AIdea Technologies is a robust solution for extracting structured data from driving license images. This API accepts images encoded in base64 format and returns detailed, anonymized information in a structured JSON format.
These instructions will help you integrate the SmartLicense Reader API into your application.
Ensure you have an appropriate HTTP client library installed in your development environment to make HTTP requests to the API.
To utilize the SmartLicense Reader API, send a POST request with the image data encoded in base64 format and specify the file type. You can do this in any programming language that supports HTTP requests. Hereโs a general example of how the HTTP request should be structured:
POST /readLicense HTTP/1.1
Host: your-domain.com
Content-Type: application/json
Authorization: Bearer your_access_token
{
"fileType": "jpg",
"content": "base64_encoded_image_content"
}
import requests
import base64
# Replace 'path_to_image.jpg' with the path to your image file
filename = 'path_to_image.jpg'
with open(filename, "rb") as image_file:
encoded_content = base64.b64encode(image_file.read()).decode('utf-8')
url = 'https://your-domain.com/readLicense'
data = {"fileType": "jpg", "content": encoded_content}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_access_token'
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
The API will respond with structured, anonymized data regarding the driving license. Each field includes a confidence score. Here is an example of what you might expect in a response:
{
"birth_date": {
"confidence": 1.0,
"value": "dd.mm.yyyy"
},
"date_of_issue": {
"confidence": 1.0,
"value": "dd.mm.yyyy"
},
"expiration_date": {
"confidence": 1.0,
"value": "dd.mm.yyyy"
},
"issuing_authority": {
"confidence": 1.0,
"value": "Issuing City"
},
"license_number": {
"confidence": 1.0,
"value": "license_number_here"
},
"name": {
"confidence": 1.0,
"value": "First Last"
},
"place_of_birth": {
"confidence": 1.0,
"value": "City"
},
"surname": {
"confidence": 1.0,
"value": "Surname"
},
"types_of_license": {
"confidence": 1.0,
"value": "Type Codes"
}
}
For any questions or technical support, please contact aideatechnologies@gmail.com.