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

# Selfie Age Estimation

## AgeMatch 5.0 Estimate API

The AgeMatch 5.0 Estimate API provides an estimate of the age based on a provided selfie.

### POST /process/comprehensive/gateway

Submits a request to estimate the age of a person based on a selfie image.

#### Request

| Field     | Type   | Description                            | Required |
| --------- | ------ | -------------------------------------- | -------- |
| user      | string | Your Veratad username                  | Yes      |
| pass      | string | Your Veratad password                  | Yes      |
| service   | string | The service identifier                 | Yes      |
| reference | string | A unique reference for the transaction | No       |
| rules     | string | Additional rules for the transaction   | No       |
| target    | object | The target information                 | Yes      |

**Target Object**

| Field  | Type   | Description               | Required |
| ------ | ------ | ------------------------- | -------- |
| selfie | string | Base64 encoded face image | Yes      |
| age    | string | The age to check against  | Yes      |

**Example Request**

```json
{
  "user": "username",
  "pass": "password",
  "service": "AgeMatch5.0.Estimate",
  "reference": "12345",
  "rules": "",
  "target": {
    "selfie": "base 64 encoded face image",
    "age": "21+"
  }
}
```

#### Response

The response will contain metadata about the request, output details, and the result of the age estimation.

**Response Object**

| Field  | Type   | Description                                  |
| ------ | ------ | -------------------------------------------- |
| meta   | object | Contains metadata related to the transaction |
| output | object | Contains the output of the age estimate      |
| result | object | Contains the result of the age verification  |

**Meta Object**

| Field        | Type   | Description                         |
| ------------ | ------ | ----------------------------------- |
| confirmation | number | Confirmation number for the request |
| timestamp    | string | Timestamp of the transaction        |
| reference    | string | Reference of the original request   |
| user         | string | Your Veratad username               |
| company      | string | Your company name                   |
| service      | string | The service identifier              |

**Selfie Object**

| Field         | Type   | Description         |
| ------------- | ------ | ------------------- |
| age\_estimate | string | Estimated age range |

**Result Object**

| Field  | Type   | Description                           |
| ------ | ------ | ------------------------------------- |
| action | string | The action taken, either PASS or FAIL |
| detail | string | Details of the action                 |
| issues | array  | An array of issues if any             |

**Example Response**

```json
{
  "meta": {
    "confirmation": 160567642,
    "timestamp": "2023-11-07 13:23:55",
    "reference": "12345",
    "user": "root@veratad.com",
    "company": "Veratad Technologies, LLC",
    "service": "AgeMatch5.0.Estimate.ROC"
  },
  "output": {
    "images": {
      "selfie": {
        "age_estimate": "27-31"
      }
    }
  },
  "result": {
    "action": "PASS",
    "detail": "ALL CHECKS PASSED",
    "issues": []
  }
}
```


---

# 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://api.veratad.com/agematch/selfie-age-estimation.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.
