Age Verification API for Age-restricted Platforms

A lightweight age-assurance signal from a single photo: one API call, an estimated age range per face as JSON, ready for the gating logic of alcohol, gambling, adult, and other age-restricted services.

Published 2026-05-21 · Updated 2026-10-26

An adult man's selfie in a frosted card on the left, linked by a beam of light through a glass gate whose gauge shows an age range above an 18+ threshold; beyond the gate the beam splits into a green check, an amber ID-card badge, and a violet stop badge.
A photo in, an age range out. Pixicular returns an age-estimation signal: a lightweight gate that sits in front of, not in place of, a regulated identity check.

TL;DR. To verify age from a photo with an API, send the image to Pixicular's image analysis API with the detect-age service. It returns an estimated age range per face as JSON: a lightweight age-assurance signal for passing clear adults, blocking clear minors, and escalating borderline cases to full KYC. It is not a regulated identity check.

What does the age verification API return?

A POST to /v1/detect (or to /v1/detect-from-url with a public image URL) with services=detect-age returns one JSON document. Under services["detect-age"] is a list of faces. Each face carries an ageRange with a low and high bound, an ageEstimate (the midpoint of that range), and a confidence percentage. That confidence is how sure the model is that the region is a face, not how sure it is of the age, so the range is the signal to gate on. Group photos return one entry per face; an empty list means no face was found.

{
  "success": true,
  "requestId": "req_Vb6Ny1QaT8sKe3LmZr",
  "services": {
    "detect-age": {
      "faces": [
        {
          "ageRange": { "low": 34, "high": 42 },
          "ageEstimate": 38,
          "confidence": 99.9
        }
      ]
    }
  },
  "photo": { "id": "photo_Pk2xD7wHc5RjUn9fGs", "status": "COMPLETED" },
  "creditCost": 1,
  "processingTimeMs": 1250,
  "processedAt": "2026-10-26T09:30:00.000Z"
}

The API returns a range rather than a single age because faces of the same age vary widely, so the signal to gate on is the edge of the band nearest your legal threshold, not the midpoint. The same request can include other services, such as detect-moderation on a profile photo; each service is billed as one operation.

Chart of three estimated age ranges against an age axis with a solid line at 18 labelled legal age and a dashed line at 21 labelled +3 margin: a range entirely above 21 is marked Pass, a range straddling 18 and 21 is marked Escalate, and a range entirely below 18 is marked Block.
Gate on the bound nearest the threshold. Ranges clear of the margin pass, ranges entirely below the legal age are blocked, and everything in between is escalated. Your service owns the policy; the API only supplies the range.

How accurate is age estimation from a photo?

Estimating age from a single still image is inherently approximate: people of the same age look very different, and lifestyle, lighting, and make-up all shift the result. Clear, well-lit, front-facing photos of a single subject give the most reliable ranges. Pixicular does not publish an accuracy figure for age estimation, so validate the ranges on photos that look like your own traffic before you set thresholds.

Several factors degrade accuracy: low resolution, motion blur, harsh or low light, extreme head pose, partial occlusion (sunglasses, masks, hair), heavy beautification filters, and faces that are very small in the frame. Near a legal threshold, widen your decision margin: a range that straddles the boundary is "uncertain" and should be escalated, not forced into a pass or block on a noisy midpoint.

For how the estimate is produced and what the response looks like on its own, see the dedicated age detection API page.

How does this compare to full KYC age verification?

Photo age estimation and document-based KYC sit at opposite ends of an age-assurance spectrum. Estimation is fast and low-friction: it works from a selfie, never asks for an ID, and returns a probabilistic range, not a verified date of birth. Document KYC captures, parses, and cross-checks a passport, driving licence, or national ID, often with a liveness check. It produces audit-grade evidence but is slower, costs more per check, and adds friction to onboarding.

Many regulated platforms run both as a layered stack. Estimation handles the clear cases (clear adults pass, clear minors are blocked) and only the ambiguous ranges are escalated to ID verification. That keeps cost and friction down for most legitimate users while still putting a strong check on the cases that carry regulatory risk. For the document side, see ID document OCR for KYC; this page covers the lightweight first layer.

