Privacy-Preserving Age Verification with Zero-Knowledge Proofs
Compare $0.10 selfie age checks with signed wallet attributes, then learn how a separate zero-knowledge proof can establish an age threshold without revealing a birth date.

Contents
In this guide
Jump to the part you need.
This guide is for teams that must keep under-18s out of a product, or admit people who are 18 or older, without storing a date of birth or a passport scan. Standalone selfie age estimation costs $0.10 per live HTTP 200 response and includes passive liveness. The caveat comes first: the Didit integrations documented here are selfie age estimation and signed wallet-attribute verification. The zero-knowledge proof design below requires a separate implementation.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
| Route | What it reveals to you | List price | Availability |
|---|---|---|---|
| Selfie age estimation, passive liveness included | A predicted age and a liveness score. No document, no date of birth. Nothing is stored when save_api_request is false. | $0.10 per check | Available |
| ID document verification | Processes an identity document and may disclose personal data. Confirm that the result includes the date of birth before relying on it for an age decision. | $0.15 per check | Available |
| Google Wallet ID | Signed attributes the wallet releases, checked against the issuer signature and the device signature when the response arrives | $0.10 per completed verification | Available in the United States, United Kingdom, Brazil, Singapore and Taiwan |
| EUDI Wallet | Attributes released by a national wallet | $0.15 per completed verification, rate published | Coming soon, no launch date promised |
| Zero-knowledge proof of age | The proof can establish that the holder meets the minimum age without revealing the date of birth. The verifier still sees the public inputs and may see request metadata. | No published Didit price in the supplied sources | Separate implementation |
Start free in the sandbox at business.didit.me, no sales call. Developers who want an assistant to wire the call can connect Didit to an AI assistant through the Didit MCP server. The product itself is described on the Age Estimation product page. The Age Estimation documentation sits at Age Estimation, the endpoint contract at the Age Estimation API reference, and live prices at the pricing page.
What a privacy-preserving age check has to do
An age gate needs four things. First, the check answers one predicate: does this person meet the minimum age, yes or no. Second, it does not create a store of birth dates that turns into a liability the day you are breached. Third, it resists spoofing, or the predicate is worthless. Fourth, you can show an auditor why a decision was made.
A correctly designed zero-knowledge proof can establish eligibility without disclosing the credential's date of birth. The user's wallet holds a credential signed by an issuer and emits a proof that the credential's date of birth is on or before the eligibility cutoff. The proof can establish that the holder meets the minimum age without revealing the date of birth. The verifier still sees the public inputs and may see request metadata. The constraint is supply, not the cryptography: a proof needs a credential that your verifier trusts. Check whether the issuer, credential and wallet support the predicate you need. A wallet that releases a signed birth date may support age calculation but still disclose the birth date.
So we split the problem in two. Where a signed credential exists, use it and take only the attribute you need. Where it does not, use a check that never collects the birth date in the first place. Age estimation from a selfie does that: the model predicts an age from a face, returns a float and a liveness score, and when you set save_api_request to false there is no stored image and no persisted session to look up later.
Age zk in one paragraph
Age zk, or zero-knowledge age verification, is the specific case where a user proves a comparison rather than a fact. The proof condition is that the credential's date of birth is on or before the eligibility cutoff, and it is proved against a credential the user already holds, without the verifier seeing the credential, the date, the name or the document number. Zero knowledge hides credential fields used as private inputs, beyond what the public inputs and the proven statement reveal. A verifier can separately ask the user to disclose more. The practical difficulty is issuer trust: a proof is only as good as the signature under it, so a verifier keeps a list of accepted issuers and rejects proofs from anyone else.
Three routes, and the evidence each one gives your verifier
| Route | Evidence your verifier gets | What it reveals |
|---|---|---|
| Model-estimated age from a selfie | A model-predicted age, a passive liveness score and a decision status | A face image is processed. The predicted age and the liveness score come back. No date of birth and no document, unless you also run a document check. |
| Issuer-signed age attribute from a wallet | Authenticated, issuer-signed attributes returned by the wallet | Whatever attributes the wallet releases. A wallet that releases a signed birth date may support age calculation but still disclose the birth date. Inspect which verified attributes were returned. |
| Proof of a hidden age predicate | A proof against a credential from an issuer your verifier accepts, bound to your verifier and to a fresh challenge | The proof can establish that the holder meets the minimum age without revealing the date of birth. The verifier still sees the public inputs and may see request metadata. |
Prerequisites
- A Didit application and an API key from the Business Console. Sandbox keys are free and never charge credit.
- A decision on the threshold, 18 or 21, and a written retention rule for what you keep after the check.
- Selfies in
tiff,jpg,jpeg,pngorwebp, maximum 5 MB. PDFs are not accepted. - Credit on the organization if you call a live application. A live 200 response consumes one Age Estimation credit.
- For redirect wallets that use an HTTPS return URL, a return hostname registered on your application before you start a verification.
How to run a privacy-preserving age check, step by step
Write the predicate and the retention rule before you write code. Record the threshold, then decide which decision data your service needs to keep. For a live standalone call with
save_api_requestset tofalse, Didit does not persist the call. Therequest_idis a correlation ID, not a retrievable session ID. Define which decision data your service needs to retain, and apply that policy to your logs and storage.Create the application and copy the sandbox key. Sandbox keys skip processing and billing: after request validation, the endpoint returns a static
Approvedpayload with an age of 30 and no warnings, and no session is written.Pick the integration shape. Mode A embeds Age Estimation inside the Liveness step of a workflow, enabled on the Liveness node in the Business Console, and you create the session with
POST /v3/session/. Mode B is the standalonePOST /v3/age-estimation/call for when your server already holds a selfie. This guide uses the standalone call because it is the shortest path.Send the selfie with the privacy-preserving request.
save_api_requestisfalsehere, so nothing is stored and no webhook fires:curl -X POST 'https://verification.didit.me/v3/age-estimation/' \ -H 'x-api-key: YOUR_API_KEY' \ -F 'user_image=@./selfie.jpg' \ -F 'age_estimation_decline_threshold=18' \ -F 'save_api_request=false'Know what the default does.
save_api_requestdefaults totrue, which persists the call as an API-type session: it appears in the Business Console, the returnedrequest_idis a real session id you can pass toGET /v3/session/{sessionId}/decision/, the face crop and reference image are stored, the face embedding is added to your application's face index, and astatus.updatedwebhook is emitted. Keep the flag atfalseonly if you can work without the console record and the webhook, and retain only the decision data your policy requires.Read the decision server side, never in the browser.
statusisApprovedonly when thewarningsarray is empty, so treat any warning as a decline. In Mode A the same result lives atliveness_checks[].age_estimationon the Liveness entry, fetched fromGET /v3/session/{sessionId}/decision/, not from a top-level array.Route the borderline cases to a second method. The docs say that borderline ages near your threshold deserve a fallback to document-based verification, because the model error grows for faces close to the limit. A buffer of a year or two is a policy example, not a documented bound: calibrate it against representative live evaluations, because the published mean absolute errors are aggregate metrics, not individual error bounds. A legitimate user whose estimate lands just below the cutoff should go to the fallback, not to an automatic final denial. Inside that buffer, ID document verification costs $0.15. If Google Wallet is supported for the user, it costs $0.10 per completed verification. Grant access only if the final wallet result includes the verified attribute required by your age policy.
Store less. When you do keep a persisted session, the Delete Session API removes the session and its data, and by default the face embedding goes with it. That API applies to persisted sessions: with
save_api_requestset tofalsethere is no session to delete, and what you hold is only what your own service wrote down.


