Skip to main content

Book Bank OCR

This API is utilized to extract information from the book bank document.

POST https://apis.aigen.online/aiscript/bookbank/v2

Request Body Parameters

keyTypeDescription
image*StringInput base64 image encoded utf-8

Response Keys

keyTypeDescription
statusStringThe summary status.
errorList[dict]The list of errors which occurred during extracting information in each image or page.
dataList[dict]The response dictionary in each individual request page or imageta

List of Bank

Bank nameValue
Siam Commercial Bank PCLSCB
Bank of Ayudhya Public Company LimitedKRUNGSRI BANK
Bangkok Bank Public Company LimitedBANGKOK BANK
Thai Military Bank Public Company LimitedTMB
Kasikorn bank PCLKASIKORN BANK
Land and Houses Bank Public Company LimitedLH BANK
Bank for Agriculture and Agricultural CooperativesBAAC
Krungthai Bank Public Company LimitedKTB
Government Housing BankGH BANK
TMBThanachart BankTTB
CIMB Thai Bank Public Company LimitedCIMB
TISCO FINANCIAL GROUP PUBLIC COMPANY LIMITEDTISCO
Islamic Bank of ThailandISLAMICBANK
BANK OF CHINABANK OF CHINA
CITI BANKCITI BANK
united overseas bankUOB

Response Data Keys

KeyField schemaDescription
bank_nameObject information V2Bank Name
branchObject information V2Branch Name
account_noObject information V2Account Number
account_nameObject information V2Account Name
account_typeObject information V2Account Type
account_name_titleObject information V2Account Title
account_name_nameObject information V2Account Name
account_name_surnameObject information V2Account Surname

Field schema

Object information V2

valuestrThe string value of a considering field.
bboxesList[List[List[int]]]This list of ocr bounding boxes in considering documents.
bboxes_normList[List[List[float]]]The list of ocr bounding boxes in normalized scale [0,1]
confidencefloatThe ocr confidence level.

Response code

HTTP statusCodeMessageDescription
200--Document information extraction successfully.
206partial_contentPartial_contentThe api was unable to retrieve information on some image or page content. In case request images or pages greater than one.
400bad_requestBad RequestNot a valid base64 image request (must be .jpg, .jpeg, .png, .pdf) or invalid size, request schema. The api can not retrieve information on any image.
413request_entity_too_largeRequest entity too largeThe requested image size is larger than the specified image size.
500internal_server_errorInternal server errorsome errors occurred inside the server.
{
"status": "success",
"request_id": "cab78ada-3d63-4007-b223-83c24721c91d",
"error": [],
"data": [
{
"bank_name": {},
"branch": {
"value": "50/4 บเกรี อยุธยา",
"confidence": 0.7237,
"bboxes": ],
"bboxes_norm": []
},
"account_no": {
"value": "149016113",
"confidence": 0.9815,
"bboxes": [],
"bboxes_norm": []
},
"account_name": {
"value": "นาง อดิณณ์ วงค์อุบล",
"confidence": 0.9546,
"bboxes": [],
"bboxes_norm": []
},
"account_type": {},
"table": [],
"account_name_title": {
"value": "นาง",
"confidence": 0.9546,
"bboxes": [],
"bboxes_norm": []
},
"account_name_name": {
"value": "อดิณณ์",
"confidence": 0.9546,
"bboxes": [],
"bboxes_norm": []
},
"account_name_surname": {
"value": "วงค์อุบล",
"confidence": 0.9546,
"bboxes": [],
"bboxes_norm": []
}
}
],
"response_id": "cead48b4-68a5-40bf-8e54-2c033cb2e1aa"
}

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())