Skip to main content
POST
/
guardrails
/
scan-pdf
Scan a PDF for security threats including injection attacks and policy violations.
curl --request POST \
  --url https://api.enkryptai.com/guardrails/scan-pdf \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "file": "<string>",
  "detectors": {}
}
'
{
  "summary": {
    "policy_violation": 0,
    "injection_attack": 0
  },
  "details": {
    "total_pages": 1,
    "pages_with_detections": 0,
    "detections": []
  }
}

Authorizations

apikey
string
header
required

Body

application/json
file
string
required

Base64-encoded PDF file content.

detectors
GuardrailsDetectorsObject ยท object

Response

200 - application/json

Scan results for the provided PDF.

summary
object
required

Summary counts of detections by detector type.

details
object
required

Detailed scan results including page-level information.