Health Check Report OCR
API Documentation for Health Check Report OCR
API Version
Extract medical examination report information from image or PDF file
Extract medical examination report information from image or PDF file
POST
https://api.aigen.online/aiscript/healthcheck-form/v2
Request Body Parameters
| Key | Type | Description |
|---|---|---|
| image* | String | Input image encoded in base64 format |
Response Keys
Success
| Key | Type | Description |
|---|---|---|
| result | String | Response status |
| data | List[Result] | A list of dictionaries, containing health-check fields and its corresponding value |
Error
| Key | Type | Description |
|---|---|---|
| status | String | Response status |
| message | String | The error message |
Response Schema
Result
| Key | Type | Description |
|---|---|---|
| key | String | Health check field names such as BP, LDL, and HDL. |
| value | Union[float, String] | The health check result, corresponding to the health check field. |
| score | float | The confidence score. |
| found | boolean | A boolean indicating whether the health check field is present in the document. |
| rect | List[int] | The bounding box of the extracted text. In this API, an empty list ([]) is returned for every instance. |
Response Code
| HTTP status | Code | Message | Description |
|---|---|---|---|
| 200 | OK | - | Document information extraction successfully. |
| 500 | INTERNAL_SERVER_ERROR | Internal server error. | Internal server error. |
- 200: OK Successful response
- 500: Internal Server Error
{
"result": "Success",
"data": [
{
"key": "bp",
"value": "106/71",
"score": 0.9982,
"found": true,
"rect": []
},
{
"key": "Weight",
"value": 73.1,
"score": 0.9982,
"found": true,
"rect": []
},
{
"key": "Height",
"value": 179.5,
"score": 0.9982,
"found": true,
"rect": []
},
{
"key": "BMI",
"value": 22.69,
"score": 0.9372,
"found": true,
"rect": []
},
{
"key": "BP-Systolic",
"value": 106.0,
"score": 0.9982,
"found": true,
"rect": []
},
{
"key": "BP-Diastolic",
"value": 71.0,
"score": 0.9982,
"found": true,
"rect": []
},
{
"key": "Date",
"value": "02 ก.ค. 68",
"score": 0.9919,
"found": true,
"rect": []
},
{
"key": "Date_reformatted",
"value": "02/07/2025",
"score": 0.9919,
"found": true,
"rect": []
},
{
"key": "Name",
"value": "n/a",
"score": 0.0,
"found": false,
"rect": []
},
{
"key": "FBS",
"value": "n/a",
"score": 0.0,
"found": false,
"rect": []
},
{
"key": "Hospital_name",
"value": "n/a",
"score": 0.0,
"found": false,
"rect": []
},
{
"key": "Age",
"value": "n/a",
"score": 0.0,
"found": false,
"rect": []
},
{
"key": "LDL",
"value": "n/a",
"score": 0.0,
"found": false,
"rect": []
},
{
"key": "Cholesterol",
"value": "n/a",
"score": 0.0,
"found": false,
"rect": []
},
{
"key": "HDL",
"value": "n/a",
"score": 0.0,
"found": false,
"rect": []
},
{
"key": "DOB",
"value": "n/a",
"score": 0.0,
"found": false,
"rect": []
}
]
}
{
"status": "INTERNAL_SERVER_ERROR",
"message": "Internal server error."
}
Example code
- Python
- Nodejs
- PHP
- cURL
import requests
import json
api = "https://api.aigen.online/aiscript/healthcheck-form/v2"
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://api.aigen.online/aiscript/healthcheck-form/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://api.aigen.online/aiscript/healthcheck-form/v2',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => json_encode(array(
"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://api.aigen.online/aiscript/healthcheck-form/v2' \
--header 'X-AIGEN-KEY: <aigen-key>' \
--header 'Content-Type: application/json' \
--data '{
"image": "<base64_string>"
}'