Developer's Guide to Zero-Knowledge Proofs for Age Verification
Didit does not issue zero-knowledge proofs. We return the age decision, $0.10 per Age Estimation check or $0.15 per ID Verification step, and you wrap it in a proof. A model-estimated age is an age gate, not legal proof.

Contents
In this guide
Jump to the part you need.
This guide is for developers who must gate an age-restricted product and want to keep dates of birth out of their database. Didit does not issue zero-knowledge proofs itself: we return an age decision you can fold into a proof, priced at $0.10 per Age Estimation check. The caveat is that a model-estimated age is an age gate, not legal proof of age.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
| Piece | What it returns | Price | Where it is documented |
|---|---|---|---|
| Age Estimation API | Predicted age in years, passive liveness score, Approved or Declined | $0.10 per call, passive liveness included | docs.didit.me, standalone APIs, age estimation |
| ID Verification in a workflow | Document fields including date of birth, MRZ, fraud warnings, MIN_AGE_NOT_REACHED | $0.15 per check | docs.didit.me, core technology, ID verification |
| ID Verification API, direct upload | Same fields, one-shot server to server | $0.20 per call | Price book line "ID verification API" |
| Passive Liveness step | Liveness score 0 to 100, presentation-attack flags | $0.10 per check as its own step | docs.didit.me, age estimation methods |
| Full ID check (KYC) | Document, biometrics and device and IP in one check | $0.33 per check | didit.me/pricing |
| Workflow orchestrator, MCP server, SDKs | Tooling | Free on every plan | docs.didit.me |
Start free in the sandbox at business.didit.me, no sales call, unlimited testing. For developers, connect Didit to an AI assistant through Didit MCP. The product pages you will need are Age Estimation, ID Verification and pricing.
What a zero-knowledge age check actually needs
A zero-knowledge age check has three parts. An issuer makes a statement about the person, for example "this passport holder's birth date makes them over 18" or "the face in this selfie is estimated at 24 years". A prover builds a proof that the statement satisfies a predicate such as "age is at least 18" without revealing the underlying value. A verifier checks the proof and stores the yes or no answer.
The first part is the one that is easiest to get wrong. A proof is only as good as the claim it wraps. If the age was estimated from a selfie, the proof shows that Didit estimated an age, not that the person is legally an adult. If the age came from a passport read by ID Verification, the proof can carry document assurance and an expiry check.
Didit supplies the first part and enforces the threshold on our side. You supply the proof, or you accept the threshold decision without one.
What Didit does and does not do
We do not generate zk-SNARKs or zk-STARKs, and we do not run a circuit for you. Here is what the platform gives you instead:
- Age Estimation API. A predicted age from one selfie with passive liveness in the same call, $0.10. Mean absolute error is 1.1 years at ages 16 and 17 and 1.9 years at 18 to 20, and 96% of selfies are correctly classified as under 18 or 18 and over.
- ID Verification. Document OCR, MRZ and barcode decoding, authenticity checks, and a
minimum_agerequest field that produces theMIN_AGE_NOT_REACHEDwarning. $0.15 in a workflow, $0.20 through the direct API. - Sessions and webhooks. A hosted flow at
session.url, a decision endpoint, and astatus.updatedwebhook signed with HMAC-SHA256. - Digital ID wallets. Where a national eID or bank identity signs the attributes, the result carries the
cryptographicassurance tier. Google Wallet ID is $0.10, MitID is $0.25.
If a regulator or a partner demands an actual zero-knowledge attestation, you build the proof layer and use a Didit decision as the private input. We do not document a proof format and we will not pretend otherwise.
Prerequisites
- A Didit application and an API key from the Business Console, sent in the
x-api-keyheader. - Prepaid credit. The Free plan includes $10.00 of monthly credit for organizations that sign up with a work email, and the sandbox costs nothing.
- Base URL
https://verification.didit.mefor the standalone APIs. - A face image in
jpg,jpeg,png,tifforwebp, maximum 5 MB. PDFs are not accepted on this endpoint. - For the session route, a workflow with the
LIVENESSfeature and age estimation enabled, plus its workflow UUID.

