Input files must be sent using multipart/form-data encoding with the whole binary file or stream file object, base64 are not supported yet. To see how you can make it work in your language, you can refer to Make your first request.
We support JPG, PNG and WEBP format. Note that our APIs have a maximum file size limitation, think about downsizing your input images if you manipulate heavy files. Always prefer JPG over PDF for scans and photos.
Tips for images :
- Reduce too high resolution: downscale your image to have a faster upload time and processing time. Because the text can be very small sometimes, resizing the image too much will make it impossible to read. The rule of thumb is that big images should be resized close to 3 megapixels.
- Keep the aspect ratio: when resizing an image, always keep the original aspect ratio.
- Do not upscale: never upscale a low resolution image on your side! This will decrease the algorithm accuracy. It is best to avoid very low resolution images anyhow.
- Do not preprocess images: it is unnecessary to transform your image in black and white, change brightness / contrast if the image looks fine.
- Ask the chat!: If you have any question related to your image input data, feel free to ask the chat to talk to an expert.
Working with PDFs
Our APIs support multi-page PDF files as well. Because we need to convert the PDF pages to actual images, the processing time may be superior compared to images processing.
Tips for PDFs :
- To be used only if you must: always prefer JPG/PNG format instead of PDF when possible. This is especially true when handling photos and scans. PDF files should be reserved for digital documents only for maximum performance.
- Working with several pages: your PDF may contain several pages. In this scenario, we will handle each page as a separate document. You will therefore receive as many predictions as there are pages. See JSON response scheme documentation for more details.
- Limitations: here is a maximum number of pages you can send, check the Documentation page of your selected API.