Table Extraction OCR
Generalized Table Extraction
POST
https://apis.aigen.online/aiscript/table-exraction/v1
Request Body
Name | Type | Description |
---|---|---|
image* | String | Input base64 images encoded utf-8 |
{
"status": "200",
"message": "success",
"response_id": "string",
"error_list": [
{
"code": "string",
"message": "string"
}
],
"result": [
[
{
"cells": [
{
"text": "order",
"confidence": 0.99875,
"row": 1,
"column": 1,
"bbox": [
[
0,
1
],
[
1,
0
],
[
1,
1
],
[
0,
1
]
]
}
],
"n_row": 5,
"n_column": 5
}
]
]
}
{
"status": "200",
"message": "success",
"response_id": "string",
"error_list": [
{
"code": "string",
"message": "string"
}
],
"result": [
[
{
"cells": [
{
"text": "order",
"confidence": 0.99875,
"row": 1,
"column": 1,
"bbox": [
[
0,
1
],
[
1,
0
],
[
1,
1
],
[
0,
1
]
]
}
],
"n_row": 5,
"n_column": 5
}
]
]
}
Example code
import requests
import json
api = "https://apis.aigen.online/aiscript/table-exraction/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/table-exraction/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