Book Bank OCR
POST
https://apis.aigen.online/aiscript/bookbank/v1
Request Body
Name | Type | Description |
---|---|---|
image* | String | Input base64 image encoded utf-8 |
{
"response_id": "996b3cf298d546adb97c719711504e58",
"status": 1,
"data": [
{
"key": "bank_name",
"value": "krungthai",
"confidence": 0.98
},
{
"key": "branch",
"value": "29 ถนนสุขสวัสดิ์",
"confidence": 0.99
},
{
"key": "account_no",
"value": "000000000",
"confidence": 0.96
},
{
"key": "account_name",
"value": "นายไกรสร ก๋าใจ",
"confidence": 0.97
}
],
"request_id": "996b3cf298d546adb97c719711504e58"
}
{
"response_id": "996b3cf298d546adb97c719711504e58",
"status": 0,
"errors": {
"error_message": "Image quality not acceptable",
"error_code": 1002
},
"request_id": "996b3cf298d546adb97c719711504e58"
}
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}
Example code
import requests
import json
api = "https://apis.aigen.online/aiscript/bookbank/v1"
headers = {"x-aigen-key": "<key>", "content-type": "application/json"}
data = json.dumps({"image": "<base64_string>"})
res = requests.post(api, data=data, headers=headers)
print(res.json())
const axios = require("axios");
const api = "https://apis.aigen.online/aiscript/bookbank/v1";
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);
});
Last updated