Real-time face analysis with age estimation, gender detection, facial landmark vectors, and head tracking. Integrate secure age-gating into your platform in minutes.
Live server health, model availability and performance metrics
Simple, token-secured HTTP endpoints for age verification. No SDK needed.
Submit an estimated age from the client-side face scanner. If age ≥ 18, the server issues a signed HMAC token valid for 8 hours.
| Parameter | Type | Description |
|---|---|---|
| estimatedAge | num | Age estimate from face-api.js |
| requestSecret | req | Must match AGE_JWT_SECRET in .env |
// Request POST /verify-age Content-Type: application/json { "estimatedAge": 24, "requestSecret": "your_secret" } // Response (success) { "success": true, "token": "1745000000.abc123...", "expiresAt": 1745000000, "message": "Age verified — access granted" }
Server-side token validation. Pass the token issued by /verify-age to confirm it's valid and unexpired. Ideal for PHP backend double-checks.
| Parameter | Type | Description |
|---|---|---|
| token | req | Token from /verify-age response |
// Request GET /validate-token?token=1745000000.abc... // Response { "valid": true } // If expired or invalid { "valid": false }
Health check endpoint. Returns server status, name and current timestamp. Useful for uptime monitors and load balancers.
// Response { "status": "ok", "server": "faceverifyapi.site", "uptime": 3600, "time": "2026-04-14T16:41:00.000Z", "models": "ready" }
Detailed server status including uptime, memory usage, model readiness and request counters.
// Response { "uptime": 3600, "memory": { "rss": "45 MB" }, "models": "ready", "requests": 142, "corsOrigin": "https://atdb.uno" }
6-phase verification using your camera — age, gender, face vectors and head tracking in real time.
Copy-paste ready code for popular languages and frameworks.
// 1. Load face-api.js and models const API_BASE = 'https://faceverifyapi.site'; await Promise.all([ faceapi.nets.tinyFaceDetector.loadFromUri(`${API_BASE}/models`), faceapi.nets.ageGenderNet.loadFromUri(`${API_BASE}/models`), faceapi.nets.faceLandmark68Net.loadFromUri(`${API_BASE}/models`), ]); // 2. Detect age from video element const detection = await faceapi .detectSingleFace(videoEl, new faceapi.TinyFaceDetectorOptions()) .withAgeAndGender() .withFaceLandmarks(); const age = Math.round(detection.age); // 3. Send to verify-age endpoint const res = await fetch(`${API_BASE}/verify-age`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ estimatedAge: age, requestSecret: 'YOUR_SECRET' }) }); const { success, token } = await res.json(); if (success) { // Store token and grant content access localStorage.setItem('age_token', token); }
// Validate token server-side in PHP <?php $token = $_COOKIE['age_token'] ?? ''; $apiBase = 'https://faceverifyapi.site'; $ch = curl_init("$apiBase/validate-token?token=" . urlencode($token)); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 5, ]); $response = json_decode(curl_exec($ch), true); curl_close($ch); if ($response['valid'] ?? false) { // Grant access to NSFW or age-restricted content show_restricted_content(); } else { // Redirect to age verification page header('Location: /age-verify'); } ?>
import requests API_BASE = 'https://faceverifyapi.site' # Submit age for verification def verify_age(estimated_age: int, secret: str): resp = requests.post(f'{API_BASE}/verify-age', json={ 'estimatedAge': estimated_age, 'requestSecret': secret, }, timeout=10) data = resp.json() if data.get('success'): return data['token'] raise ValueError(data.get('reason', 'Verification failed')) # Validate existing token def is_token_valid(token: str) -> bool: resp = requests.get(f'{API_BASE}/validate-token', params={'token': token}, timeout=5) return resp.json().get('valid', False)
# Health check curl https://faceverifyapi.site/health # Verify age curl -X POST https://faceverifyapi.site/verify-age \ -H "Content-Type: application/json" \ -d '{"estimatedAge":24,"requestSecret":"your_secret"}' # Validate token curl "https://faceverifyapi.site/validate-token?token=1745000000.abc123" # Detailed status curl https://faceverifyapi.site/status