Description
This article describes the behaviour of the sync and async settings on your model
Note: This article only toggles the settings on files uploaded via the Nanonets UI
How can I change this setting?
You can change this from the settings page of your model and toggle between the 2 options show below. Go to https://app.nanonets.com/#/ocr/settings/<MY_MODEL_ID>)
What does this setting do
The Nanonets OCR API allows you to upload files on the Nanonets UI in 2 different ways.
- Sync processing
- Async processing
Sync processing
For most users the sync processing works fine. This is also the default setting on your model. Essentially, this follows the traditional request response API model. Here's how it works
- You send an API request with your file
- I will send you back the information extracted from the file in the response
Async processing
For users with large files (think of PDFs with more than 20 pages), the traditional request response API model won't work very well. This is due to the fact that the files can take large amount of time (in a few minutes) to process. Waiting for a response for this long is not optimal.
In cases like these the async processing setting can be used. Here's how it works.
- You send an API request with your file
- Once the file is uploaded, Nanonets will immediately return with a response, providing a token ID
- The file is in queue in processing
- Once the file is processed, the UI immediately updates with the results