Configure Your App Backend and SaaS for Integration

This page describes the necessary steps needed to start building a custom app, powered by Haut.AI

Important to Know Before You Start

Haut.AI supports multiple options to build a custom app, allowing for both web and native (mobile) apps and a very wide range of use cases due to the flexible usage of APIs. However, several limitations must be accounted for from the very beginning.


Login to SaaS

To interact with any API method, you’ll first need to log in using your account credentials.

Check the Login API reference for details about the relevant API methods.

  • Provide your email and password to authenticate.

  • The response will contain the access_token and company_id.

What do these objects mean?

  • Access Token (access_token) is a short-lived token that you’ll need to include in the headers for all subsequent requests.

    • This token is temporary, usually expiring after a short period (e.g., one hour). Once it expires, you’ll need to log in again to get a new one.

    • The token should be included in the authorization header for any future requests.

    • This token is not recommended for using API. Instead, follow the next step Configure Your App Backend and SaaS for Integration

  • Company ID (company_id) is a unique identifier for your company, which may be required in certain API requests. The company_id is tied to your account.


Create Long-Living Private Token for SaaS API

After the successful API for Login, you can now authenticate and proceed with using the API. If your access_token expired earlier, repeat the login action.

The next step is to create a long-living token (it's called a Private Token). This token is meant for backend server use, allowing you to make API requests without constantly re-authenticating.

Check the Private tokens API reference for details about the relevant API methods.

  • Provide a short-lived token in the authorization header.

  • The response will contain the Private Token under the data field.

Once the Private Token is created, use it for any subsequent requests to the SaaS API by simply including the Private Token in the Authorization a header like this:

Authorization: Bearer {private token}

The token is used in the Bearer format, so make sure to prefix it with the word "Bearer," followed by a space and then your token.


Create Dataset in SaaS

After the successful creation of API for Private Tokens, you can now authenticate for a long time and proceed with using the API. If your Private Token expired earlier, repeat creation of Private Token.

The next step is to create a Dataset. Datasets are spaces where you can store and manage your end-user data, such as images and metrics.

Check the Datasets feature description for details about datasets.

Check the Datasets API Reference for details about the relevant API methods.

  • The name of the dataset is the only required field when creating a new Dataset.

  • You’ll also notice that your company_id is used as part of the URL path for the Dataset creation.

  • As soon as a new Dataset is created, you can retrieve a Dataset id.


Attach Algorithms Application to Dataset in SaaS

After the successful creation of API for Datasets, you can now attach Algorithms Application(s) to your Dataset. Algorithms are an AI core functionality of Haut.AI products. Algorithms enable AI image analysis.

Check the Algorithms feature description for details about Algorithms.

Check the Algorithms Applications API Reference for details about the relevant methods.

  • Use the Algorithm Application tech_name in URL path

  • Use the Dataset id to which you would like to attach the selected Algorithm Application.

Algorithms applications and billing

FAQ about Algorithms application

Can I detach an Algorithm Application from the Dataset?

Unfortunately, no. Algorithm Applications can not be detached manually. If you need it, please contact our support team.

How many Algorithm Applications can I attach to the Dataset?

You can attach all available Algorithm Applications to any Dataset.

Please keep in mind that each Algorithm Application will process every uploaded image to the dataset, adding to the number of API calls used for this. Thus number of API calls will be subtracted from your Subscription Plan quota.

Which Algorithm Applications can I attach?

Some Algorithm Applications depend on the results of other Algorithm Applications, so you should always attach them together (check this section in the API overview for more information).


Configure Webhooks for Dataset in SaaS

After the successful attachment of API for Algorithm Applications to Dataset, we recommend configuring a Webhook to streamline the process of receiving results from each skin analysis.

Webhooks offer a convenient, real-time push model for receiving analysis results instantly. This reduces the need for polling and saves resources for both your server and the API.

Check the Feature description for more details.

Check the Webhooks API Overview for details about the relevant methods.

FAQ about webhooks

Please be informed that Webhooks can be configured only at the Dataset level, meaning each dataset can have its own webhook setup.

Currently, each Dataset supports only one Webhook destination. This means that results from the Dataset can be consumed by just one system.

If you need to send data in real-time to multiple systems, we highly encourage you to consider using specialized automation services such as Zapier. See our guide for integrating SaaS with Klaviyo CRM via Zapier.


Next Steps

Follow our next guide Integrate Haut.AI Image Analysis with Your Appto find out how to:

  1. Upload photos: Send the photos you want to analyze to the dataset using the appropriate API calls.

  2. Receive results: via Webhooks or via API methods.

Last updated

Was this helpful?