Skip to main content

Deepfake Detection Accuracy: 8 Steps to APCER and BPCER Benchmarks

Benchmark deepfake detection by running a labeled corpus of attacks and genuine selfies through Didit liveness, then computing APCER (attacks accepted) and BPCER (real users rejected).

Deepfake Detection Accuracy: 8 Steps to APCER and BPCER Benchmarks

Contents

In this guide

Jump to the part you need.

This guide fits risk and engineering teams that need a real number for deepfake detection accuracy instead of a vendor claim. You label a corpus, run it through Didit liveness, and compute APCER and BPCER yourself. Passive liveness costs $0.10 per check, on the standalone API and inside a workflow. The main caveat comes first: sandbox keys return a static Approved mock payload with no processing, so a real benchmark needs a live key and credits.

Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.

Deepfake detection benchmarking at a glance
ItemDetail
OutcomeA measured APCER and BPCER for your own corpus, with the operating point written down
Recommended methodLabeled corpus, standalone passive liveness API, then re-runs at adjusted thresholds
Primary metricsAPCER (attacks accepted), BPCER (genuine users rejected), ACER (their average)
ProductDidit Liveness Detection, iBeta Level 1 and Level 2, with 99.9% accuracy and FAR under 0.1% as documented product claims
Decision fieldsliveness.status and liveness.warnings[]
Published pricesPassive liveness $0.10 per check, standalone or in a workflow; active liveness $0.15; full KYC $0.33
Hard caveatSandbox keys skip processing and billing and return a static mock, so benchmarks run on a live key

Start free in the sandbox at business.didit.me (no sales call), and for developers, connect Didit to an AI assistant through the Didit MCP server. Every module price sits on didit.me/pricing and in pricing.json; the liveness product page is Liveness Detection.

What APCER and BPCER measure

Two numbers decide whether a deepfake detector works. APCER tells you how many attacks got through. BPCER tells you how many honest users you turned away. A headline accuracy figure can conceal the APCER and BPCER operating point it was measured at, so the summary hides which side of the trade-off you are paying for.

APCER meaning: attack presentation classification error rate

APCER is the share of presentation attacks that the system classifies as bona fide. It is the false acceptance rate for attacks, and it is the number an attacker cares about. The formula is attacks classified as bona fide divided by all attacks presented.

Worked case: you present 500 attack samples (printed photos, screen replays, masks, deepfake video frames) and 4 of them come back Approved. APCER = 4 / 500 = 0.008, or 0.8%. ISO/IEC 30107-3 is the standard that names this metric and the test procedure behind it.

BPCER meaning: bona fide presentation classification error rate

BPCER is the share of genuine users the system rejects. It is the false rejection rate for real people, and it is the number your growth team feels. The formula is bona fide presentations classified as attacks divided by all bona fide presentations.

Worked case: 500 genuine selfies go in and 6 come back Declined. BPCER = 6 / 500 = 0.012, or 1.2%.

APCER and BPCER together

For the same detector on the same corpus, the usual threshold trade-off applies. Raise the liveness decline threshold and you catch more attacks, so APCER generally falls, while more genuine users are rejected, so BPCER generally rises. Lower the threshold and the reverse tends to happen. ACER, the average of the two, gives one number: ACER = (APCER + BPCER) / 2. With the examples above, ACER = (0.8% + 1.2%) / 2 = 1.0%.

Report both numbers together. An APCER quoted alone says nothing about the operating point it was bought with.

The three benchmark metrics and what each one answers
MetricQuestion it answersFormulaBetter when
APCERHow many deepfakes and other attacks were accepted?attacks accepted / attacks presentedLower
BPCERHow many genuine users were rejected?bona fide rejected / bona fide presentedLower
ACERWhat is the overall error at this operating point?(APCER + BPCER) / 2Lower

Prerequisites

  • A Didit organization and an API key from the Business Console at business.didit.me. Sandbox keys are free and never bill, but they also skip processing, which matters for this task.
  • Credits on a live key. The standalone passive liveness call consumes credit on every 200 response.
  • A labeled corpus with attack files and bona fide files, several hundred of each where possible, with the attack type recorded per file.
  • Files in jpg, jpeg, png, tiff or webp, 5 MB or less. PDFs are rejected. Images are compressed to about 0.5 MB before processing, so very high resolution does not improve accuracy.
  • A sheet or script that joins each file name to its label and to the returned liveness.status.

