Automated Face Swap Detection for Video Onboarding (2026)
Catch face swaps in video onboarding with liveness, face match and device checks on one Didit workflow. Full KYC is $0.33 per completed check; the standalone passive liveness API is $0.10 per call.

Contents
In this guide
Jump to the part you need.
This guide is for onboarding and fraud teams that run remote video or selfie checks and need to catch face swaps before approval. We use three checks on one Didit workflow: liveness, face match against the document portrait, and device and IP analysis. Full KYC is $0.33 per completed check, passive liveness $0.10, and the standalone passive liveness API $0.10 per call. Caveat: no model decides fraud for you, so the steps include the warning-to-action policy you write.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
| Decision | What we recommend |
|---|---|
| Outcome | A set of signals on one session, plus the policy decision you write to turn them into approve, retry or review |
| Method | One workflow with ID document verification, liveness (3D action or 3D flash for high risk), face match 1:1 and device and IP analysis |
| Signals to act on | liveness_checks[].warnings, the liveness score, the face match score, and duplicate device or network flags |
| Price per completed check | $0.33 full KYC applies to ID document verification plus passive liveness, face match and device and IP analysis: $0.15 + $0.10 + $0.05 + $0.03. Choosing active liveness at $0.15 replaces the $0.10 passive liveness line, so the same flow totals $0.38 |
| Selfie you already hold | POST /v3/passive-liveness/ at $0.10 per call, single-shot with no retry budget |
| What it does not decide | Your policy. You map each warning to decline, retry or manual review, and you own the thresholds |
| Setup | An API key, one workflow, an HTTP client. The Web or Mobile SDK replaces the hosted redirect if you want capture inside your app |
Start free in the sandbox at business.didit.me (no sales call). Developers who want an assistant to wire the flow can connect Didit to Claude or ChatGPT through Didit MCP. The matching product page for ID verification and biometrics is Free KYC by Didit, and every unit price is on Didit pricing.
What the check has to decide
A face swap attack does not try to convince the camera that a photograph is alive. A live host sits in front of the camera, performs whatever action the flow asks for, and a generator replaces the host face with a target face in real time. Traditional liveness answers one question, is a live person present, and the honest answer is yes. A face swap defeats a check that stops at liveness.
That splits the job in two. Liveness has to say whether the presented face shows signs of an attack: warped edges where the swapped face meets the neck and hairline, skin texture and lighting that do not match the rest of the frame, mouth movement drifting out of sync with speech, frame-level flicker from the generator. Identity has to say whether the face belongs to the person on the document. Didit answers the second with Face Match 1:1, a 0 to 100 similarity score between the live capture and the ID portrait, and device and IP analysis catches the same device or network opening several accounts.
Our position: run all three, and write the policy that maps warnings to actions before you turn the flow on.
How AI video forgery detection works during onboarding