How to add an age gate that a proof can wrap
Outcome: an age decision your backend can trust, expressed as a value you can hand to a prover, without keeping the document or the birth date. Method: Age Estimation for the default path, ID Verification when the policy needs a document-backed date of birth.
- Decide what evidence your gate needs against your own risk and compliance policy. A selfie-based estimate may be appropriate where your policy accepts a model-estimated age band. A document read is needed where the age must be tied to a legal identity, or where a regulator or partner requires document-backed evidence.
- Pick the delivery mode. Mode A runs age estimation inside the hosted Liveness step of a session, so there is no separate age feature. Mode B is the standalone server-to-server call when you already hold the selfie.
- Configure the threshold. Set
age_estimation_decline_thresholdto the age your policy requires. The default is 18. A Challenge 21 style gate uses 21, and the same field applies on the standalone call. - Make the call. The standalone request below runs as written once you replace the key and the image path:
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=true' -F 'vendor_data=user-1234' - Read the decision, not just the HTTP code. A
200can still carrystatus: "Declined". Checkage_estimation.statusand thewarningsarray on every response. - Fetch the session decision if you used Mode A. Call
GET /v3/session/{sessionId}/decision/and readliveness_checks[].age_estimation. The result does not appear in a top-levelage_estimations[]array. - Record only what you need. Set
save_api_request=falseand nothing is stored:request_idbecomes a one-off correlation UUID that cannot be looked up later. Leave the defaulttrueand the call is persisted as an API-type session in the console, the face crop is stored, and the face embedding joins your application's face index.
Expected output
The documented response shape for a successful call:
{
"request_id": "<session id, or a one-off correlation id>",
"age_estimation": {
"status": "Approved",
"method": "PASSIVE",
"age_estimation": <predicted age in years>,
"score": <passive liveness score, 0 to 100>,
"user_image": { "entities": [ ... ] },
"warnings": []
}
}
Status is Approved only when warnings is empty. Sandbox keys skip all processing and billing: after request validation the endpoint returns a static Approved mock with age_estimation: 30 and no warnings, no session is persisted and no credits are used. A passing sandbox test proves your integration, not the model.

Inputs and outputs
| Field | Direction | Required | Notes |
|---|---|---|---|
user_image | Input | Yes | Face photo. The largest face in the frame drives the estimate. |
age_estimation_decline_threshold | Input | No | Default 18. Below this value the response declines with AGE_BELOW_MINIMUM. |
face_liveness_score_decline_threshold | Input | No | Default 30. A liveness score at or below it adds LOW_LIVENESS_SCORE. |
rotate_image | Input | No | Set when captures may be sideways or upside down. |
save_api_request | Input | No | Default true. false stores nothing and returns a correlation id. |
vendor_data | Input | No | Your stable user identifier, used for duplicate detection. |
request_id | Output | Always | A real session id when the call is persisted. |
age_estimation.status | Output | Always | One of Not Started, In Progress, Approved, In Review, Declined, Abandoned, Kyc Expired. |
age_estimation.age_estimation | Output | Always | Float in years, or null when the age could not be estimated. |
age_estimation.score | Output | Always | Passive liveness score, 0 to 100. |
age_estimation.warnings | Output | Always | Risk codes including AGE_BELOW_MINIMUM, AGE_NOT_DETECTED, LOW_LIVENESS_SCORE, NO_FACE_DETECTED, LIVENESS_FACE_ATTACK, MULTIPLE_FACES_DETECTED. |
Failure cases and recovery
| Signal | Meaning | Recovery |
|---|---|---|
| HTTP 400 | Missing or oversized user_image, or an unsupported extension | Validate size and type on the client before sending, then resend |
| HTTP 403, not enough credits | The organization balance cannot cover the call, raised before any image processing | Top up or raise the plan, then retry |
| HTTP 403, permission message | Missing or invalid API key. This API never returns 401 | Check the x-api-key header and the key's scopes |
| HTTP 429 | Shared write budget of 300 requests per minute per key is exceeded | Back off and spread the writes |
Declined with AGE_BELOW_MINIMUM | The predicted age is under your threshold | Reject for this product. Do not retry to get a different answer |
Declined with LOW_LIVENESS_SCORE or LIVENESS_FACE_ATTACK | A presentation attack is suspected | Reject, or step up to the ID Verification path |
AGE_NOT_DETECTED | The model could not extract an age, usually image quality | Ask for a retake with better light and a single front-facing face |
MULTIPLE_FACES_DETECTED | More than one face in frame | Ask the user to capture alone |
In Review on a document | A document check could not reach a decision, for example DOCUMENT_LIVENESS_NOT_COMPUTED | Route to your manual queue. Never approve an In Review result automatically |
Two boundaries matter more than the error codes. First, a decline is a decision, not an exception, so do not wrap it in a retry loop. Second, the model's error grows for faces close to your threshold, and the docs recommend a fallback to document-based verification for borderline ages.
Where the zero-knowledge proof fits
Once you hold a Didit decision, the proof layer is yours. Keep the boundary clear: Didit returns a decision. In wallet flows, the identity provider signs the attributes and the result carries the cryptographic assurance tier. Your prover decides what to prove and what to reveal. We do not document a proof format, a circuit, or a proof lifecycle, so treat any design here as your own engineering and compliance decision.
What Didit contributes is the private input: age_estimation in years, or the date of birth from id_verification, plus the liveness score that says a live person was present. vendor_data is the identifier that ties the Didit decision to your own user record.
If you need a document-free path for users who should not hand over an ID, start with Age Estimation at $0.10 and escalate only the borderline cases. That can reduce the personal data you collect, and it maps cleanly onto the data minimisation principle in Article 5 of the GDPR.
Age verification without an ID document
Age Estimation is the no-document route. The user takes a selfie, the model predicts an age, passive liveness confirms a live person, and your backend receives a status. In the interface Didit blurs the user's face during the passive check so it reads as an age estimate rather than an identity check. Nothing about this is a legal proof of age, and that distinction belongs in your own copy as well as your risk file.
Sign in with a national eID or a bank identity is the other no-document route, with the cryptographic assurance tier because the provider signed the attributes. Available today: MitID at $0.25, BankID Sweden at $0.20, iDIN at $0.95, Finnish Trust Network at $0.25, Smart-ID and Mobile-ID at $0.21, Bank iD at $0.20 and Google Wallet ID at $0.10.