Sandbox API keys skip all processing and billing: after request validation the endpoint returns a static Approved mock payload, no session is persisted and no credits are consumed. A corpus run on a sandbox key measures nothing. Keep the sandbox for wiring the integration and see the sandbox testing page for deterministic scenarios.

How to benchmark deepfake detection accuracy in 8 steps

  1. Define the question. Decide whether you are measuring a fixed corpus of images (the standalone API) or the full hosted flow a user actually sees (a workflow session with a liveness node). Fixed corpus first: it is repeatable, cheap and fast.
  2. Label before you run. Every file gets one label, bona fide or attack, and attacks get a type: print, screen replay, mask, deepfake. Unlabeled files are the main source of wrong APCER numbers.
  3. Pick the route. For a corpus, use POST /v3/passive-liveness/ on Passive Liveness API. For the end-to-end flow, create a session, set the workflow liveness method through face_liveness_method (PASSIVE, ACTIVE_3D or FLASHING), and read results from the session decision.
  4. Run the corpus with the documented call. Set save_api_request=false so a benchmark run does not enroll test faces into your face search index, pass a stable vendor_data per file so responses are traceable, and send the decline threshold explicitly so each run records its own operating point. The threshold field is face_liveness_score_decline_threshold, documented with a default of 30.
curl -X POST 'https://verification.didit.me/v3/passive-liveness/' \
-H 'x-api-key: YOUR_API_KEY' \
-F 'user_image=@./attack-0142.jpg' \
-F 'save_api_request=false' \
-F 'vendor_data=corpus-attack-0142' \
-F 'face_liveness_score_decline_threshold=30'
  1. Classify each response. One rule for the whole run: a sample is rejected when liveness.status is Declined, accepted when it is Approved. Do not hand-tune borderline cases mid-run or the two error rates stop being comparable.
  2. Compute both rates. APCER = attacks approved / attacks presented. BPCER = bona fide declined / bona fide presented. With 500 attacks and 4 approvals, APCER = 0.8%. With 500 bona fide files and 6 declines, BPCER = 1.2%. ACER = 1.0%.
  3. Move the threshold and re-run the same files. A score at or below face_liveness_score_decline_threshold, default 30, returns Declined. Plot the liveness.score distribution for both labels first, then pick the point where the attack tail stops crossing your BPCER budget, and record it.
  4. Write the operating point down. Store corpus size, attack mix, threshold, APCER, BPCER and date next to the integration ticket. Numbers without the corpus they came from cannot be compared with anything, including future versions of your own system.

Both rates belong to the corpus that produced them, not to the product. A set of high resolution prints and a set of real time deepfake video frames give different APCER on the same detector at the same threshold, so report the result per attack type next to the aggregate figure. That split is what tells you whether your exposure sits in replays, in prints or in synthetic faces, and it is the only version of the number a reviewer can act on.

The selfie capture step that an attack corpus imitates
The capture step your corpus imitates. Reproduce the same framing, lighting and device mix in the bona fide half of the set.

Expected output

A single call returns a request id and a liveness object. The shape below lists the fields you need for the benchmark; the values are shown as ranges and enumerations, not as results.

{
  "request_id": "<uuid>",
  "liveness": {
    "status": "Approved" | "Declined",
    "method": "PASSIVE",
    "score": 0-100,
    "warnings": [ { "risk": "LIVENESS_FACE_ATTACK", "log_type": "error" } ],
    "face_quality": 0-100,
    "face_luminance": 0-100,
    "user_image": { "entities": {}, "best_angle": "<string>" }
  }
}

On the workflow route, the same report appears inside liveness_checks[] on the session decision, one entry per liveness node, with the full schema described in Data Models:

curl https://verification.didit.me/v3/session/<SESSION_ID>/decision/ \
-H "x-api-key: <API_KEY>"

Read liveness_checks[].status and liveness_checks[].warnings[], and use node_id to tie each report to the workflow node that produced it. Risk codes are catalogued in liveness warnings.

