Telecommunication Bill OCR
API Documentation for Telecommunication Bill OCR
Extract telecommunication bill information from an image or photo
Key List
key | description |
---|---|
recipient_name | name of bill recipient |
due_date | payment due date |
total_amount | total bill amount |
Extract telecommunication bill information
POST https://apis.aigen.online/aiscript/utility-telecommunicationbill/v1
Request Body
Name | Type | Description |
---|---|---|
image* | String | Input base64 image encoded utf-8 |
- 200: OK Successful response
- 422: Unprocessable Entity Validation error
{
"status": "200",
"message": "success",
"response_id": "bafd703dd66c425e8fa097bdad899257",
"error_list": [],
"result": [
{
"confidence": 1,
"key": "name",
"rect": [
271,
212,
502,
250
],
"text": "นาย ปัญญา ประดิษฐ์"
},
{
"confidence": 0.99,
"key": "payment_date",
"rect": [
1306,
762,
1480,
795
],
"text": "03/02/2565"
},
{
"confidence": 1,
"key": "total_amount",
"rect": [
1040,
762,
1147,
795
],
"text": "266.43"
}
]
}
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}
Example code
- Python
- Nodejs
import requests
import json
api = "https://apis.aigen.online/aiscript/utility-telecommunicationbill/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/utility-telecommunicationbill/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);
});