error.code — the message field is human-readable but may be reworded between releases.
Detection endpoint errors
These codes apply toPOST /v1/liveness_detection, POST /v1/deepfake_detection, and POST /v1/unified_detection.
No 4xx error is ever charged.
422 codes are user-fixable — build your retake UX around them.Verification session endpoint errors
These codes apply toPOST /v1/verification_sessions, GET /v1/verification_sessions/session_info, POST /v1/verification_sessions/submit, GET /v1/verification_sessions/{id}, and GET /v1/verification_sessions/{id}/media.
Which submit errors consume an attempt
A session allows 3 capture attempts by default. Understanding which errors burn an attempt is important for building a robust retake flow:- Consume an attempt: errors caused by the capture itself —
413 IMAGE_TOO_LARGE, any422error, and400 NONCE_MISMATCH. - Refund the attempt: errors that aren’t the capture’s fault — bad form encoding,
402 INSUFFICIENT_CREDITS,502 UPSTREAM_ERROR— refund the attempt so server-side trouble never burns the user’s retry budget.
failed with failure_code: "ATTEMPTS_EXHAUSTED". At that point, create a new session to retry the verification.