A liveness result inside the Didit Business Console session view
The same liveness result in the Business Console, where a reviewer reads the status and warnings before deciding.

Failure cases and recovery

What goes wrong on a corpus run and how to recover
SymptomCauseRecovery
HTTP 403 before any processingBalance cannot cover the call, or the key is missing or invalid (this API returns 403, never 401)Top up or move to a plan with credit; fix the x-api-key header
HTTP 400Missing user_image, file above 5 MB, or an unsupported extension such as PDFConvert to jpg, png, tiff or webp under 5 MB and retry
HTTP 429Shared write budget of 300 requests per minute per API keyPace the run; batch large corpora across minutes
Declined with LIVENESS_FACE_ATTACKThe model detected a presentation attackCorrect outcome for an attack file, and a hard stop in production: do not approve
Declined with LOW_LIVENESS_SCOREScore at or below the decline threshold, default 30Check face_quality and face_luminance first, then tune the threshold
Declined with NO_FACE_DETECTEDNo face found in the frameOn a bona fide file this counts toward BPCER; otherwise recapture with one well framed face
MULTIPLE_FACES_DETECTEDWarning severity, it does not decline on its ownEnforce one subject per image and re-run
FACE_IN_BLOCKLIST or DUPLICATED_FACEBlocklist match declines; duplicates are information severity and never declineKeep save_api_request=false on corpus runs and check blocklist coverage

Inputs and outputs

Standalone passive liveness: what you send and what you get back
FieldDirectionNotes
user_imageInput, requiredFront-facing face image, jpg, jpeg, png, tiff or webp, max 5 MB, single subject
save_api_requestInput, default trueTrue persists a session and enrolls the face in your index; false is one-shot with nothing stored
vendor_dataInput, optionalYour reference for the file; prior faces with the same value are excluded from duplicate matching
face_liveness_score_decline_thresholdInput, default 30Score at or below this value returns Declined; record the value with every run
request_idOutputCorrelates the call to a session when save_api_request=true
liveness.statusOutputApproved or Declined; the field your benchmark classifies on
liveness.scoreOutput0 to 100; the number you plot against the decline threshold
liveness.warnings[]OutputRisk codes with log_type of error, warning or information
liveness.face_quality, liveness.face_luminanceOutput0 to 100 capture quality signals, nullable; use them to separate bad capture from detection failure

Every 200 response from a passive liveness check consumes one credit at $0.10, whether you call the standalone API or run the step inside a workflow. Active liveness is $0.15, and a full KYC check that includes passive liveness, face match and device and IP analysis is $0.33. Plan discounts and the full list are on didit.me/pricing.

Draw the review boundary from the warning, not from the status alone. LIVENESS_FACE_ATTACK is an automatic decline: do not approve it, and our recommendation is to treat it as final rather than as a capture retry. The docs require the decline but they do not prescribe where the case goes next, so routing is your policy to write, and the clean default is a documented fraud queue kept separate from the retry path. LOW_LIVENESS_SCORE and NO_FACE_DETECTED start with a retry, because capture problems look like detection problems in a single frame. Blocklist and duplicate hits follow your own policy. Anything a reviewer overrides by hand lands in status_override with the automatic status kept alongside it, so an override never silently changes your measured error rates.

Worked cost example

A benchmark of 1,000 images split 500 bona fide and 500 attacks, run three times as you move the threshold. Passive liveness is $0.10 per check on both routes, so the corpus cost does not change with the route.

  • One run on the standalone passive liveness API: 1,000 calls x $0.10 = $100.00.
  • Three runs on the same corpus: 3,000 calls x $0.10 = $300.00.
  • The same three runs on the Scale plan, which takes 10% off Didit prices: 3,000 x $0.09 = $270.00.
  • The same three runs on Growth, 4% off: 3,000 x $0.096 = $288.00.
  • Production follow-on: 10,000 full KYC checks a month at $0.33 = $3,300.00. On Growth at 4% off: 10,000 x $0.3168 = $3,168.00.

Benchmarking is a rounding error next to production volume, which is why the operating point deserves the three runs rather than one.

A full walkthrough of the verification flow a user sees
What the user actually sees. Run the corpus through the standalone API first, then confirm the chosen threshold in the hosted flow.

