Skip to main content
POST
/
guardrails
/
policy
/
batch
/
detect
Detect and filter content in multiple texts using a specific policy.
curl --request POST \
  --url https://api.enkryptai.com/guardrails/policy/batch/detect \
  --header 'Content-Type: application/json' \
  --header 'X-Enkrypt-Policy: <x-enkrypt-policy>' \
  --header 'apikey: <api-key>' \
  --data '
{
  "texts": [
    "<string>"
  ]
}
'
[
  {
    "text": "<string>",
    "summary": {
      "injection_attack": 123,
      "policy_violation": 123
    },
    "details": {
      "injection_attack": {
        "safe": "<string>",
        "attack": "<string>",
        "most_unsafe_content": "<string>"
      },
      "policy_violation": {
        "policy_violation": {
          "violating_policy": "<string>",
          "explanation": "<string>"
        }
      }
    }
  }
]

Authorizations

apikey
string
header
required

Headers

X-Enkrypt-Policy
string
required

Name of the policy to apply

Body

application/json
texts
string[]
required

A list of texts to analyze.

Response

200 - application/json

Batch detection results for the provided texts.

text
string
summary
object
details
object