Image features#
Some features mentioned are intrinsically linked to the services that use the image resource. These services include:License Plate Recognition
Supported file extensions#
The API supports the following file types:Tipo de Documento | Extensão do Arquivo | MIME Type |
---|
AVIF | .avif | image/avif |
BMP | .bmp | image/bmp |
Graphics Interchange Format | .gif | image/gif |
HEIC | .heic | image/heic |
Joint Photographics Experts Group | .jpeg | image/jpeg |
JPEG 2000 | .jp2 | image/jp2 |
JPEG File Interchange Format | .jfif | image/.jfif |
JPG | .jpg | image/jpeg |
JXL | .jxl | image/jxl |
PAM | .pam | image/x-portable-arbitrarymap |
PBM | .pbm | image/x-portable-bitmap |
Portable Document Format | .pdf | application/pdf |
Portable Gray Map | .pgm | image/x-portable-graymap |
Portable Network Graphics | .png | image/png |
Portable Pixmap Format | .ppm | image/x-portable-pixmap |
Tagged Image File Format * | .tiff | image/tiff |
WEBP | .webp | image/webp |
For TIFF files that have more than one page, extraction will only occur on the first page.
Password-encrypted PDF files must be accompanied by the respective password, encoded in a base64 string, and sent in the filePassword
input parameter.
Characteristics and limitations of image files#
The maximum upload limit for mostQI is 50MB for PDFs and 20MB for image files, with a minimum area limit of 5k pixels or 50 pixels per side.
PDF files containing more than 50 pages will be rejected. For files with more than 5 pages, the asynchronous route should be used to avoid timeout.
Due to the wide variation in quality of capture devices available on smartphones, there are no minimum recommendations in terms of resolution or image size.
To reduce the file size to be sent to mostQI, JPG compression is recommended. Image resizing operations are not recommended, as they can compromise quality more than JPG compression.
In some cases, compression with up to 80% loss is acceptable, but there is a significant reduction in image size. Lossy compression can impair reading performance, so very high levels should be used only for very large images.
Images that exceed the upper limit of 9M pixels will be resized (proportionally) to fit within the limit.
The mostQI API offers optional parameters that allow requesting transformed images based on the original file. These images are provided in the API response in base64 format and are available in the following routes: Content Extraction, VIO Extraction, and Smart Invoice Extraction.Original image submitted in the request.
The available parameters are as follows:returnImage#
returnImage
: If this parameter is included in the request with the value true, the API will return crops of the binaries of the typified document images, correcting the perspective.Image of the document with corrected perspective.
returnedImageQuality#
returnedImageQuality
: Allows setting the quality of the deskew image returned in the route through the returnImage parameter. The default value (when not specified) is 75.returnCrops#
returnCrops
: If this parameter is included in the request with the value 'true', the API will return crops of the binaries of images contained within a typified document, correcting the perspective. These crops may include photos, signatures, barcodes, and fingerprints. Consult the list of read documents to view all available crops.Photo crop (tag has=photo).
Signature crop (tag has=signature).
Standard response#
All API methods have a standardized response body:{
"result": {},
"requestId": "",
"elapsedMilliseconds": 0,
"status": {
"message": "Ok",
"code": "200",
"errors": null
}
}
The order of elements within the result
is not guaranteed. It is mandatory to use the name
field as a reference to find the values.
Response#
Name | Type | Nullable | Description |
---|
result | Variable | Yes | List containing the result of the method (see specific documentation for each). |
requestId | String | No | Code that identifies the request made on the server, it is recorded in the service billing history. |
elapsedMilliseconds | Integer | No | Duration of the processing in milliseconds. |
status | Object | No | Object containing the status code and message of the response. |
Status#
Name | Type | Nullable | Description |
---|
code | String | No | Internal status code. |
message | String | Yes | Return message of the status. |
errors | List of Error | Yes | List of Error type objects, the format is variable. |
Data storage and LGPD#
MostQI does not store images sent by clients and all processing occurs in volatile memory, keeping us in compliance with the LGPD.