Two-layer age-assurance stack: a stream of users enters an Age estimation layer (selfie, age range) and most leave as Clear cases decided; a narrow borderline only stream drops to a Document check layer (verified date of birth) showing a fictional ID card stamped SPECIMEN.
Lightweight age signal first, full KYC second. Estimation decides the clear cases; only borderline ranges go on to document verification.

How do you set a gating threshold near the legal age?

The simplest defensible policy is a three-band decision against the range, not a single cutoff:

  • Pass: the lower bound is at least the legal age plus a safety margin (for example 3 years). Clearly adult users get through without any further step.
  • Block: the upper bound is below the legal age, so the whole range is under age. Offer an ID check as the appeal route for adults who look young.
  • Escalate: everything else, including no face detected, several faces in a selfie, and any range that straddles the threshold or its margin. Route these to document verification or human review.
interface AgeFace {
  ageRange: { low: number; high: number };
  ageEstimate: number;
  confidence: number;
}

type AgeGate = "pass" | "block" | "escalate" | "retry_later";

// Three-band gate on a single-person selfie.
async function ageGate(selfie: Blob, legalAge: number): Promise<AgeGate> {
  const body = new FormData();
  body.append("file", selfie);
  body.append("services", "detect-age");

  const res = await fetch("https://api.pixicular.com/v1/detect", {
    method: "POST",
    headers: { Authorization: `Bearer ${process.env.PIXICULAR_API_KEY}` },
    body,
  });
  // 202 means the request was queued under load: poll its statusUrl (see the docs).
  if (res.status === 202) return "retry_later";
  if (!res.ok) throw new Error(`Pixicular returned ${res.status}`);
  const result = await res.json();

  const faces: AgeFace[] = result.services["detect-age"]?.faces ?? [];
  // No face, or several people in a selfie: ask for a new photo or escalate.
  if (faces.length !== 1) return "escalate";

  const { low, high } = faces[0].ageRange;
  const PASS_MARGIN = 3; // years above the legal age: your policy

  if (low >= legalAge + PASS_MARGIN) return "pass";
  if (high < legalAge) return "block";
  return "escalate";
}

The legal age and the margin are policy you own, not the API's. A regulated gambling operator may want a wider margin; a vape retailer may accept a narrower one because the escalation path is cheap. Log the decision and the rationale (range, policy version) but not the raw image.

Where does a lightweight age signal actually fit?

The signal fits flows that need a quick age screen at the top of the funnel and a stronger check only where warranted:

SectorTypical policyWhere the age signal fits
Online alcohol retailBuyer must be 18+ (UK), 21+ (US)Pre-checkout age screen; escalate borderline buyers to an ID check at checkout or delivery
Regulated online gamblingVerified date of birth required by licencePre-funnel filter to discourage under-age sign-up; full KYC still mandatory
Adult content platformsAge assurance required under the UK OSA and age-verification laws in several US statesFirst-layer screen only where the rules allow estimation; pair with document or third-party verification
Vape, knife, and other restricted retailAge limits vary by jurisdictionReduce friction for clearly adult buyers; route borderline buyers to an ID check
Dating and adult socialPlatform policy and OSA / DSA child-safety obligationsFlag likely-underage profile photos alongside content moderation

What do UK OSA and EU DSA require for age assurance?

The UK's Online Safety Act (OSA) requires services that publish or allow pornography, and certain other content harmful to children, to use "highly effective" age assurance so that children cannot normally encounter it. Ofcom's guidance lists methods that can meet that bar, including facial age estimation, photo-ID matching, open banking, mobile network operator checks, credit card checks, and digital identity services, and expects any method to be technically accurate, robust, reliable, and fair.

