Connecting to the Cloud Service

To set up the use of the cloud API you need to make a correct request for the necessary API-method. To do that, first familiarize yourself with the description of the service you need and its API-specification. After that proceed to making the required request:
Action sequence for the correct request
Get your license key from our manager. If you don't have one, mail us: [email protected]
Find a picture of the test document. For testing purposes, you can use the Japanese id, covid form or an invoice.
Build a query using Swagger UI at latest.handl.ai/try:
Click on Authorize in the upper right corner of the page and enter your license key in any Value field;
Select the API method you want. For example, if you need to recognize passport fields, select the /recognize method
Click Try it out;
Select the necessary values for the API request parameters. If a parameter is optional, you don't have to choose its value; it will be the default;
Scroll down to the big blue button Execute, press Select file opposite to the image caption, in case of the passport from Wikipedia - Pasport_RF.jpg file;
press Execute.
In the curl field, you will get a correct curl-request. Copy it to the clipboard.
To check the curl query, use a console such as PowerShell. To do this, go to the directory where the file you selected in step 3.5 is located. For example: cd C:\Downloads. Paste the curl query from the clipboard and execute it.
The request to the cloud must include the API_TOKEN license key. Its transfer options are given below (the END_POINT means a certain method such as /recognize).
# token in header, option №1
$ curl -siX POST \
-H "Authorization: Token <API_TOKEN>" \
-F "[email protected]" \
"https://latest.handl.ai/<END_POINT>"
# token in header, option №2
$ curl -siX POST \
-H "Authorization: <API_TOKEN>" \
-F "[email protected]" \
"https://latest.handl.ai/<END_POINT>"
# token in request
$ curl -siX POST \
-F "[email protected]" \
"https://latest.handl.ai/<END_POINT>?token=<API_TOKEN>"
# token in cookies
$ curl -siX POST \
-H "Cookie: token=<API_TOKEN>"
-F "[email protected]" \
"https://latest.handl.ai/<END_POINT>"
Last updated
Was this helpful?