How do I get the Nanonets API working?

Nanonets is API first provider and our API is very straightforward to use.

1. Go to your Model

To start using the API you need to have a model first. What is a Model, a Model is the workflow that you setup with Nanonets to extract data from your files.

If you already have a model great just navigate to your models Extract Data screen. If you haven't yet created a model, go to and select your document type and create your first model.

2. Go to the Integrate Screen

On your model screen go to the integrate screen.

3. Pick options

Select your programing language of choice and if you would like to send a file via Url or a local file directly from your system

4. Click Copy Code

Click Copy Code to get the code to use to query the API. Paste it into your favorite text editor and run.

5. How to setup Authentication correctly with Nanonets

Nanonets uses "Basic Authentication" for Authenticating that it is indeed an authorised user making a API request.

In the Basic Authentication schema we use the API Key that can be found here: API Keys as the "username" and the "password" is set to blank. Below are sample using Curl, Postman and Python


Here is what a sample curl request looks like to get all your OCR models:

curl --user YOUR_API_KEY:

Please note that there is a ":" at the end this is split the username and password, but since the password is blank there is nothing following the ":". This is only for Curl example and doesn't apply to the examples below.


You need to go the Authorization tab and enter your API Key in the Username. The password is blank. The API Key is pasted as is without any modification or any other characters before or after


import requests
url = ""
payload = {}
response = requests.request("GET", url, data = payload, auth=('YOUR_API_KEY', ''))

Replace your API Key in the code. The API Key is pasted as is without any modification or any other characters before or after

Was this article helpful?