> For the complete documentation index, see [llms.txt](https://docs.complycube.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.complycube.com/documentation/api-reference/check-types/age-estimation-check.md).

# Age Estimation Check

Age Estimation Check API for KYC age assurance, biometric age estimation, facial analysis, and age-based access controls.

## 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`.

[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

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

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
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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
