Driving License OCR — Extract DL Details
Upload a driving license image and extract DL number, name, DOB, validity, address, and vehicle classes automatically.
curl -X POST "https://production.deepvue.tech/v1/documents/extraction/ind_driving_license" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"document1": "<BASE64_ENCODED_DOCUMENT_FRONT>",
"document2": "<BASE64_ENCODED_DOCUMENT_BACK>",
"name": "RAHUL KUMAR SHARMA"
}'
import requests
import json
url = "https://production.deepvue.tech/v1/documents/extraction/ind_driving_license"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (JWT)",
"x-api-key": "YOUR_API_KEY"
}
data = {
"document1": "<BASE64_ENCODED_DOCUMENT_FRONT>",
"document2": "<BASE64_ENCODED_DOCUMENT_BACK>",
"name": "RAHUL KUMAR SHARMA"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://production.deepvue.tech/v1/documents/extraction/ind_driving_license", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (JWT)",
"x-api-key": "YOUR_API_KEY"
},
body: JSON.stringify({
"document1": "<BASE64_ENCODED_DOCUMENT_FRONT>",
"document2": "<BASE64_ENCODED_DOCUMENT_BACK>",
"name": "RAHUL KUMAR SHARMA"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"document1": "<BASE64_ENCODED_DOCUMENT_FRONT>",
"document2": "<BASE64_ENCODED_DOCUMENT_BACK>",
"name": "RAHUL KUMAR SHARMA"
}`)
req, err := http.NewRequest("POST", "https://production.deepvue.tech/v1/documents/extraction/ind_driving_license", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN (JWT)")
req.Header.Set("x-api-key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://production.deepvue.tech/v1/documents/extraction/ind_driving_license')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN (JWT)'
request['x-api-key'] = 'YOUR_API_KEY'
request.body = '{
"document1": "<BASE64_ENCODED_DOCUMENT_FRONT>",
"document2": "<BASE64_ENCODED_DOCUMENT_BACK>",
"name": "RAHUL KUMAR SHARMA"
}'
response = http.request(request)
puts response.body
{
"code": 200,
"transaction_id": "a73af0b7accc4c3fbaa3dd2dc2cab550",
"message": "Document processed successfuly",
"data": {
"address": "12, MG Road, Bengaluru, Karnataka 560001",
"date_of_birth": "1985-06-15",
"date_of_validity": "2030-12-31",
"district": "Bengaluru Urban",
"fathers_name": "RAJESH KUMAR SHARMA",
"id_number": "ABCDE1234F",
"is_scanned": "false",
"issue_dates": {},
"name_on_card": "RAHUL KUMAR SHARMA",
"pincode": "560001",
"state": "Karnataka",
"street_address": "12, MG Road",
"type": [
"string"
],
"validity": {}
}
}
{
"detail": "Inactive client_id"
}
{
"detail": "Not authenticated"
}
{
"detail": "Not a valid token"
}
{
"transaction_id": "a73af0b7accc4c3fbaa3dd2dc2cab550",
"code": 422,
"message": "Empty document. Valid base64 required."
}
{
"detail": "Internal Server Error"
}
/v1/documents/extraction/ind_driving_license
ACCESS_TOKEN generated from the authorize endpoint. Should be included in the header as Bearer .
The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.
The media type of the request body
The main document being submitted for extraction of respective information.
The secondary document being submitted along with the primary document for extraction of respective information.
The name of the document being submitted for extraction of respective information.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token (JWT). ACCESS_TOKEN generated from the authorize endpoint. Should be included in the header as Bearer .
API Key for authentication. The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.
Body
The main document being submitted for extraction of respective information.
The secondary document being submitted along with the primary document for extraction of respective information.
The name of the document being submitted for extraction of respective information.
Responses
Overview
The Driving License OCR API lets you extract key identification fields like dl_number, name, validity, dob, and address from the image of a driving license document in the form of key-value pairs.
Documents must be submitted as base64-encoded strings within the request payload. The API returns extracted fields including address, date of birth, date of validity, district, father's name, ID number, issue dates, name on card, pincode, state, street address, type, and validity information.
Last updated 2 weeks ago
Built with Documentation.AI