Age assurance, Challenge 21 and AI platforms
A Challenge 21 policy asks anyone who looks under 21 for proof, and it is a policy question before it is a technical one. In Didit you set age_estimation_decline_threshold to 21 and route the borderline band to ID Verification, which is the same pattern used for 18. Keep a written record of which method applies to which surface.
For AI platforms and agents the gate belongs to the account, not to the prompt. Verify once when the account is created, store the decision, and re-check when the account's stored age crosses a threshold. Our MCP server lets a coding agent read the API and wire the calls while you are building, and it is free on every plan: MCP setup for every client.
Worked cost example
Assume 250,000 first-time age checks a month and a policy that sends every borderline estimate to a document check. Assume 8% of users land in that band.
- Age Estimation at list price: 250,000 x $0.10 = $25,000.00
- Borderline users: 250,000 x 0.08 = 20,000 ID Verification steps
- ID Verification in a workflow: 20,000 x $0.15 = $3,000.00
- Total at list price: $25,000.00 + $3,000.00 = $28,000.00
- Same volume on Scale with 10% off Didit prices: 250,000 x $0.09 = $22,500.00, plus 20,000 x $0.135 = $2,700.00, total $25,200.00 before the $299 monthly fee
If the same product also needs a full identity check and AML on every user, the iGaming bundle lists at $0.63: $0.33 full ID check plus $0.20 AML screening plus $0.10 Age Estimation. At 250,000 users that is 250,000 x $0.63 = $157,500.00.
Paid steps and review boundaries
| Step | Billed | Price | Review boundary |
|---|---|---|---|
| Sandbox calls | No | $0.00, unlimited | Returns a static mock, so it proves the integration and not the model |
| Age Estimation API | Yes, one credit per 200 response | $0.10 | A decline is a decision; do not auto-retry it |
| ID Verification step in a workflow | Yes | $0.15 | In Review goes to a person |
| ID Verification API | Yes | $0.20 | DOCUMENT_LIVENESS_NOT_COMPUTED means the forgery check did not run |
| MCP server, workflow orchestrator, SDKs | No | Included | None |
Borderline ages are a review boundary too, not a technical detail. Send them to the document path and record which method produced each decision.
Sources
- Didit pricing page and the live price feed, read November 26, 2026.
- Didit docs, Age Estimation overview.
- Didit docs, Age Estimation standalone API.
- Didit docs, ID Verification overview.
- Didit docs, ID Verification standalone API.
- Didit docs, Create Session API.
- Didit docs, webhooks and HMAC-SHA256 signing.
- Didit docs, digital ID wallets and coverage.
- Didit MCP server.
- Regulation (EU) 2016/679, GDPR.
Next step: open the sandbox at business.didit.me, create an application, and run the age estimation call with a test selfie. No sales call, no contract, and the first $10.00 of monthly credit is on us on the Free plan.
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
Alejandro Rosas
Co-founder and CTO

