Vehicle Registration Book OCR

Extract Vehicle Registration Book Information

Response Definition

HTTP StatusCodeMessageDescription

200

-

-

OCR success.

206

partial_content

Partial content

Some page of request is invalid

400

1001

Too low image resolution (image must be base64 and image size must between 500x500 and 10000x10000)

Image is too small (Should be greater than 500x500)

400

1002

Image quality not acceptable (image must be base64 and image size must between 500x500 and 10000x10000)

Image is too large (Should not exceed 10000x10000).

400

can_not_find_vehicle_registration_on_image

can not find vehicle registration on image

The API cannot recognize the request’s image as a vehicle registration book document.

206/400*

internal_server_error

Page <#no page> : Internal Server Error

The page specified in the error message caused an undefined error.

Parameters

Body

KeyTypeDescription

image

String

Base64 image encoded stringBase64 image encoded string

Extract Vehicle Registration Book Information

POST https://apis.aigen.online/aiscript/vehicle-registration-book/v2

Request Body

NameTypeDescription

image*

String

Input base64 images encoded utf-8

```json
{
     "status": "success",
     "error": [],
     "data": [
          {
               "ownership": {
                    "value": "นาง เสลา สระตันติ์",
                    "bboxes": [
                         [
                              [
                                   289,
                                   1305
                              ],
                              [
                                   571,
                                   1305
                              ],
                              [
                                   571,
                                   1351
                              ],
                              [
                                   289,
                                   1351
                              ]
                         ]
                    ],
                    "bboxes_norm": [
                         [
                              [
                                   0.1748,
                                   0.5579
                              ],
                              [
                                   0.3454,
                                   0.5579
                              ],
                              [
                                   0.3454,
                                   0.5776
                              ],
                              [
                                   0.1748,
                                   0.5776
                              ]
                         ]
                    ],
                    "confidence": 0.986044474570928
               },
               "model": {
                    "value": "BAYARFAY10EHA1",
                    "bboxes": [
                         [
                              [
                                   747,
                                   575
                              ],
                              [
                                   1014,
                                   575
                              ],
                              [
                                   1014,
                                   607
                              ],
                              [
                                   747,
                                   607
                              ]
                         ]
                    ],
                    "bboxes_norm": [
                         [
                              [
                                   0.4519,
                                   0.2458
                              ],
                              [
                                   0.6134,
                                   0.2458
                              ],
                              [
                                   0.6134,
                                   0.2595
                              ],
                              [
                                   0.4519,
                                   0.2595
                              ]
                         ]
                    ],
                    "confidence": 0.9977917852163927
               }
          }
     ]
}
```
import requests

api = "https://apis.aigen.online/aiscript/vehicle-registration-book/v2"
headers = {"x-aigen-key": "<key>"}
data = {"image": "<base64_string>"}

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

Last updated