/api/v1/process_multi
Processes multiple alphabets using OCR
Body for OCR processing
The type of document to process must be specified, since our service can handle different types of documents.
id_cardPossible values: This parameter specifies the ID of the document to process.
ARGArray of images as raw buffers encoded in base64 RFC4648.
["iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mP8z8BQz0AEYBxVSF+FABJADveWkH6oAAAAAElFTkSuQmCC.b64"]If the image is already cropped and aligned, the service can skip these operations. Only applies to invoice documents.
falseIf the invoice document does not have the correct aspect ratio, the service can perform an operation to correct it and improve document detection. Only applies to invoice documents.
falseThe service will return the cropped image in base64 in the final result.
falseThe result of the OCR processing
Result in universal response format of an image processing (multi-alphabet support).
Version of the OCR UR JSON schema.
1Document type.
id_cardDocument model.
ARGIncorrect parameters were received in the request.
An error occurred in the call to the OCR-SDK backend.
POST /api/v1/process_multi HTTP/1.1
Host: 127.0.0.1:6982/
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 176
{
"type": "id_card",
"model": "ARG",
"files": [
"iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mP8z8BQz0AEYBxVSF+FABJADveWkH6oAAAAAElFTkSuQmCC.b64"
],
"retrieveImages": false
}{
"version": 1,
"type": "id_card",
"model": "ARG",
"ocr": {
"ANY_ADDITIONAL_PROPERTY": {
"value": "12345678A",
"confidence": 0.95,
"source": {
"type": "viz",
"index": 0
}
}
},
"images": [
{
"type": "portrait",
"side": 0,
"source": "viz",
"content": {
"data": "/9j/4AAQSkZJRgABAQEAtAC0AAD...",
"length": 12345,
"mime_type": "image/jpeg"
},
"region": {
"top_left": {
"x": 100.5,
"y": 200.3
},
"top_right": {
"x": 100.5,
"y": 200.3
},
"bottom_left": {
"x": 100.5,
"y": 200.3
},
"bottom_right": {
"x": 100.5,
"y": 200.3
}
}
}
],
"viz": [
{
"field": "DocumentNumber",
"value": "12345678A",
"side": 0,
"confidence": 0.95,
"alphabet": "latin",
"region": {
"top_left": {
"x": 100.5,
"y": 200.3
},
"top_right": {
"x": 100.5,
"y": 200.3
},
"bottom_left": {
"x": 100.5,
"y": 200.3
},
"bottom_right": {
"x": 100.5,
"y": 200.3
}
}
}
],
"mrz": [
{
"side": 1,
"confidence": 0.98,
"raw": "P<ESPGARCIA<<MARIA<<<<<<<<<<<<<<<<<<<<<<<",
"fields": {
"DocumentNumber": "AAA000000",
"DateOfBirth": "1990-01-01"
},
"region": {
"top_left": {
"x": 100.5,
"y": 200.3
},
"top_right": {
"x": 100.5,
"y": 200.3
},
"bottom_left": {
"x": 100.5,
"y": 200.3
},
"bottom_right": {
"x": 100.5,
"y": 200.3
}
}
}
],
"encoded": [
{
"fields": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"type": "qr",
"side": 1,
"raw": "RAW_ENCODED_DATA",
"rawBinary": "AQIDBAUGBwgJ",
"region": {
"top_left": {
"x": 100.5,
"y": 200.3
},
"top_right": {
"x": 100.5,
"y": 200.3
},
"bottom_left": {
"x": 100.5,
"y": 200.3
},
"bottom_right": {
"x": 100.5,
"y": 200.3
}
}
}
],
"nfc": [
{
"field": "DocumentNumber",
"value": "12345678A",
"alphabet": "latin"
}
],
"checks": {
"field_inconsistency": [
{
"field": "DocumentNumber",
"values": [
"12345678A",
"12345678B"
],
"distance": 1
}
]
}
}Last updated