Expected output
The excerpt below shows only the documented sandbox values for status, predicted age and warnings, nested under the age estimation object. It is not a measured result.
{
"age_estimation": {
"status": "Approved",
"age_estimation": 30,
"warnings": []
}
}
In sandbox the call returns a mock Approved with an age of 30 and no warnings, so do not tune thresholds against sandbox numbers. status and warnings are nested under the age_estimation object.
| Field | Direction | What it does |
|---|---|---|
user_image | Input, required | The selfie. jpg, jpeg, png, tiff or webp, maximum 5 MB, no PDF. The largest face in the frame drives the estimate. |
age_estimation_decline_threshold | Input | The minimum age you accept. Default 18. A predicted age below it adds AGE_BELOW_MINIMUM. |
face_liveness_score_decline_threshold | Input | The liveness floor. Default 30. A score at or below it adds LOW_LIVENESS_SCORE. |
rotate_image | Input | Set it when captures may be sideways or upside down. |
save_api_request | Input | Default true, which persists the call as an API-type session. Set false for a call that nothing is stored for. |
vendor_data | Input | Optional reference supplied with the request. |
request_id | Output | The session id when the call is persisted, a one-off correlation id when it is not. |
age_estimation.status | Output | Approved or Declined for a standalone age call. The call approves only when warnings is empty. |
age_estimation.warnings[] | Output | Risk codes. Any entry means the call is not approved. |
Failure cases and recovery
| Signal | Meaning | Recovery |
|---|---|---|
| HTTP 400 | Missing or oversized user_image, or an unsupported extension | Fix the file before retrying: re-encode as jpg or png under 5 MB. |
| HTTP 403 | Out of credits, or a bad key | Top up the organization, or check the key. The 403 for balance arrives before any image processing. |
| HTTP 429 | Over the shared write budget of 300 requests per minute per key | Back off and retry. Do not fan out retries. |
AGE_BELOW_MINIMUM | The predicted age is under your threshold | The API declined this estimate. That is not necessarily a final denial of access. Send the user to the fallback your policy defines, such as an ID document check at $0.15 or, where supported, Google Wallet at $0.10, and keep the appeal path outside the retry loop. |
AGE_NOT_DETECTED | The model could not extract an age, usually a poor image | Ask for a retake with better light and a front-facing pose. |
NO_FACE_DETECTED | No face found by the liveness model | Retake, and check for a cropped or covered face. |
MULTIPLE_FACES_DETECTED | More than one face in the frame | Ask the user to be alone in the frame. |
LOW_LIVENESS_SCORE | The passive liveness score fell at or below the configured floor, default 30 | Reject. Do not let a retake loop act as a bypass. |
LIVENESS_FACE_ATTACK | The liveness model flagged a presentation attack, such as a photo of a photo, a screen or a mask | Reject, and log the signal for fraud review. |
The full risk catalogue is on the Age Estimation warnings page, and the per-feature report shape is on the report page.

