For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Pular para o conteúdo

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>.

post
Autorizações
AuthorizationstringObrigatório

JWT signed with HS256 and sent as Authorization: Bearer <jwt>. Only required when JWT authentication is enabled.

Corpo
capturestring · binaryObrigatório

Encrypted facial capture generated by the Facephi capture component.

Respostas
200

Evaluation verdict.

application/json

Public injection attack detection result. The order of the keys is not part of the contract, and clients must ignore unknown fields.

diagnosticstring · enumObrigatório

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.
Example: NoAttackValores possíveis:
reasonstring · enumObrigatório

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.
Example: NoneValores possíveis:
transactionIdstring · uuidObrigatório

Unique identifier of the evaluation (lowercase UUID v4). A new one is generated on every request, also when the same capture is retried.

Example: f58dccd4-f2ce-4057-a99b-4dc916015745
timestampstring · date-timeObrigatório

UTC instant at which the service started handling the request, in ISO-8601 format with milliseconds (YYYY-MM-DDTHH:mm:ss.SSSZ).

Example: 2026-09-24T09:04:03.776Z
post/api/v1/iad/evaluate
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