Once you've created your first model, you may want to test how the integration via API works. If you haven't already created a model, see how to do this here. Then follow the steps below to test the POST API in Postman.
-
Create a Postman Account: If you don't already have a Postman account, start by signing up on the Postman website.
-
Access the API Documentation: Visit the API documentation page and locate the POST API section. Or copy the endpoint for File below: https://app.nanonets.com/api/v2/OCR/Model/{model_id}/LabelFile/
-
Paste the POST API Endpoint:
-
Create a 'New Request'
- From the dropdown next to the URL field, select "POST" as the HTTP method.
-
In the URL field, paste the copied POST API endpoint that you obtained from the documentation page.
-
-
Replace Model ID: Replace
{model_id}
in the copied URL with your specific Model ID. (Here is how to find your Model ID) -
Setting Up Authorization:
- Go to the "Authorization" tab in Postman.
- Choose "Basic Auth" from the "Type" dropdown.
- In the "Username" field, enter your API key. (Here is how to find your API key.)
- Leave the password field blank.
-
Configuring Request Body:
- Move to the "Body" section in Postman.
- Select the "form-data" radio button.
- Under the "Key" column, change the dropdown from "Text" to "File" and type in the word "File."
-
Attaching a Test File:
- In the "Value" column, use the file picker to select a file from your device that you want to test.
- Ensure that the checkbox corresponding to the selected file is checked.
-
Sending the Request:
- Click the "Send" button to initiate the POST request.
-
Viewing the Results:
- Within a few seconds, the results of the OCR processing will be displayed below the request, showing the extracted information from the uploaded file.
- Within a few seconds, the results of the OCR processing will be displayed below the request, showing the extracted information from the uploaded file.
By following these steps, you'll be able to create an account on Postman, set up the API request, test your OCR model, and observe the results. Please reach out to our team at support@nanonets.com should you run into any errors or blockers.