Nanonets API to upload files to your OCR model in sync mode and to make predictions based on the uploaded images or documents using a publicly available file link. You can specify multiple file urls, this endpoint is optimized for files containing 3 pages or fewer.


You can test this API on this page using the API key. First, generate the API key, add the file url hosted online, and enter the model_id in the parameter boxes below. Once you have added all the parameters, hit the “Try It!” button on the right side panel to see the response in the response box on the right side panel.


Attributes:

  • message:This indicates the overall success of the API call.
  • result: This is a list that contains objects, each representing a page of the file. These objects include the following attributes:
    • message: This indicates the success of page processed in the file.
    • input: This is the name of the file uploaded to the model using this API.
    • prediction: An array of objects containing detailed predictions for fields and tables identified on the page.
      Child Attributes:
      • id: This is the unique identifier for the prediction.
      • label: The label name, which corresponds to the field or table header as configured in the model.
      • xmin, ymin, xmax, ymax: This represents the minimum and maximum x,y-coordinate of the bounding box used to predict the value for the specified label.
      • score: A confidence score in prediction represents the model's certainty in its output. It's a numerical value, usually between 0 and 1, indicating the probability that the prediction is correct. A higher score means greater confidence in the prediction's accuracy.
      • ocr_text: This is the predicted value associated with the label
      • type: This represent if the label is field or table header. Possible values are field and table.
      • status: This field represent the status of the label predicted, it’s always correctly_predicted.
      • validation_status: This indicates the outcome determined by the rule set in the approval rules. If this field is absent from the response for a label, it indicates that the approval rules passed successfully. However, if this field is present and shows "failed," it signifies that the approval rules did not pass.
      • validation_message: This indicates the specific reason why a label validation failed. This reason corresponds directly to the rule that was set up in the approval rules.
      • page_no: The page number in the document where the label is located, with 0 representing the first page and so on.
      • label_id: A unique identifier associated with each label as defined in the model.
      • cells: An array of cell predictions within the identified table.
        Child Attributes:
        • id: This is the unique identifier for the cell prediction.
        • row, col: This represent the row and column numbers where the cell is located.
        • label: The label name, which corresponds to the table header as configured in the model.
        • xmin, ymin, xmax, ymax: This represents the minimum and maximum x,y-coordinate of the bounding box used to predict the value for the specified label.
        • score: A confidence score in prediction represents the model's certainty in its output. It's a numerical value, usually between 0 and 1, indicating the probability that the prediction is correct. A higher score means greater confidence in the prediction's accuracy.
        • text : This represent the predicted value associated with the cell within the table.
        • verification_status: This represent the verification status of the prediction.
        • status: This indicates the outcome based on the rule set in the approval rules. If this field is blank or null, it means the approval rules passed successfully. If it shows "failed," it indicates that the approval rules did not pass.
        • failed_validation: This indicates the specific reason why a cell's validation failed. This reason corresponds directly to the rule that was set up in the approval rules.
        • label_id: A unique identifier associated with each label as defined in the model.
    • page: The page number in the document where the label/table headers are located, with 0 representing the first page and so on.
    • request_file_id: The unique identifier of the file you uploaded to the model for prediction. You can find this ID on the extract data page of the model for each file.
    • id: This represents the unique identification of the page processed.
    • request_metadata: This is a body parameter that you include in the request when making an API call. It is returned in the API response and is typically used to uniquely identify and map the file you uploaded.
    • processing_type: This indicates how the file was processed, specifying whether it was handled async or sync. If this field in the response is empty, it means the file was processed sync. If it shows "async," the file was processed async. For more details on sync and async processing, please refer to this page.
    • size: This represent the dimension of the pages processed.
      • width: This field represent the width of the page
      • height: This field represent the height of the page
  • signed_urls: An object containing signed URLs for accessing various processed files

Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!