capabilities.work

Async OCR Predict and Poll

A 2-step recipe with Nanonets. We can help you get access.

Recipe · 2 steps

Async OCR Predict and Poll

with Nanonets · Artificial Intelligence Management

Async predict on a file then poll the inference request for the finished result.

  1. Upload the file to the model in async mode and capture the request_file_id used to poll for the result.
  2. Fetch the file-level prediction for the request_file_id. Branch back to poll again while no prediction array is present, otherwise finish.
What you'll need to have ready
  • authorization: HTTP Basic credential header value (Basic <base64 of apiKey:>) where the Nanonets API key is the username and the password is empty.
  • modelId: Unique identifier for the Nanonets OCR model.
  • file: Binary contents of the document to run async OCR against.
  • requestMetadata: Free-form identifier echoed back in the prediction response.
For your developer

Arazzo workflow nanonets:async-ocr-predict-and-poll, 2 operations: ocrModelLabelFileAsyncByModelIdPost → ocrModelGetPredictionFileByFileId. Specs on APIs.io.