API [v2.5]
LIQA Service API functions
Permissions (React Native only)
To allow LIQA request access to user camera, it is necessary to modify the React Native app permission manifest. Read here how to do it (for both iOS / Android): App permissions (React Native only)
Initialization & Start
Before LIQA can start, it is necessary to locate the object where to put LIQA - initialize. As soon as all is ready you can start LIQA. This command will request camera access from the user, compile models and run live process of image capturing.
Copy and paste this part of code inside of your application to perform start:
Add Cache Header to to manage cache lifetime.
Add <meta />
tag to your index.html
:
The max-age=<N>
response directive indicates that the response remains fresh until N seconds after the response is generated.
We do not recommend making this value > 2 days to keep your system always up to date (2 days = 151200 seconds)
Initialization may take some time to connect to Haut.AI servers, authenticate the request and download all assets. Start may take some time to compile AI models of LIQA for exact device. Depending on the available device computational capacities, this process may take from 1.5 to 15 seconds (for old devices).
If camera access is not granted during the start event, LIQA will return an error.
As devices may vary on screen / camera size, LIQA automatically adjust video and UI to the most suitable resolution. Read here to learn how it works and what devices are supported: Responsive UI
Get photo
LIQA performs live image analysis to help your user to find the best postion and illumination and take a high quality photo. As a result LIQA returns image encoded as base64
(common image encoding to bytes).
Copy and paste this part of code inside of your system to receive a final image:
Exit
As soon as your user finished image capturing process, the LIQA is no longer necessary and can be hidden from the user.
Copy and paste this part of code inside of your application to perform exit:
All-in-one Example
LIQA e-Commerce / Light
The example below shows several lines of code for using LIQA in your application.
LIQA Feet
The example below shows several lines of code for using LIQA in your application.
Last updated