Book Bank OCR

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

List of Bant

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

Request Body Parameters

key
Type
Description

image*

String

Input base64 image encoded utf-8

Response Keys

key
Type
Description

status

String

The summary status.

error

List[dict]

The list of errors which occurred during extracting information in each image or page.

data

List[dict]

The response dictionary in each individual request page or imageta

List of Bank

Bank name
Value

Siam Commercial Bank PCL

SCB

Bank of Ayudhya Public Company Limited

KRUNGSRI BANK

Bangkok Bank Public Company Limited

BANGKOK BANK

Thai Military Bank Public Company Limited

TMB

Kasikorn bank PCL

KASIKORN BANK

Land and Houses Bank Public Company Limited

LH BANK

Bank for Agriculture and Agricultural Cooperatives

BAAC

Krungthai Bank Public Company Limited

KTB

Government Housing Bank

GH BANK

TMBThanachart Bank

TTB

CIMB Thai Bank Public Company Limited

CIMB

TISCO FINANCIAL GROUP PUBLIC COMPANY LIMITED

TISCO

Islamic Bank of Thailand

ISLAMICBANK

BANK OF CHINA

BANK OF CHINA

CITI BANK

CITI BANK

united overseas bank

UOB

Response Data Keys

Key
Field schema
Description

bank_name

Object information V2

Bank Name

branch

Object information V2

Branch Name

account_no

Object information V2

Account Number

account_name

Object information V2

Account Name

account_type

Object information V2

Account Type

account_name_title

Object information V2

Account Title

account_name_name

Object information V2

Account Name

account_name_surname

Object information V2

Account Surname

Field schema

Object information V2

value

str

The string value of a considering field.

bboxes

List[List[List[int]]]

This list of ocr bounding boxes in considering documents.

bboxes_norm

List[List[List[float]]]

The list of ocr bounding boxes in normalized scale [0,1]

confidence

float

The ocr confidence level.

Response code

HTTP status
Code
Message
Description

200

-

-

Document information extraction successfully.

206

partial_content

Partial_content

The api was unable to retrieve information on some image or page content. In case request images or pages greater than one.

400

bad_request

Bad Request

Not 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.

413

request_entity_too_large

Request entity too large

The requested image size is larger than the specified image size.

500

internal_server_error

Internal server error

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

Last updated