AI video forgery detection is the part of the flow that scores the capture for signs it was generated or altered. Didit runs it inside the liveness step, and the method you pick sets how much evidence the model gets.
- Passive liveness analyzes a single frame with a convolutional network and looks for artifacts and texture patterns that separate a real face from a spoof. It needs no user action, costs $0.10 per check inside a session, and is the standard security tier.
- 3D flash projects a light pattern onto the face above 30 frames per second and reads the reflections to build a depth map, which a flat screen or a 2D print cannot reproduce.
- 3D action adds a randomized action such as blinking or nodding on top of the flash analysis, so the person has to react in real time. It is the highest security tier and is priced as active liveness at $0.15 per check.
Didit liveness reaches 99.9% accuracy with a false acceptance rate under 0.1%, and passive liveness is iBeta Level 1 and Level 2 certified for presentation attack detection under ISO/IEC 30107-3. Those numbers describe the model. The decision still needs the face match and the warning policy around it. Didit runs identity and fraud checks for 4,000+ companies.
Prerequisites
- A Didit application and API key from business.didit.me. A sandbox key works for the whole tutorial and consumes no credits.
- A workflow. Build it in the Business Console workflow builder or with
POST /v3/workflows/, then note the workflow UUID. - These features on the workflow:
ID_VERIFICATION,LIVENESSandFACE_MATCH. Device and IP analysis runs on every session without a toggle for the basic signal set. - A liveness method chosen per workflow:
face_liveness_methodset toPASSIVE,ACTIVE_3DorFLASHING. - A stable
vendor_datavalue per user. It binds sessions to one person and drives duplicate detection. - For the standalone route, a face image in jpg, jpeg, png, tiff or webp, max 5 MB. PDFs are rejected.
- Credit on the account for live calls. Sandbox calls skip processing and billing.
Step by step: add face swap detection to video onboarding
Pick the liveness method. In the Business Console or with
POST /v3/workflows/, setface_liveness_method. UseACTIVE_3DorFLASHINGfor account opening, high-value transactions and anything a fraud ring would target. UsePASSIVEwhere drop-off costs more than fraud, such as low-risk logins.Add the identity check next to it. Turn on
FACE_MATCHon a workflow that already runsID_VERIFICATIONandLIVENESS. Face Match uses the document portrait as the reference and the liveness selfie as the live image. Leave device and IP on: it is collected in the session and lands inip_analyses[]on the decision.Create the session. Send the workflow UUID and your own user identifier. The callback is where the hosted flow sends the user when it finishes.
curl -X POST 'https://verification.didit.me/v3/session/' \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "workflow_id": "YOUR_WORKFLOW_ID", "vendor_data": "user-123", "callback": "https://yourapp.com/post-kyc" }'Send the user to the capture. Redirect to
session.urlor mount the Web or Mobile SDK. The user scans the document, then records the liveness selfie. In the face match step, a capture that fails for a fixable reason such as too dark, blurry or off-center keeps the user on the step and returnsfeedback_codes, which the Web and Mobile SDKs surface as coaching messages. The attempt budget comes from the workflow node.Read the decision. Fetch it when the redirect or webhook arrives.
curl https://verification.didit.me/v3/session/<SESSION_ID>/decision/ \ -H 'x-api-key: YOUR_API_KEY'Branch on
session_kindfirst, then walk the arrays:liveness_checks[],face_matches[]andip_analyses[].Map warnings to actions. The failure table below is the mapping we recommend. Write it down before launch, because the same warning can mean different things in a bank and in a gaming signup.
Use the standalone route only for a selfie you already hold. It accepts one image, returns the liveness verdict, and skips the video flow entirely.
curl -X POST 'https://verification.didit.me/v3/passive-liveness/' \ -H 'x-api-key: YOUR_API_KEY' \ -F 'user_image=@./selfie.jpg' \ -F 'save_api_request=true' \ -F 'vendor_data=user-123'Set
save_api_requestto true to persist the call as an API session and enroll the face in your face index, or false to keep nothing and skip enrollment. Blocklist and duplicate screening run either way.Test in the sandbox before you spend credits. A sandbox key returns a static Approved mock payload after input validation, persists no session and consumes no credits. Malformed input still returns 400, so you can test your error handling too.

Expected output

