{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bynn-com/json-schema/bynn-com-bynn-v1-entities-age-verification-result-schema.json",
  "title": "Bynn_V1_Entities_AgeVerificationResult",
  "description": "Bynn_V1_Entities_AgeVerificationResult model",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bynn-com-openapi.json#/components/schemas/Bynn_V1_Entities_AgeVerificationResult",
  "type": "object",
  "properties": {
    "unique_id": {
      "type": "string",
      "description": "Unique identifier for the user in your system so you can identify the user in a webhook callback. Can be email or uuid"
    },
    "is_adult": {
      "type": "boolean",
      "description": "Verification result indicating whether the detected face belongs to an adult based on the estimated age range. This is a prediction and may not match the person’s actual age."
    },
    "verification_status": {
      "type": "string",
      "enum": [
        "pass",
        "underage",
        "unknown",
        "pending",
        "error"
      ],
      "description": "Verification result indicating whether the detected face passed the given model in age verification threshold."
    },
    "age_verification_model": {
      "type": "string",
      "enum": [
        "age_verification_21_years",
        "age_verification_20_years",
        "age_verification_19_years",
        "age_verification_18_years",
        "age_verification_17_years",
        "age_verification_16_years",
        "age_verification_15_years",
        "age_verification_14_years",
        "age_verification_13_years",
        "age_verification_12_years"
      ],
      "description": "The AI-powered age verification model used, trained to estimate whether a person meets or exceeds the specified age threshold."
    },
    "confidence": {
      "type": "string",
      "enum": [
        "high",
        "moderate",
        "low"
      ],
      "description": "Confidence level indicating how certain the system is about the age verification result."
    },
    "age_range": {
      "allOf": [
        {
          "$ref": "#/$defs/Bynn_V1_Entities_AgeRange"
        }
      ],
      "description": "Estimated age range of the person in the image. This is a prediction and may not match the person’s actual age."
    },
    "age_estimated": {
      "type": "integer",
      "format": "int32",
      "description": "Estimated age of person. This is a prediction and may not match the person’s actual age."
    },
    "face": {
      "allOf": [
        {
          "$ref": "#/$defs/Bynn_V1_Entities_Face"
        }
      ],
      "description": "Detected face information and attributes"
    },
    "liveness": {
      "allOf": [
        {
          "$ref": "#/$defs/Bynn_V1_Entities_Liveness"
        }
      ],
      "description": "Liveness attributes"
    },
    "image_saved": {
      "type": "boolean",
      "description": "Indicates whether the image was saved for further validation"
    },
    "biometrics_saved": {
      "type": "boolean",
      "description": "Indicates whether the biometrics was saved for further validation"
    },
    "evaluated_at": {
      "type": "string",
      "description": "Timestamp of when the entity was last evaluated."
    },
    "data_destroyed_at": {
      "type": "string",
      "description": "Timestamp of when the data is (or will be) destroyed."
    }
  },
  "required": [
    "unique_id",
    "is_adult",
    "verification_status",
    "age_verification_model",
    "confidence",
    "age_range",
    "age_estimated",
    "face",
    "liveness",
    "image_saved",
    "biometrics_saved",
    "evaluated_at",
    "data_destroyed_at"
  ],
  "$defs": {
    "Bynn_V1_Entities_AgeRange": {
      "type": "object",
      "properties": {
        "high": {
          "type": "integer",
          "format": "int32",
          "description": "Upper bound of the estimated age range"
        },
        "low": {
          "type": "integer",
          "format": "int32",
          "description": "Lower bound of the estimated age range"
        }
      },
      "required": [
        "high",
        "low"
      ]
    },
    "Bynn_V1_Entities_BoundingBox": {
      "type": "object",
      "properties": {
        "height": {
          "type": "number",
          "format": "float",
          "description": "Height of the bounding box as a ratio of the overall image height"
        },
        "left": {
          "type": "number",
          "format": "float",
          "description": "Left coordinate of the bounding box as a ratio of overall image width"
        },
        "top": {
          "type": "number",
          "format": "float",
          "description": "Top coordinate of the bounding box as a ratio of overall image height"
        },
        "width": {
          "type": "number",
          "format": "float",
          "description": "Width of the bounding box as a ratio of the overall image width"
        }
      },
      "required": [
        "height",
        "left",
        "top",
        "width"
      ]
    },
    "Bynn_V1_Entities_Face": {
      "type": "object",
      "properties": {
        "bounding_box": {
          "allOf": [
            {
              "$ref": "#/$defs/Bynn_V1_Entities_BoundingBox"
            }
          ],
          "description": "The bounding box of the face in the image"
        },
        "glasses": {
          "type": "boolean",
          "description": "Indicates whether the person is wearing sunglasses or eyeglasses"
        },
        "predicted_gender": {
          "type": "string",
          "enum": [
            "male",
            "female",
            "undetermined"
          ],
          "description": "Automated guess of a person’s gender based on facial analysis. This is a prediction and may not match the person’s actual gender."
        }
      },
      "required": [
        "bounding_box",
        "glasses",
        "predicted_gender"
      ]
    },
    "Bynn_V1_Entities_Liveness": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "verified",
            "not_verified",
            "not_evaluated"
          ],
          "description": "Indicates whether its a verified real human in front of the camera"
        },
        "confidence": {
          "type": "number",
          "format": "float",
          "description": "Indicates confidence in whether its a verified real human in front of the camera. Normally around 50 is good enough for most applications. To protect against highly sofisticated deepfake or injection attacks this should be over 80-90"
        }
      },
      "required": [
        "status",
        "confidence"
      ]
    }
  }
}