Questions
Frequently asked questions
What is zero-knowledge proof age verification?
It is a way to prove a person meets an age threshold without revealing their date of birth. An issuer attests to the age, a prover builds a cryptographic proof that the value satisfies the predicate, and the verifier learns only pass or fail. The privacy gain is real, but the proof is only as trustworthy as the issuer behind it.
Can Didit generate a zero-knowledge proof of age?
No. Didit returns an age decision from the Age Estimation API at $0.10 per check, or a document-backed date of birth from ID Verification at $0.15 in a workflow, and you build the proof layer on top. We do not document a proof format. You can use our decision as the private input to your own prover.
Is there an age verification API I can call server to server?
Yes. POST https://verification.didit.me/v3/age-estimation/ takes one face image and returns a predicted age, a passive liveness score and a decision, at $0.10 per call. Send your key in the x-api-key header and use multipart/form-data. The same endpoint is documented in full in the standalone API reference.
How much does an age verification API cost?
Age Estimation is $0.10 per check with passive liveness included. A document fallback is $0.15 per ID Verification step in a workflow, or $0.20 through the direct upload API. A full ID check is $0.33, and the Free plan includes $10.00 of monthly credit with a free sandbox.
What is the difference between age estimation and age verification?
Age estimation predicts an age from a face; age verification reads a date of birth from a document or a signed wallet attribute. Didit prices them separately at $0.10 and $0.15. Estimation is the lighter gate and document verification is the evidence-backed one. Running both, with estimation first and document fallback for borderline cases, is an optional policy choice rather than a default.
How accurate is AI age estimation near 18?
Didit publishes a mean absolute error of 1.1 years for 16 and 17-year-olds and 1.9 years for 18 to 20-year-olds, and 96% of selfies are correctly classified as under 18 or 18 and over. Error grows near the threshold, which is why the docs recommend a document fallback for borderline ages. Treat the score as a gate, not a legal finding.
Can I verify age without an ID document?
Yes, on two routes. Age Estimation reads a selfie for $0.10 with no document at all. A digital ID wallet sign-in returns signed attributes from a national eID or bank for $0.10 to $0.95 depending on the wallet. Neither route requires the user to upload an identity document.
Is there a free age verification system for testing?
The sandbox is free and unlimited on every plan. Sandbox keys return a static Approved mock with age_estimation: 30 and consume no credits, so you can build the whole flow before you pay. For live traffic the Free plan includes $10.00 of monthly credit, which covers 100 Age Estimation checks at list price.
How do I integrate age verification into my app?
Create a workflow with the Liveness feature and age estimation enabled, create a session with POST /v3/session/, send the user to session.url, then read GET /v3/session/{sessionId}/decision/ or wait for the status.updated webhook. If you already hold the selfie, call the standalone endpoint instead and skip the session.
Does Didit work for age verification systems on AI platforms?
Yes, with the same API. Verify the account holder once at signup, store the decision next to the account, and re-check when the stored age crosses a threshold. For agent building work, the free MCP server lets an AI assistant read the API and wire the calls from the docs.
What is age assurance and how does Challenge 21 map to an API?
Age assurance is the regulator's word for knowing a user's age band well enough for the risk of the product. Challenge 21 maps directly to one field: set age_estimation_decline_threshold to 21 and send the borderline band to ID Verification. Keep a written record of which method covers which surface.
Does age estimation help with GDPR data minimisation?
It reduces what you collect: one selfie, a predicted age and a liveness score, with no document image and no stored birth date when you send save_api_request=false. That supports the minimisation principle in Article 5 of the GDPR. It does not by itself make a flow compliant, since you still need a lawful basis and a retention rule.
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


