OCR Documentation Inference API
Header
Your API key
form-data body
Request Body
- files Filerequired
Image or document raw files in a form of multi-part form data using the key name files.
optionalSend with the form of multi-part form data
Default value: 0.4
Adjusting the box_threshold value, ranged between 0 to 1, affects the detection of text in documents. A lower value allows the model to detect more bounding boxes, while a higher value reduces detection sensitivity. It is recommended to start with the default value of 0.4 and gradually increment the value by 0.1 until achieving the desired result for the document being used. (Number between 0 - 1)
- 200
Schema
- Array [
- ]
object
File name
success
| failed
Status of request
result Array [
object
The page number corresponding to the retrieved text.
The full text content of the specified page. This includes all text present on the page, with newline characters (\n) representing line breaks.
data Array [
object
4-pixel coordinate x, y of text box.
The extracted text in each box.
[
{
"filename": "filename.pdf",
"status": "success",
"result": [
{
"page": 1,
"data": [
{
"bbox": [
[
32,
14
],
[
196,
14
],
[
196,
48
],
[
32,
48
]
],
"text": "เอกสาร"
},
{
"bbox": [
[
80,
46
],
[
150,
46
],
[
150,
78
],
[
80,
78
]
],
"text": "หน้าที่ 1"
}
],
"full_text": "เอกสาร\nหน้าที่ 1"
},
{
"page": 2,
"data": [
{
"bbox": [
[
32,
14
],
[
196,
14
],
[
196,
48
],
[
32,
48
]
],
"text": "นกกำลังบินออก"
}
],
"full_text": "นกกำลังบินออก"
}
]
}
]