Evaluate a capture
Detects injection attacks on an encrypted facial capture and returns a binary verdict. The required multipart field is capture.
Successful HTTP 200 responses return diagnostic (NoAttack or Attack), reason, transactionId and timestamp. An Attack verdict is a successful evaluation: it is returned with HTTP 200, not as an error.
When the analysis engine cannot evaluate the capture, the response is HTTP 400 with a normalized message (NoneBecause*, or ErrorProcessing for an unclassified failure). When the experimental replay mitigation is enabled at deployment time, captures older than the configured freshness window are rejected with HTTP 400 and the message Replay attack detected. When the license stopped being valid while the service runs, the response is HTTP 400 with Invalid license: <reason> (code: <code>) and the capture is not analyzed. When the analysis engine does not respond, the response is HTTP 503 with Engine communication error: <detail>.
JWT signed with HS256 and sent as Authorization: Bearer <jwt>. Only required when JWT authentication is enabled.
Encrypted facial capture generated by the Facephi capture component.
Evaluation verdict.
Public injection attack detection result. The order of the keys is not part of the contract, and clients must ignore unknown fields.
Binary verdict of the evaluation. It is the only field that must decide whether the capture is accepted; any value other than NoAttack must be treated as a rejection.
NoAttack: no injection attack was detected; the capture is accepted.Attack: an injection attack was detected; the capture is rejected.
NoAttackValores possíveis: Reason for the rejection. It is informative and must not be used to decide the outcome. When there are several reasons, only the first one is returned. The service converts the reasons reported by the analysis to PascalCase, so new values may appear; show a generic message for the ones you do not recognize.
Possible values:
None: the capture was accepted (NoAttack).Unknown: the capture was rejected without a specific reason reported by the analysis.UntrustedEnvironment: the capture was generated in an untrusted runtime environment.SuspiciousActivity: the device showed activity patterns associated with an attack.UntrustedDevice: the device could not be trusted to be what it claims to be.SdkIntegrityViolation: the capture SDK or its libraries appear to have been tampered with.UntrustedCorruptedPayload: the payload appears to be corrupted or tampered with.UntrustedContent: an injection attack was detected.UntrustedContentLowConfidence: signs of an injection attack were detected with lower confidence; the capture must still be treated as rejected.
NoneValores possíveis: Unique identifier of the evaluation (lowercase UUID v4). A new one is generated on every request, also when the same capture is retried.
f58dccd4-f2ce-4057-a99b-4dc916015745UTC instant at which the service started handling the request, in ISO-8601 format with milliseconds (YYYY-MM-DDTHH:mm:ss.SSSZ).
2026-09-24T09:04:03.776ZRequest validation error, capture the analysis engine could not evaluate, capture rejected by the replay mitigation, license that is not valid, or unclassified evaluation failure.
Capture errors are normalized in the public message field.
The authentication token is missing or invalid. Only returned when JWT authentication is enabled. The response includes the WWW-Authenticate header with the value Bearer.
The request body exceeds client_max_body_size. This response is produced by the HTTP server before the request reaches the service, so it does not carry the standard Facephi error body.
An unhandled internal error occurred.
The analysis engine does not respond: its process has stopped, is blocked or does not answer in time. The capture was not evaluated; retry later.
message is Engine communication error: followed by the detail: Too many retries when the engine still did not respond after the retries configured in engine_max_retries, or Connection failed or Request timeout when no retries are configured.
POST /api/v1/iad/evaluate HTTP/1.1
Host: 127.0.0.1:6982/
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 20
{
"capture": "binary"
}{
"diagnostic": "NoAttack",
"reason": "None",
"transactionId": "f58dccd4-f2ce-4057-a99b-4dc916015745",
"timestamp": "2026-09-24T09:04:03.776Z"
}Atualizado