Book Bank OCR
List of Bank
Bank name | Value |
---|---|
Siam Commercial Bank PCL | scb |
Bank of Ayudhya Public Company Limited | krungsri |
Bangkok Bank Public Company Limited | bangkok |
Thai Military Bank Public Company Limited | tmb |
Kasikorn bank PCL | kasikorn |
Land and Houses Bank Public Company Limited | LH |
Bank for Agriculture and Agricultural Cooperatives | BAAC |
Krungthai Bank Public Company Limited | krungthai |
POST
https://apis.aigen.online/aiscript/bookbank/v2
Request Body
Name | Type | Description |
---|---|---|
image* | String | Input base64 image encoded utf-8 |
{
"status": "Success",
"request_id": "string",
"error": [
{
"object": "error",
"code": "100X",
"message": "Error's message"
}
],
"data": [
{
"bank_name": {
"value": "นายสมหมาย มีสุข",
"bboxes": [
[
[
358,
346
],
[
1055,
346
],
[
1055,
396
],
[
358,
396
]
],
[
[
373,
286
],
[
533,
286
],
[
533,
340
],
[
373,
340
]
]
],
"bboxes_norm": [
[
[
0.1,
0.2
],
[
0.4,
0.2
],
[
0.4,
0.5
],
[
0.1,
0.5
]
],
[
[
0.1,
0.2
],
[
0.4,
0.2
],
[
0.4,
0.5
],
[
0.1,
0.5
]
]
],
"confidence": 0.9907
},
"branch": {
"value": "นายสมหมาย มีสุข",
"bboxes": [
[
[
358,
346
],
[
1055,
346
],
[
1055,
396
],
[
358,
396
]
],
[
[
373,
286
],
[
533,
286
],
[
533,
340
],
[
373,
340
]
]
],
"bboxes_norm": [
[
[
0.1,
0.2
],
[
0.4,
0.2
],
[
0.4,
0.5
],
[
0.1,
0.5
]
],
[
[
0.1,
0.2
],
[
0.4,
0.2
],
[
0.4,
0.5
],
[
0.1,
0.5
]
]
],
"confidence": 0.9907
},
"account_no": {
"value": "นายสมหมาย มีสุข",
"bboxes": [
[
[
358,
346
],
[
1055,
346
],
[
1055,
396
],
[
358,
396
]
],
[
[
373,
286
],
[
533,
286
],
[
533,
340
],
[
373,
340
]
]
],
"bboxes_norm": [
[
[
0.1,
0.2
],
[
0.4,
0.2
],
[
0.4,
0.5
],
[
0.1,
0.5
]
],
[
[
0.1,
0.2
],
[
0.4,
0.2
],
[
0.4,
0.5
],
[
0.1,
0.5
]
]
],
"confidence": 0.9907
},
"account_name": {
"value": "นายสมหมาย มีสุข",
"bboxes": [
[
[
358,
346
],
[
1055,
346
],
[
1055,
396
],
[
358,
396
]
],
[
[
373,
286
],
[
533,
286
],
[
533,
340
],
[
373,
340
]
]
],
"bboxes_norm": [
[
[
0.1,
0.2
],
[
0.4,
0.2
],
[
0.4,
0.5
],
[
0.1,
0.5
]
],
[
[
0.1,
0.2
],
[
0.4,
0.2
],
[
0.4,
0.5
],
[
0.1,
0.5
]
]
],
"confidence": 0.9907
},
"account_type": {
"value": "นายสมหมาย มีสุข",
"bboxes": [
[
[
358,
346
],
[
1055,
346
],
[
1055,
396
],
[
358,
396
]
],
[
[
373,
286
],
[
533,
286
],
[
533,
340
],
[
373,
340
]
]
],
"bboxes_norm": [
[
[
0.1,
0.2
],
[
0.4,
0.2
],
[
0.4,
0.5
],
[
0.1,
0.5
]
],
[
[
0.1,
0.2
],
[
0.4,
0.2
],
[
0.4,
0.5
],
[
0.1,
0.5
]
]
],
"confidence": 0.9907
},
"table": [
{
"value": "นายสมหมาย มีสุข",
"bboxes": [
[
[
358,
346
],
[
1055,
346
],
[
1055,
396
],
[
358,
396
]
],
[
[
373,
286
],
[
533,
286
],
[
533,
340
],
[
373,
340
]
]
],
"bboxes_norm": [
[
[
0.1,
0.2
],
[
0.4,
0.2
],
[
0.4,
0.5
],
[
0.1,
0.5
]
],
[
[
0.1,
0.2
],
[
0.4,
0.2
],
[
0.4,
0.5
],
[
0.1,
0.5
]
]
],
"confidence": 0.9907
}
]
},
{}
]
}
{
"status": "error",
"request_id": "3319365eac3b4dbeb6116caf8d2b2965",
"error": "{'object':'error', 'code':'1001', 'message':'Too low image resolution. Expect resolution > 512*512 and < 10000*10000'}",
"data": "string"
}
{
"status": "error",
"request_id": "3319365eac3b4dbeb6116caf8d2b2965",
"error": "{'object':'error', 'code':'1001', 'message':'Too low image resolution. Expect resolution > 512*512 and < 10000*10000'}",
"data": "Unknown Type: null"
}
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}
import requests
api = "https://apis.aigen.online/aiscript/bookbank/v2"
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://apis.aigen.online/aiscript/bookbank/v2";
const headers = {
"x-aigen-key": "<key>",
};
const data = { image: "<base64_string>" };
axios
.post(api, data, { headers: 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://apis.aigen.online/aiscript/bookbank/v2',
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://apis.aigen.online/aiscript/bookbank/v2' \
--header 'X-AIGEN-KEY: <aigen-key>' \
--header 'Content-Type: application/json' \
--data '{
"image": "<base64_string>",
}'
Last updated