A stronger claim without a document: digital ID wallets
When the person holds a national eID or a bank identity, the wallet route gives you a signed attribute set without a document scan. Your backend starts a verification on that wallet's endpoint, Didit returns the action the person must take, your interface opens the authentication page or shows the approval instructions, and your backend reads the result. For Digital Credentials wallets such as Google Wallet, the start response carries next_action.type = request_digital_credential and the browser runs navigator.credentials.get. Send the wallet's unchanged protocol and data values inside the documented response object. Submit it from your backend with the application API key that started the verification. Didit checks the issuer signature against its trusted issuer roots, every returned value against its signed digest, and the device signature over your origin and this request, then decides.
Two rules matter here. Treat a pending response as pending, because authentication is asynchronous and a successful start does not mean a verified identity. Then only accept the identity when wallet_verification.outcome is verified and simulated is false. Google Wallet ID costs $0.10 per completed verification and is available in the United States, United Kingdom, Brazil, Singapore and Taiwan. The EUDI Wallet rate is published at $0.15 but the wallet is coming soon, and we do not promise a launch date. For redirect wallets, register your return hostname on PATCH /v3/webhook/ before the first redirect. Google Wallet uses its documented Digital Credentials request and response flow. Setup details are in the digital ID wallet documentation and the wallet API reference.
Where zero-knowledge proofs fit, and where they do not
Zero-knowledge age verification has no published Didit price in the supplied sources, and we do not quote one. What we ship is close in intent and different in mechanism: a selfie check that never collects a date of birth, and wallet checks that consume issuer-signed attributes instead of documents.
Setup assumptions, proof size and verification cost depend on the scheme. For an age gate, first check whether the wallet can prove your exact age predicate against a credential from an issuer you trust.
The architecture is three roles, and this route is a separate implementation from the Didit calls in this guide. An issuer signs a credential that contains a date of birth. The user's wallet holds it and generates the proof locally. Your service verifies the proof. The private inputs are the credential, its signature, the date of birth and the holder key. The verifier sends its identifier, the policy cutoff, the verification time and a fresh, expiring challenge. The wallet proves that a credential signed by an issuer under a trusted root contains a birth date on or before the cutoff and a signed validity window that covers the verification time. For a holder-bound credential, the proof also demonstrates control of the key or secret bound to that credential. Bind the proof to the verifier identifier and challenge. Verify the proof against the expected inputs, check revocation through the credential scheme's status mechanism and atomically consume the unexpired challenge before granting access. Zero knowledge protects the private inputs beyond what the statement and the public inputs reveal, so bind the proof to your verifier and to the fresh challenge, or a captured proof can be replayed.
A verifier checklist for the proof route:
- Issuer trust: does your verifier hold a trusted root for the issuer that signed the credential?
- The exact eligibility cutoff: is the predicate the credential's date of birth is on or before the cutoff the one your policy and jurisdiction actually require?
- Holder binding: where the credential supports holder binding, does the presenter control the key or secret bound to it?
- Request binding: does the proof bind to your verifier identifier and to a fresh, unexpired challenge, and do you consume that challenge on acceptance and reject reuse even if the proof bytes differ?
- Credential validity: is the credential inside its validity window and not revoked?
- Replay rejection: do you reject a proof you have already accepted?
| Case | Private test setup | What the verifier sees | Result |
|---|---|---|---|
| Birthday boundary under the example policy | The credential's date of birth falls exactly on the eligibility cutoff date in the example policy | The verifier receives the public cutoff, the challenge and a valid proof | Pass under the example's inclusive cutoff rule. A strict earlier-than comparison would fail this person on their 18th birthday. |
| Replayed proof | The same proof is presented without the fresh challenge your verifier issued | The verifier receives a proof that does not bind to the current challenge, or a challenge already consumed | Fail. Reject it. Zero knowledge on its own supplies no replay protection. |
| Unsupported issuer | The credential is signed by an issuer outside your trusted roots | The proof verifies against a credential from an issuer your verifier does not accept | Fail. A valid proof under an untrusted issuer establishes nothing for your policy. |
Use selfie estimation for routing where your age-assurance requirements permit it. If your policy requires proof from a verified credential or document, obtain that evidence before granting access. Send borderline estimates to an approved fallback. The Sessions API supports hosted wallet verification with configured document fallback. Hosted selfie age estimation is configured on a Liveness step.
Worked cost example
Take 100,000 age gates a month and a policy that sends every borderline face to a document check. Assume 6 percent of users land in the borderline band. That figure is an assumption for this example, not a measured rate.
- Selfie age estimation: 100,000 x $0.10 = $10,000.00
- Document fallback: 6,000 x $0.15 = $900.00
- Total at list price: $10,900.00 per month
- On the Scale plan, with 10 percent off every Didit price: 100,000 x $0.09 = $9,000.00, plus 6,000 x $0.135 = $810.00, so $9,810.00 in monthly usage at Scale rates before any included plan credit and before the plan fee
Now a wallet-first mix on the same volume. Assume 40 percent of the 100,000 complete a Google Wallet verification at $0.10 and the rest take selfie age estimation, with the same 6 percent document fallback applied to the selfie group. Both assumptions are for the example only; use your own share from live traffic.
- Wallet verifications: 40,000 x $0.10 = $4,000.00
- Selfie age estimation: 60,000 x $0.10 = $6,000.00
- Document fallback: 3,600 x $0.15 = $540.00
- Total at list price: $10,540.00 per month
- On Scale: 40,000 x $0.09 = $3,600.00, plus 60,000 x $0.09 = $5,400.00, plus 3,600 x $0.135 = $486.00, so $9,486.00 in monthly usage at Scale rates before any included plan credit and before the plan fee
The wallet route only comes out lower per decision when wallet coverage in your market keeps the fallback volume down. Google Wallet and selfie age estimation share the same $0.10 list price, so the saving comes from fewer alternates, not from the wallet unit price.
Test matrix: what the sandbox proves and what needs a live key
| Test | Sandbox | Live application |
|---|---|---|
| Near-threshold estimate | No. Sandbox returns a static Approved mock with an age of 30 and no warnings. | Yes. Run representative faces around your threshold and calibrate your buffer from those results. |
| Poor image quality | Only request validation. Malformed input still returns 400. | Yes. Watch for AGE_NOT_DETECTED and NO_FACE_DETECTED and confirm your retake copy works. |
| Insufficient credit | No. Sandbox skips billing entirely. | Yes. A 403 arrives before any image processing, so test it on a live key with a low balance. |
| Wallet result missing the required age attribute | No. Sandbox wallet results carry simulated: true; only a real check reports simulated: false. | Yes. Inspect the returned attributes and confirm your policy handles a verified identity that carries no age attribute. |
Paid steps and review boundaries
Every live 200 response on the age estimation endpoint consumes one credit at $0.10. Sandbox calls consume nothing and store nothing. A 403 for balance is returned before any image processing. Persisting a call through save_api_request costs the same as not persisting it; the field changes storage, not price.
Human review is a separate decision you own. Define how users can challenge an estimate and which alternate verification method you will accept. The cost example counts only the automated checks and document fallbacks shown. For a regulated product, write the escalation rule down, including what happens when a user claims the model got their age wrong, and keep the appeal path outside the automated loop so a retry cannot be used to force a pass.
We serve 4,000+ companies. Didit supports verification across 220+ countries and territories. We have a SOC 2 Type 2 report and ISO/IEC 27001:2022 certification. Didit's Age Estimation documentation reports a mean absolute error of 1.1 years at ages 16 and 17 and 1.9 years at ages 18 to 20. The same documentation reports 96 percent aggregate accuracy for under-18 versus 18-and-over classification. Those are aggregate model metrics, not an error bound for any single person.
Sources
- Didit Age Estimation product page
- Didit docs: Age Estimation overview
- Didit docs: Age Estimation API
- Didit docs: Age Estimation warnings
- Didit docs: Age Estimation report
- Didit docs: canonical data models
- Didit docs: Create Session API
- Didit docs: Delete Session API
- Didit docs: digital ID wallet verification
- Didit docs: digital ID wallet APIs
- Didit docs: submit a Digital Credentials wallet response
- Didit docs: integration prompt
- Didit docs: pricing and billing rules
- Didit pricing page and pricing as JSON, read November 26, 2026
- Didit MCP server
- Regulation (EU) 2016/679, GDPR
Next step: create a free sandbox application at business.didit.me, validate the request and response handling against the sandbox mock, then wire a live key for production. No sales call required.
Try it
Try this in the sandbox
Run the check this guide describes, free.
The product this post is about, taken from its topic. Run it free in the sandbox.
Author
Alberto Rosas
Co-founder and CEO

