For the complete documentation index, see llms.txt. This page is also available as Markdown.

/api/v1/process_multi

Processes multiple alphabets using OCR

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body

Body for OCR processing

typestring · enumOptional

The type of document to process must be specified, since our service can handle different types of documents.

Example: id_cardPossible values:
modelstringOptional

This parameter specifies the ID of the document to process.

Example: ARG
filesstring[]Optional

Array of images as raw buffers encoded in base64 RFC4648.

Example: ["iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mP8z8BQz0AEYBxVSF+FABJADveWkH6oAAAAAElFTkSuQmCC.b64"]
isCroppedbooleanOptionalDeprecated

If the image is already cropped and aligned, the service can skip these operations. Only applies to invoice documents.

Default: false
forceDetectionbooleanOptionalDeprecated

If 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.

Default: false
retrieveImagesbooleanOptional

The service will return the cropped image in base64 in the final result.

Default: false
Responses
200

The result of the OCR processing

application/json

Result in universal response format of an image processing (multi-alphabet support).

versionintegerRequired

Version of the OCR UR JSON schema.

Example: 1
typestringRequired

Document type.

Example: id_card
modelstringRequired

Document model.

Example: ARG
post/api/v1/process_multi
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