| Field | Where it appears | What to read |
|---|---|---|
status | Top of the decision | Approved, Declined, In Review, In Progress, Not Started, Expired, Abandoned, Kyc Expired, Resubmitted or Awaiting User |
liveness_checks[] | KYC decisions | One entry per liveness node: status, method, score from 0 to 100, warnings, face_quality, face_luminance |
face_matches[] | KYC decisions | Status, score from 0 to 100, warnings such as LOW_FACE_MATCH_SIMILARITY |
ip_analyses[] | Both session kinds | Geo, ASN, VPN, proxy and Tor flags, device fingerprint id, duplicate device matches, warnings |
decision_trace | Top level | automatic_status, decided_by, status_warnings: how the status was reached |
reviews | Top level | Manual review activity on the session, if any |
biometric_retention | Top level | Jurisdictions and deletes_at for the live biometric data of the session |
linked_records | Top level | same_face, earlier verifications and network summaries, or null |
Failure cases and recovery
| Symptom | What it means | Recovery |
|---|---|---|
| HTTP 403 on a live call | No credits left. The request is refused before any processing | Top up or move the application to a plan with monthly credit, then retry |
| HTTP 400 | Missing user_image, file over 5 MB, unsupported extension or a PDF | Send jpg, jpeg, png, tiff or webp under 5 MB |
| HTTP 429 | The shared write budget of 300 requests per minute per API key is exhausted | Back off and retry |
Declined with LIVENESS_FACE_ATTACK | The model detected a presentation attack on the face | Do not approve. Route to manual review or block per your policy |
Declined with LOW_LIVENESS_SCORE | The score is at or below face_liveness_score_decline_threshold, default 30 | Retry the capture once, then decline |
FACE_IN_BLOCKLIST or POSSIBLE_FACE_IN_BLOCKLIST | The face matches an entry on your blocklist | Block or route to review. Screening is bypassed for the same vendor_data, so a re-run does not flag the user's own face |
DUPLICATED_FACE or POSSIBLE_DUPLICATED_FACE | The same face already appeared in another approved session | Information severity. Review, do not auto-decline |
NO_FACE_DETECTED or MULTIPLE_FACES_DETECTED | A capture problem: no face, or more than one | Ask the user to retry with a single, well-framed face. Multiple faces is warning severity and does not decline on its own |
ip_analyses[] empty | The user blocked the fingerprinting script with a privacy extension or content blocker | Decide whether to fail closed or continue on soft signals |
VPN_DETECTED, PROXY_DETECTED, TOR_DETECTED, LOCATION_MISMATCH_WITH_DOCUMENT | Network risk signals on the session | Decline, review, or add a stronger liveness step per your policy |
| Face match retries exhausted | face_match_max_attempts ran out. Default 3, range 1 to 3, session flow only | The computed status is applied, Declined or In Review |
Retries are a session feature. A face match that fails for a fixable capture reason returns feedback_codes while attempts remain, and the Web and Mobile SDKs turn those into coaching text. The standalone endpoints are single-shot: they have no retry budget and they return the score and stop. The passive liveness call is not throwaway, though. With save_api_request set to true, which is the default, the call is persisted as an API session and the detected face is enrolled in your face search index, so you can read it later through GET /v3/session/{sessionId}/decision/ and the status.updated webhook. With false, nothing is stored and the face is not enrolled, while blocklist and duplicate screening still run.
Inputs and outputs
| Direction | Field | Notes |
|---|---|---|
| Input | workflow_id | Workflow UUID, required |
| Input | vendor_data | Your stable user identifier, strongly recommended for duplicate detection |
| Input | callback | Where the hosted flow returns the user, with the session id and status appended |
| Input | expected_details | Expected name, date of birth, nationality and document types. Mismatches surface as decision warnings |
| Input | user_state | Where the person lives, when you know it. In Auto consent mode, Illinois, Texas or Colorado makes the flow ask for explicit biometric consent |
| Input | metadata, tags, session_expiration_time | Optional, echoed back and used for filtering in the console |
| Output | Session decision | Status, feature arrays, warnings, decision trace, review activity and biometric retention date |
Paid steps and review boundaries
| Step | Price | When it is charged |
|---|---|---|
| ID document verification | $0.15 per check | When the document check completes in the session |
| Passive liveness | $0.10 per check | Per liveness check in the session |
| Active liveness (3D action or 3D flash) | $0.15 per check | When the workflow runs the active method |
| Face match 1:1 | $0.05 per check | Per comparison against the document portrait |
| Device and IP analysis | $0.03 per check | Per session |
| Standalone passive liveness API | $0.10 per call | Each 200 response consumes one credit |
| Standalone face match API | $0.05 per call | Each call |
| Workflow orchestrator, MCP server, sandbox | Free | No charge |
Manual review is a policy choice you make, not something the model decides for you. Nothing in the decision forces a human step. The decision exposes warnings, scores and review activity, and the reviews array records what happened. Your policy determines when a session enters In Review.
The boundary we recommend: automatic decline for LIVENESS_FACE_ATTACK and for LOW_LIVENESS_SCORE after one retry. Automatic approval only when liveness is Approved, face match is Approved and no device or network warning is set to review. Everything else lands in In Review for a person to decide. A blocklist match, a duplicate face or a location mismatch can go either way, so pick a rule for each and write it down before launch.
Worked cost example
Take 10,000 completed KYC checks a month on the recommended flow, at list price.
- ID document: 10,000 x $0.15 = $1,500
- Passive liveness: 10,000 x $0.10 = $1,000
- Face match: 10,000 x $0.05 = $500
- Device and IP: 10,000 x $0.03 = $300
- Total: $1,500 + $1,000 + $500 + $300 = $3,300, which is 10,000 x $0.33
On Scale every Didit price is 10% lower. $0.33 x 0.90 = $0.297, so 10,000 checks cost 10,000 x $0.297 = $2,970. That usage is paid from the plan's monthly credit first and then from top-ups. The Scale plan fee is $299 a month and includes $350 of monthly credit.
If you already hold selfies and only need the one-shot route: 5,000 x $0.10 = $500 on the standalone passive liveness API, plus 5,000 x $0.05 = $250 if you also run the standalone face match, so $750 in total.
Sources
- Didit docs: Liveness Detection API and deepfake prevention
- Didit docs: Passive Liveness API
- Didit docs: Face Match 1:1 API
- Didit docs: Device fingerprinting and IP risk
- Didit docs: Create Session API
- Didit docs: Retrieve Session Decision API
- Didit docs: Workflow builder
- Didit pricing page
- Didit pricing as JSON
- Didit docs: Pricing and billing rules
- Didit MCP server
- Didit full product facts
The next step is a sandbox key. Create an application at business.didit.me, run one session with your own selfie, and read the liveness_checks array before you turn the flow on in production. No sales call is needed to start, and sandbox calls consume no credits.
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 automated face swap detection in video onboarding?
It is the set of checks that decide whether the face on a video or selfie belongs to the live person presenting it. In Didit it runs as liveness detection plus a 1:1 face match against the ID portrait, with device and IP signals alongside. The liveness verdict, score and warning codes land in the liveness_checks array of the session decision.
How does AI video forgery detection work during onboarding?
AI video forgery detection scores a capture for signs it was generated or altered: artifacts, texture that does not match the scene, and depth cues a flat screen cannot reproduce. Didit runs this inside the liveness step, where passive mode analyzes a single frame and the 3D flash and 3D action modes add light-pattern reflection analysis. A face match against the document portrait then checks that the captured face is the identity on file.
Does passive liveness detect deepfakes and face swaps?
Passive liveness analyzes a single frame for presentation attacks, and deepfakes are one of the attack types it is built to score. It is the standard security tier at $0.10 per check in a session, so high-risk onboarding should pair it with face match or move to an active method.
What is the difference between passive, 3D flash and 3D action liveness?
Passive analyzes one frame with a convolutional network and needs no user action. 3D flash projects light patterns above 30 frames per second and reads the reflections to build a depth map. 3D action adds a randomized action such as blinking or nodding on top of flash analysis and is the highest security tier. Passive costs $0.10 per check and active liveness costs $0.15 per check.
How much does face swap detection cost per onboarding?
A full Didit KYC check is $0.33: ID document verification $0.15, passive liveness $0.10, face match $0.05 and device and IP analysis $0.03. Using active liveness at $0.15 in place of passive makes the comparable total $0.38. Sandbox testing is free and unlimited on every plan.
What happens when liveness returns Declined with LIVENESS_FACE_ATTACK?
The session status is Declined and the warning says the model detected a presentation attack. Do not approve it. Route the session to manual review or block it per your fraud policy, and keep the evidence in the console so a reviewer can see what the model saw.
Can I check a selfie I already captured for a face swap?
Yes. Send it to POST /v3/passive-liveness/ as multipart form data in the user_image field. The endpoint accepts jpg, jpeg, png, tiff or webp up to 5 MB, rejects PDFs, and costs $0.10 per call. It is single-shot with no retry budget, and with save_api_request set to true the call is persisted as an API session and the face is enrolled in your index.
Which warnings should decline a user automatically?
LIVENESS_FACE_ATTACK and LOW_LIVENESS_SCORE are decline-severity signals. DUPLICATED_FACE means the same face already appeared in another approved session and is information severity, so it should go to review rather than auto-decline. NO_FACE_DETECTED and MULTIPLE_FACES_DETECTED are capture problems that should be retried before anything else.
Is Didit certified for presentation attack detection?
Yes. Passive liveness holds iBeta Level 1 and Level 2 certification for presentation attack detection under ISO/IEC 30107-3, and Didit holds SOC 2 Type 2 and ISO/IEC 27001:2022. Certification covers the model, not your policy, so the warning-to-action mapping is still yours to write.
How do I test face swap detection without spending credits?
Use a sandbox API key. Sandbox keys skip processing and billing, return a static Approved mock payload, persist no session and consume no credits, while malformed input still returns 400 so you can test your error paths. You can also arm a sandbox scenario on session creation with sandbox_scenario to reproduce a specific outcome.
What are the limits of liveness detection for face swaps?
Liveness answers whether a live person is present and whether signs of an attack appear. It does not by itself prove the face matches the ID on file, which is why the recommended flow adds face match 1:1 and device and IP analysis. The accept threshold and the warning-to-action mapping are policy decisions you own.
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


