# Age Estimation Check

## Run an age estimation check

To run an Age Estimation Check, you must [create a check ](/documentation/api-reference/core-resources/checks/create-a-check.md)with `type` set to `age_estimation_check`.

This check can only be performed on a [client](/documentation/api-reference/core-resources/clients.md) of type `person`. &#x20;

[Learn more about Age Estimation Checks](/documentation/product-guides/biometric-and-liveness-verification/age-estimation-check.md).

{% hint style="info" %}
Get in touch with your Account Manager or [contact us](https://www.complycube.com/sales) to enable this service.
{% endhint %}

## Check request

<table><thead><tr><th width="231">Attribute</th><th width="99.4">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>clientId</code></td><td>string</td><td>The ID of the client associated with this check. (<strong>Required</strong>)</td></tr><tr><td><code>livePhotoId</code></td><td>string</td><td>The ID of the live photo. (<strong>Required</strong>)</td></tr></tbody></table>

## Example request

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST https://api.complycube.com/v1/checks \
     -H 'Authorization: <YOUR_API_KEY>' \
     -H 'Content-Type: application/json' \
     -d '{
          "clientId":"CLIENT_ID",
          "livePhotoId":"LIVE_PHOTO_ID",
          "type": "age_estimation_check"
        }'
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const check = await complycube.check.create("CLIENT_ID", {
        livePhotoId: "LIVE_PHOTO_ID",
        type: "age_estimation_check"
});
```

{% endtab %}

{% tab title="Python" %}

```python
check = cc_api.check.create(
    'CLIENT_ID',
    'age_estimation_check',
    livePhotoId='LIVE_PHOTO_ID'
)
```

{% endtab %}

{% tab title="PHP" %}

```php
$result = $ccapi->checks()->create('CLIENT_ID',
                                   ['type' => 'age_estimation_check',
                                   'livePhotoId' => 'LIVE_PHOTO_ID']);
```

{% endtab %}

{% tab title=".NET" %}

```csharp
var checkRequest = new CheckRequest {
  clientId = "CLIENT_ID",
  livePhotoId = "LIVE_PHOTO_ID",
  type = "age_estimation_check"
};

var check = await checkApi.CreateAsync(checkRequest);
```

{% endtab %}
{% endtabs %}

## Result object

The `result` object is only returned when the status of the check is `complete` . It has two components - `outcome` and `breakdown`.

### Outcome

The outcome attribute represents the overall check result. Returned values include:

1. `clear`: Indicates every analysis conducted returned a successful result, and hence the age estimation check is successful.
2. `attention`: Indicates at least one of the analysis results requires attention.

### Breakdown

The breakdown comprises the following objects:

#### `ageEstimationAnalysis` object

&#x20;The age estimation analysis results. It has the following constituents:

* `ageValidation`: Indicates whether the estimated age is greater than or equal to a predefined minimum accepted age.
* `breakdown`: Breakdown related to age estimation analysis.
  * `age`: Indicates the estimated age of the person in the live photo. The age will be in years.
  * `ageMin`: Indicates the minimum estimated age of the person in the live photo. The age will be in years.
  * `ageMax`: Indicates the maximum estimated age of the person in the live photo. The age will be in years.

#### `authenticityAnalysis` object

&#x20;The facial analysis results. It has the following constituents:

* `livenessCheck`: Indicates if the live photo is genuine and not a photo-of-an-image or photo-of-a-screen.
* `breakdown`: Breakdown related to authenticity analysis.
  * `livenessCheckScore`: Indicates the liveness score of the live photo. The score will be 100 when it is assumed to be authentic.

### Sample Response

```json
{
  "id": "6231d54079f59b1530fc76e3",
  "entityName": "John Doe",
  "type": "age_estimation_check",
  "clientId": "6230d4ab58ed4a434afbf2cc",
  "livePhotoId": "6231d137095afa000955ffc2",
  "status": "complete",
  "result": {
    "outcome": "clear",
    "breakdown": {
      "ageEstimationAnalysis": {
        "ageValidation": "clear",
        "breakdown": {
          "age": 33,
          "ageMin": 27,
          "ageMax": 38
        }
      },
      "authenticityAnalysis": {
        "livenessCheck": "clear",
        "breakdown": {
          "livenessCheckScore": 100
        }
      }
    }
  },
  "updatedAt": "2022-03-01T12:17:06.046Z",
  "createdAt": "2022-03-01T12:17:04.809Z"
}
```


---

# Agent Instructions: 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:

```
GET https://docs.complycube.com/documentation/api-reference/check-types/age-estimation-check.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
