🟢API for Algorithm Applications
This page contains description of algorithms applications management via API.
Algorithms is an AI core functionality of Haut.AI products. Algorithms enable AI image analysis. Algorithms are organized into Applications, that combine one or more algorithms.
What is algorithm application?
What can you do?
List available applications
List applications
Which field to use when ordering the results.
A search term.
A page number within the paginated result set.
Number of results to return per page.
GET /api/v1/companies/{company_id}/applications/ HTTP/1.1
Host: saas.haut.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"results": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"tech_name": "text",
"author_id": 1,
"creation_time": "2025-10-08T20:20:23.879Z",
"image_type": {
"id": 1,
"name": "text",
"tech_name": "text",
"sides": [
{
"id": 1,
"name": "text",
"tech_name": "text"
}
],
"lights": [
{
"id": 1,
"name": "text",
"tech_name": "text"
}
]
},
"algorithms_versions": [
{
"id": 1,
"name": "text",
"tech_name": "text",
"html_description": "text"
}
],
"description": "text",
"preview": "text",
"promote_image_url": "https://example.com",
"is_enabled": null,
"algorithms_flags": null
}
]
}
Attach algorithms application to dataset
Attach algorithms application to dataset
^[\w.]+$
Automatically attach required applications to dataset as well
false
Serializer to get dataset id from urls.
dataset id
POST /api/v1/companies/{company_id}/applications/{tech_name}/attach-to-dataset/ HTTP/1.1
Host: saas.haut.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 107
{
"dataset_id": "123e4567-e89b-12d3-a456-426614174000",
"enabled_algorithms": [
"text"
],
"algorithms_flags": null
}
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"dataset_id": "123e4567-e89b-12d3-a456-426614174000",
"company_id": "123e4567-e89b-12d3-a456-426614174000",
"application_id": "123e4567-e89b-12d3-a456-426614174000",
"creation_time": "2025-10-08T20:20:23.879Z",
"application_name": "text",
"application_tech_name": "text",
"enabled_algorithms": [
{
"id": 1,
"name": "text",
"tech_name": "text",
"html_description": "text"
}
],
"algorithms_flags": null,
"humanified_algorithms_flags": [
{
"name": "text",
"values": []
}
]
}
Example: Attaching Face Skin Metrics 2.0
For simplicity, let’s consider one of the most commonly used applications: Face Skin Metrics 2.0. This application is identified by its tech_name
: face_skin_metrics_2.0
. The tech_name
is used in the API to specify which application you want to work with.
Applications dependencies
Some applications have dependencies on others. If you try to attach an application that requires another to be attached (but it isn’t), you will receive an error.
Example: If you try to attach the Recommendation Engine without first attaching the Face Skin Metrics 2.0 application, you'll receive an error response indicating the unmet dependency.
Example Error Response:
If you attempt to attach the Recommendation Engine without having Face Skin Metrics 2.0 attached to the dataset, the API will return an error like this:
{
"type": "validation_error",
"errors": [
{
"code": "missing_dependencies",
"detail": "Missing dependencies.",
"attr": null,
"extra": {
"missing_application_tech_names": [
"face_skin_metrics_2.0"
],
"missing_algorithms": []
}
}
]
}
When you encounter an error due to missing dependencies while attaching an algorithm application, you have two ways to resolve this issue:
1. Attach Dependent Applications Explicitly:
You can manually attach the required dependencies by making API requests for each application that needs to be attached before the primary one.
This requires knowing the dependencies ahead of time and attaching them in the correct order.
2. Use resolve_dependencies=true
:
A simpler method is to resend the POST
/runs/ TODO: UPDATE method
request with the query parameterresolve_dependencies=true
. This will automatically handle and attach any required dependencies for you.This option ensures that the API will resolve all necessary dependencies without you having to manually attach them.
Which Method to Use?
Explicit Attachment: Use this if you prefer full control over the attachment process and know exactly what dependencies are required.
resolve_dependencies=true
: Use this for convenience, as it automates the process of attaching dependencies without needing to track them manually.
Example Workflow:
Error Handling: If you try to attach an application and receive a dependency error:
Manually attach the required applications or
Resend the request with
resolve_dependencies=true
.
This flexibility allows you to manage application dependencies based on your preferred workflow.
Detach algorithms applications
Not possible :(
Reattach algorithms applications
Just attach the applicaiton again.
Enable/disable algorithms for attached algorithms applications
Reattach application and set enabled_algorithms
key to a list of tech names of algorithms.
You can retrieve all possible algorithms included in application from the response of Get application info method.
Last updated
Was this helpful?