> For the complete documentation index, see [llms.txt](https://docs.saas.haut.ai/haut.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.saas.haut.ai/haut.ai/developers/saas-api-overview/api-for-face-metrics-2.0/output-overview.md).

# Generic Algorithm Metric Scheme

This page explains the output of the API

## Structure of response

The API response of each algorithm has the following structure:

```javascript
{
    "algorithm_tech_name": ,
    "image_type": ,
    "area_results": ,
    "masks_restored": ,
    "masks_original": 
}
```

* `algorithm_tech_name` — technical name of an algorithm
* `image_type` — type of image. In this case, it is equal to `"selfie"`
* `area_results` — algorithm results of different facial skin areas
* `masks_restored` — masks of detected objects that can be overlaid on a face-aligned image
* `masks_original` — masks of detected objects that can be overlaid on an original image

## `area_results`

The block of API output that contains information about the algorithm output:

```javascript
"area_results": [
        {
            "area_name": ,
            "main_metric": ,
            "sub_metrics": ,
        },
        ...
        {
            "area_name": ,
            "main_metric": ,
            "sub_metrics": ,
        },
            ]
```

* `area_name` - name of the facial area in which a particular algorithm result is calculated
  * `face` a whole face
  * `forehead` forehead
  * `forehead_n_bridge` forehead and nasal bridge
  * `nose` nose
  * `nose_bridge` nose and nasal bridge
  * `nose_upper_triangle` nose
  * `right_cheek` right cheek
  * `right_cheek_wide` right cheek
  * `right_cheek_large` right cheek
  * `left_cheek` left cheek
  * `left_cheek_wide` left cheek
  * `left_cheek_large` left cheek
  * `left_eye_outer` area around the left eye
  * `right_eye_outer` area around the right eye
  * `chin_wide` chin
  * `chin` chin
* `main_metric`- the main output of an algorithm
* `sub_metrics`- the auxiliary output of an algorithm with additional features

## `masks_restored`

Masks are a set of coordinates on an image that describe the location of particular objects in that image, e.g., coordinates of wrinkles or acne spots. `masks_restored` is a mask that is calculated for a face-aligned image (or restored image).

```javascript
"masks_restored": [
        {
            "mask_type": "polygon_mask",
            "features": [
                {
                    "geometry": {
                        "type": "MultiPolygon",
                        "coordinates": [ ]
                     },
                    "properties": {
                        "intensity": 
                    },
                    "type":
                }
            ],
            "view_box": ,
            "name": ,
            "tech_name": ,
            "fill": ,
            "type": 
        }   
                    
```

* `mask_type` is a type of mask. The API returns three types of masks:
  * `polygon_mask` - mask consists of polygons and their coordinates
  * `point_mask` - mask consists of dots and their coordinates
  * `heatmap_mask` - mask represents a heatmap
* `features` - mask features
  * `geometry`- information about the geometry of detected objects
    * `type`
      * `MultiPolygon`
      * `MultiPoint`
    * `coordinates` - coordinates of detected objects
  * `properties`
    * `intensity` - recommended color intensity for visualization
  * `type` - *ignore this field*
* `view_box` - the size of an image
* `name` - mask name
* `tech_name` - technical mask name
* `fill`- recommended color for visualization
* `type` - *ignore this field*

For further information about mask visualization, read more [here](/haut.ai/haut.ai-features/algorithms/algorithm-results.md#masks)

## `masks_original`

The same as masks\_restored, but the mask is calculated for the original input image.

For further information about mask visualization, read more [here](/haut.ai/haut.ai-features/algorithms/algorithm-results.md#masks)

***

{% hint style="warning" %}
Not a Haut.AI client yet?
{% endhint %}

<a href="https://haut.ai/book-a-demo?utm_source=referral&#x26;utm_medium=saas_docs&#x26;utm_campaign=Docs_SaaS_HautAI" class="button primary" data-icon="user-vneck">Book a demo</a> <a href="https://haut.ai/product/ai-skin-analysis?utm_source=referral&#x26;utm_medium=saas_docs&#x26;utm_campaign=Docs_SaaS_HautAI" class="button secondary" data-icon="external-link">Platform overview on haut.ai</a>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.saas.haut.ai/haut.ai/developers/saas-api-overview/api-for-face-metrics-2.0/output-overview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