Sources

Next step: open the sandbox at business.didit.me, create a live key when you are ready to run the corpus, and put the same corpus through passive liveness before you commit to a threshold. No sales call, and every price you need is on didit.me/pricing.

Try it

Try this in the sandbox

Run the check this guide describes, free.

ID Verification

The product this post is about, taken from its topic. Run it free in the sandbox.

$0.15 per checkStart free

Author

Alejandro Rosas

Co-founder and CTO

Alejandro Rosas

Alejandro Rosas

Co-founder and CTO

About Didit

Questions

Frequently asked questions

What does APCER mean?

APCER stands for attack presentation classification error rate. It is the share of presentation attacks that a biometric system classifies as bona fide, computed as attacks accepted divided by attacks presented. An APCER of 0.8% means 4 of 500 attack attempts were wrongly approved.

What is BPCER?

BPCER stands for bona fide presentation classification error rate. It is the share of genuine presentations that the system rejects as attacks, computed as bona fide rejected divided by bona fide presented. A BPCER of 1.2% means 6 of 500 real users were wrongly declined.

How do I calculate APCER and BPCER from Didit responses?

Run the corpus through POST /v3/passive-liveness/ and treat liveness.status of Declined as a rejection and Approved as an acceptance. Then divide the number of approved attack files by all attack files for APCER, and the number of declined bona fide files by all bona fide files for BPCER. The average of the two is ACER.

What is a good APCER for deepfake detection?

There is no universal number, because APCER depends on the attack mix in the corpus and on the BPCER you accept. Publish both together with the corpus size, the attack types and the decline threshold. A figure quoted without those facts cannot be reproduced or compared.

Can I benchmark deepfake detection accuracy in the Didit sandbox?

No. Sandbox API keys skip all processing and billing, and after request validation the endpoint returns a static Approved mock payload with no session persisted. Use the sandbox to wire the integration, then run the corpus on a live key with credits.

What is the difference between iBeta Level 1 and Level 2?

iBeta tests presentation attack detection against ISO/IEC 30107-3. Didit passive liveness is documented as iBeta Level 1 and Level 2 compliant, at 99.9% accuracy with a false acceptance rate under 0.1%; those are our published product claims, and your APCER and BPCER come from your own corpus.

Which Didit liveness method is hardest to spoof?

The 3D action and flash method is the highest security option, because it combines a randomized user action with dynamic light pattern analysis to confirm facial depth. 3D flash analyzes light reflections without user interaction at a high security level, and passive liveness uses single-frame deep learning analysis for standard security and lower risk flows. Every method is available through face_liveness_method.

How much does a deepfake detection check cost?

Passive liveness costs $0.10 per check, whether you call the standalone API or run the step inside a workflow. Active liveness is $0.15, and a full KYC check that includes passive liveness and face match is $0.33. Growth takes 4% off Didit prices and Scale takes 10% off.

What happens when a presentation attack is detected?

The liveness report returns Declined with the LIVENESS_FACE_ATTACK warning. That is a hard stop: do not approve the session. The docs do not prescribe review routing for it, so decide in your own implementation policy whether the case goes to a fraud queue or to a manual reviewer, and keep it out of the capture retry path. Capture problems carry different codes, such as NO_FACE_DETECTED or MULTIPLE_FACES_DETECTED, and those call for a retry.

Does face match or face search detect deepfakes?

No. Face Match 1:1 compares two faces and returns a similarity score, and Face Search 1:N finds the same face across your index for duplicates and fraud rings. Liveness is the check that decides whether a live person is present. A deepfake can match the right portrait and still fail liveness, which is why the KYC bundle runs both.

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.

Compliance assistant

Your obligations · 3 regions

EU · AMLRCustomer due diligence, human reviewCovered
Illinois, Texas, ColoradoExplicit biometric consentCovered
Germany · Youth protectionVerified adults only (JMStV)Covered
Workflow checked. Every obligation is met
  • 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.

Add to ClaudeChatGPT
Didit Academy · Lesson 04 · Use Didit with MCP
  • 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.

Verify your first user today.

Start free

Free sandbox. Credit applies to work-email sign-ups.