Vehicle Registration Book OCR
Extract Vehicle Registration Book information from an image or PDF.
description: Extract Vehicle Registration Book Information
Vehicle Registration Book OCR
Extract Vehicle Registration Book information from an image or PDF.
Request Body Parameters
| Key | Type | Description |
|---|---|---|
| image | str | Input base64 images encoded utf-8 |
Response Keys
| Key | Type | Description |
|---|---|---|
| status | str | The summary status. |
| error | List[Union[ErrorObjectV3, None]] | The list of errors that occurred while extracting information from each image or page. |
| data | List[Union[ObjClassV3, EmptyDict]] | The per-page response payload; empty dictionaries represent pages that did not return data. |
Field Schema
ObjClassV3
| Key | Type | Description |
|---|---|---|
| value | Optional[str] | The string value of a given field. |
| bboxes | Optional[List[List[List[int]]]] | The OCR bounding boxes associated with the detected field. |
| bboxes_norm | Optional[List[List[List[float]]]] | Bounding boxes normalized to a [0, 1] scale. |
| confidence | Optional[float] | The OCR confidence level. |
ErrorObjectV3
| Key | Type | Description |
|---|---|---|
| object | str | The error object label. |
| code | Optional[str] | The code representing the type of error. |
| message | Optional[str] | The human-readable description of the error. |
EmptyDict refers to an empty object {} used as a placeholder when a page returns no OCR payload.
Response Definition
| HTTP Status | Code | Message | Description |
|---|---|---|---|
| 200 | - | - | OCR success. |
| 206 | 206 | Partial content | Some page of the request is invalid. |
| 400 | 400 | Bad request | The API cannot recognize the supplied image as a vehicle registration book. |
| 413 | 20000 | The request image base64 is too large. | Image must not exceed 10 MB in size and 10000 x 10000 pixels in dimensions. |
| 422 | 20002 | Cannot read specified image | The API cannot convert the provided base64 string into an image. |
| 500 | 40001 | Internal Error | An error occurs within a downstream sub-service. |
| 503 | 40000 | Internal Error | The required sub-service is currently unavailable. |
| 206 / 400* | 400 | Internal process error during extract image page: {page} | The API could not extract information from the specified page. |
| 206 / 400* | 30000 | Internal error during extract image page: {page}. | The page referenced in the error message caused an undefined error. |
| 206 / 400* | 30001 | Internal process error during extract page: {page} | The page referenced in the error message caused an undefined error. |
* Indicates per-page errors when at least one page in a multi-page request fails.
Extract Vehicle Registration Book Information
POST https://api.aigen.online/aiscript/vehicle-registration-book/v3
Request Body
| Name | Type | Description |
|---|---|---|
| image* | String | Input base64 images encoded utf-8 |
- 200: OK Successful Response
- 206: Partial Content
- 400: Bad Request
- 413: Request Entity Too Large
- 422: Unprocessable Entity
- 500: Internal Server Error
- 503: Service Unavailable
{
"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.9860
},
"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.9978
}
}
]
}
{
"status": "error",
"error": [
{
"object": "error",
"code": "400",
"message": "Internal process error during extract image page: 2"
},
{
"object": "error",
"code": "206",
"message": "Partial content"
}
],
"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.9860
},
"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.9978
}
},
{}
]
}
{
"status": "error",
"error": [
{
"object": "error",
"code": "400",
"message": "Bad request"
}
],
"data": [
{}
]
}
{
"status": "error",
"error": [
{
"object": "error",
"code": "20000",
"message": "The request image base64 is too large."
}
],
"data": [
{}
]
}
{
"status": "error",
"error": [
{
"object": "error",
"code": "20002",
"message": "Cannot read specified image"
}
],
"data": [
{}
]
}
{
"status": "error",
"error": [
{
"object": "error",
"code": "40001",
"message": "Internal Error"
}
],
"data": [
{}
]
}
{
"status": "error",
"error": [
{
"object": "error",
"code": "40000",
"message": "Internal Error"
}
],
"data": [
{}
]
}
- Python
- Nodejs
- PHP
- CURL
import requests
api = "https://api.aigen.online/aiscript/vehicle-registration-book/v3"
headers = {"x-aigen-key": "<key>"}
data = {"image": "<base64_string>"}
res = requests.post(api, json=data, headers=headers)
print(res.json())
const axios = require("axios");
const api = "https://api.aigen.online/aiscript/vehicle-registration-book/v3";
const headers = {
"x-aigen-key": "<key>",
};
const data = { image: "<base64_string>" };
axios
.post(api, data, { headers })
.then((res) => {
console.log(res.data);
})
.catch((err) => {
console.error(err.response.data);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.aigen.online/aiscript/vehicle-registration-book/v3',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"image": "<base64_string>"
}',
CURLOPT_HTTPHEADER => array(
'X-AIGEN-KEY: <aigen-key>',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
curl --location 'https://api.aigen.online/aiscript/vehicle-registration-book/v3' \
--header 'X-AIGEN-KEY: <aigen-key>' \
--header 'Content-Type: application/json' \
--data '{
"image": "<base64_string>"
}'