The EU's Digital Services Act (DSA) does not prescribe a single technique. Article 28 requires online platforms accessible to minors to put in place "appropriate and proportionate" measures to ensure a high level of privacy, safety, and security of minors. The Commission's 2025 guidelines on Article 28 discuss both age verification and age estimation and tie the choice to risk: for high-risk services such as pornography or gambling they point to age verification rather than estimation. The Commission has also piloted an EU age-verification app.

The practical takeaway: photo age estimation is one ingredient in an age-assurance stack, and Pixicular does not claim that it meets Ofcom's "highly effective" standard or any certification. Use it as a first layer for the clear cases, and a stronger method (document-based KYC or a third-party age-verification provider) near the threshold and wherever regulators expect verified evidence. This page is not legal advice; confirm your obligations with counsel and the relevant regulator.

Privacy, GDPR, and data minimisation

Analysing a face to estimate age is commonly treated as biometric processing under the GDPR and similar regimes, which means a lawful basis, in many cases explicit consent, a clear privacy notice, a data protection impact assessment, and a retention policy that matches the purpose. The defensible pattern is data minimisation: send the photo, read the age range, make the decision, and keep only the decision and a coarse age bucket against the user record, not the raw photo or a precise predicted age. On Pixicular's side, the privacy policy sets retention at 30 days after analysis for uploaded images (or as configured by the user) and the life of the account plus 90 days for detection results.

For child-directed flows (COPPA in the US, which covers under-13s, and the GDPR's age-of-consent provisions for information society services, commonly 16 and lowered to as low as 13 by some member states) estimation is best used as a trigger that routes a likely under-threshold user into a parental-consent or restricted-experience flow, not as a silent block. Confirm the technical details in the API documentation and your obligations with your own counsel before deploying age gating in a regulated jurisdiction.

Frequently asked questions

How do you verify age from a photo with an API?

POST the photo to https://api.pixicular.com/v1/detect with services=detect-age. The API locates each face and returns an estimated age range (a low and a high bound), an age estimate, and a face-detection confidence for each face, as JSON in a single call. Your application compares the range with its own threshold. This is an age-estimation signal, not a regulated identity check: pair it with document-based verification where the law requires verified identity.

How accurate is age estimation from a photo?

Age estimation from a single photo is an estimate, which is why the API returns a range instead of one number. Pixicular does not publish an accuracy figure for age estimation, so test it on photos like your own traffic. Clear, well-lit, front-facing photos give the most reliable ranges; low light, blur, sunglasses or masks, heavy filters, and very small faces make them less reliable. Near a legal threshold, add a safety margin and escalate borderline ranges.

Is photo age estimation GDPR-safe? Is it biometric data?

Analysing a face to estimate age processes personal data and is commonly treated as biometric processing under the GDPR and similar regimes. You need a lawful basis, often explicit consent, a data protection impact assessment, clear notice to users, and a tight retention policy. Per the Pixicular privacy policy, uploaded images are retained for 30 days after analysis and detection results for the life of the account plus 90 days. On your side, store only the decision and a coarse age bucket, not the photo or an exact age tied to a user.

Can I use this instead of full KYC for age-restricted services?

Not as a drop-in replacement. Pixicular returns an age estimate, which is a useful age-assurance signal but not a verified identity. Where law or licence terms require a verified date of birth, for example regulated online gambling, you still need ID-document or database verification for the cases that matter. Estimation works best as a first layer that passes clear adults, blocks clear minors, and routes only borderline cases to full verification, which lowers friction and cost.

What gating threshold should I use near the legal age?

Decide against the bound of the range nearest your threshold, not the midpoint. A common pattern: pass when the lower bound is at least the legal age plus a margin (for example 3 years), block when the upper bound is below the legal age, and escalate everything in between, plus selfies with no face or several faces, to ID verification or human review. Tune the margin to your risk appetite, document it, and log the decision and policy version rather than the raw image.

Add a lightweight age signal to your gating flow

The fastest way to evaluate Pixicular for age assurance is to point a real request at the API with a real photo. Pick a plan on the pricing page, read the API documentation for authentication and response schema, and pair the signal with ID document OCR for KYC where verified identity is required.