Questions
Frequently asked questions
What is age zk?
Age zk means proving an age condition, such as being 18 or older, in zero knowledge, so the verifier learns only whether the condition is true. The prover holds a credential with a date of birth and proves that the date is on or before the eligibility cutoff. The proof hides the date of birth, but the verifier still sees the public inputs and may see request metadata.
Can Didit run a zero-knowledge age verification today?
The Didit integrations documented here are selfie age estimation and signed wallet-attribute verification. The zero-knowledge proof design in this guide requires a separate implementation, and no published Didit price for it appears in the supplied sources. Selfie age estimation costs $0.10 per live HTTP 200 response with passive liveness included.
How much does a privacy-preserving age check cost?
Standalone selfie age estimation costs $0.10 per live HTTP 200 response and includes passive liveness. A Google Wallet verification is $0.10 per completed verification and an ID document check is $0.15. Growth takes 4 percent off Didit prices and Scale takes 10 percent.
Does the selfie age check store the user's face?
By default save_api_request is true: the face crop and reference image are stored, the face embedding joins your face index and a status.updated webhook fires. Set it to false and Didit does not persist the call, the request_id becomes a correlation ID rather than a retrievable session ID, and no webhook fires. Your own logs and storage still follow the retention policy you wrote.
Is selfie age estimation accurate enough for an 18+ gate?
Didit's Age Estimation documentation reports a mean absolute error of 1.1 years at ages 16 and 17 and 1.9 years at ages 18 to 20. The same documentation reports 96 percent aggregate accuracy for under-18 versus 18-and-over classification. Those are aggregate metrics, not a per-person error bound. That is enough to route traffic and not enough to be legal proof of age on its own, so send borderline faces to a document or wallet check.
What if the model says a user is 17 and they are really 18?
For a live call with the minimum age set to 18, a predicted age below 18 adds AGE_BELOW_MINIMUM and the status is Declined. That is an API decline, not a final denial of access. Send the user to the fallback your policy defines: an ID document check at $0.15, Google Wallet at $0.10 where supported, or a manual route. Keep that appeal path outside the automated retry loop so a retry cannot force an approval.
Can I verify age without a selfie at all?
You can verify age without a selfie if the supported wallet returns a verified attribute sufficient for your age policy, and you should check the final result for that attribute before granting access, because a completed wallet identity check alone does not establish age. Google Wallet is available in the United States, United Kingdom, Brazil, Singapore and Taiwan at $0.10 per completed verification. The EUDI Wallet has a published $0.15 rate and is coming soon, with no launch date promised.
Is age estimation the same as ID verification?
No. Age estimation predicts an age from a face and never reads a document, so it cannot confirm a name, a nationality or an identity. ID verification processes a document at $0.15 and may disclose personal data, which is a different privacy trade. Pick based on what the regulation actually requires you to know.
Does this meet GDPR data minimisation?
Turning off Didit session persistence reduces the data Didit retains for a standalone age check. The service still processes a face image. Assess whether that processing is necessary, identify the applicable lawful basis, and set retention limits for any decision data your service keeps. Data minimisation under the GDPR is about collecting what you need for the purpose, so the boolean you keep needs a lawful basis and a retention period of its own.
How do I delete a user's age verification data?
Call the Delete Session API with the session id. It deletes the session and its data, and by default the face embedding goes with it; applications that opted in can keep an image-free biometric template instead. The Delete Session API applies to persisted sessions, so a call made with save_api_request set to false has nothing to delete on our side.
Can I run age estimation inside a workflow instead of the standalone API?
Yes. In hosted flows age estimation is embedded inside the Liveness step, so you enable it on the Liveness node in the Business Console, set the decline threshold, create a session with POST /v3/session/ and read the result at liveness_checks[].age_estimation from the decision endpoint. There is no separate age estimation workflow feature.
Can a coding agent do the integration for me?
Yes. The integration prompt gives a coding agent the endpoint, the fields and the failure modes in one paste, and the Didit MCP server lets an assistant call the platform directly.
Compliance built in
Audited, certified and attested.
We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center
- Regulation encoded into your flows
Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.
- Ready for AMLR
Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.
- Tested in Spain's Treasury sandbox
Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.
- Audited, not self-declared
iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.
Your obligations · 3 regions
SOC 2 Type 2
ISO 27001
iBeta Level 1 and Level 2
EU regulator attestation
FSM youth protection
GDPR
EBA remote onboarding
MiCA compatible
FIDO Alliance member
- AMLREU AML Regulation ready
Integration · Didit MCP
Run Didit from your own AI agent
Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.
- Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
- Run investigationsAsk why a session was declined, review cases, search people and companies.
- Change rulesCreate payment rules, test them on past data and switch them on.
- Pull reportsAsk for numbers, exports or the audit log.
Didit Academy


