BrandKwikID Documentation
API SuiteFace & Biometrics (ML)

Facial Analysis

Estimate age and gender from a face image. Multipart POST /facial_analysis with file (JPEG or PNG) and optional unique_id.

API reference

Try itLoading playground…
Loading…
AuthorizationBearer <token>

JWT Bearer token authentication. Obtain a token from the KwikID dashboard.

In: header

filestring
unique_id?string

Optional correlation id for logs.

Response Body

curl -X POST "https://__mock__/facial_analysis" \  -F file="string"
{
  "age": 0,
  "dominant_gender": "string",
  "gender_score": {
    "Man": 0,
    "Women": 0
  }
}
{
  "msg": "string"
}
{
  "detail": {},
  "message": "string"
}

Overview

Call POST /facial_analysis with Authorization: Bearer <token> and multipart/form-data. Required: file (face image, JPEG or PNG). Optional: unique_id.

Key features

  • Demographics signal: Returns age, dominant_gender, and gender_score for UX or risk scoring when permitted by policy.

Implementation

Step 1: Prepare the image

Use a clear frontal face; follow your regulator and privacy rules before collecting or inferring demographics.

Step 2: Call from your backend

POST /facial_analysis HTTP/1.1
Host: <machine-learning-api-base-url>
Authorization: Bearer <token>
Content-Type: multipart/form-data; boundary=----boundary

Attach file as the image part.

Error handling

HTTP statusWhen
400Invalid image or analysis failure.
401Invalid token.

Benefits

  • Adds lightweight attributes without a separate liveness or match call.

Next steps