Purpose and Core Functionalities
The Nanonets API is designed to offer advanced capabilities for processing images and documents through AI models. This API allows users to create custom models, train them with specific datasets, and use these models to extract text or classify images efficiently. The APIs are designed to help developers integrate these advanced models into their applications to facilitate image and document based data extraction and classification.
General Information
- Base URL:
<https://app.nanonets.com>
- Response Formats: Responses are available in JSON format.
- Authentication Methods: Basic authentication; include your API key in the request header as the username and leave the password blank.
response = requests.get(url, auth=HTTPBasicAuth('YOUR_API_KEY', ''))
Want to quickly test our APIs?
Quickly and easily test our APIs directly from your browser by clicking the "Run in Postman" button below. This button provides immediate access to our Postman collection, allowing you to start making API calls right away. Fork this collection into your workspace and hit your first API.
The API structure is as follows:
The API is structured into several functional areas, each catering to different aspects of OCR and Image Classification:
OCR
OCR Predict APIs:
The OCR Predict APIs enable you to upload files to your OCR model and obtain predictions. These APIs support both sync and async operations, and they accommodate files hosted online as publicly available links as well as files from your local system.
Retrieving Prediction Results:
- Get Prediction File By Page ID: Retrieves the prediction results for a specific page within a document.
- Get All Prediction Files: Fetches all prediction files associated with a specific model.
- Get Prediction File By File ID: Obtain prediction results for a specific file using its unique request file ID.
Uploading Files and Making Predictions:
- Prediction for Image File: Submit a file hosted locally on your system directly to the specified model for prediction.
- Async Prediction for Image File: Submit a file hosted locally on your system for asynchronous prediction, recommended for files with more than 3 pages to optimize processing time.
- Prediction for Image URL: Send a URL of a file to the specified model for prediction.
- Async Prediction for Image URL: Send a file URL for asynchronous prediction, recommended for files with more than 3 pages to optimize processing time.
OCR Train
The OCR Train APIs enable you to upload files to your model for training purposes. You can upload files that are either hosted locally on your system or available online. Once the files are uploaded, these APIs provide the functionality to either train a new model or re-train an existing model.
Uploading training files and train model:
- Upload training images by Url: Send a publicly accessible URL of a file to the specified model for training.
- Upload training images by File: Submit a file hosted locally on your system directly to the specified model for training.
- Train Model: Use this End point to train the model or improve the already trained model.
Image Classification
Image Classification Model Predict: