> ## Documentation Index
> Fetch the complete documentation index at: https://developer.verilock.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Age Verification

> AI-powered age estimation from selfie images for age-gating and compliance.

Verify a person's age using facial analysis. Returns an estimated age range with confidence. No session required — standalone endpoint.

## Parameters

<ParamField body="file" type="file" required>
  Selfie image file. Accepted: `jpg`, `jpeg`, `png`. Max: 10 MB.
</ParamField>

<ParamField body="min_age" type="integer" required>
  Minimum required age (1–120). The person must appear at least this old to pass.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST \
    "https://verilock.io/api/v1/age-verify" \
    -H "Authorization: Bearer qi_live_your_api_key_here" \
    -F "file=@selfie.jpg" \
    -F "min_age=18"
  ```

  ```php PHP (Guzzle) theme={null}
  $client = new \GuzzleHttp\Client();
  $response = $client->post(
    'https://verilock.io/api/v1/age-verify',
    [
      'headers' => [
        'Authorization' => 'Bearer qi_live_your_api_key_here',
      ],
      'multipart' => [
        ['name' => 'file', 'contents' => fopen('selfie.jpg', 'r')],
        ['name' => 'min_age', 'contents' => '18'],
      ],
    ]
  );
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://verilock.io/api/v1/age-verify",
      headers={"Authorization": "Bearer qi_live_your_api_key_here"},
      files={"file": open("selfie.jpg", "rb")},
      data={"min_age": 18},
  )
  ```
</RequestExample>

<ResponseExample>
  ```json 200 Verified theme={null}
  {
    "verified": true,
    "estimated_age_low": 24,
    "estimated_age_high": 32,
    "min_age_required": 18,
    "confidence": 99.2
  }
  ```

  ```json 200 Not Verified theme={null}
  {
    "verified": false,
    "estimated_age_low": 14,
    "estimated_age_high": 17,
    "min_age_required": 18,
    "confidence": 97.8
  }
  ```

  ```json 200 No Face theme={null}
  {
    "verified": false,
    "reason": "no_face_detected"
  }
  ```
</ResponseExample>

## Age in Sessions

When a selfie is uploaded to a KYC session, age estimation is extracted automatically. Results appear in the session selfie data:

```json theme={null}
{
  "selfies": [{
    "face_match_score": 96.45,
    "liveness_score": 88.30,
    "estimated_age_low": 32,
    "estimated_age_high": 38
  }]
}
```

<Info>
  If a `min_age` threshold is configured in your verification profile, sessions where the estimated maximum age is below the threshold are automatically **declined**.
</Info>
