Screen content for threats
Authentication
Bearer authentication using API key. Generate an API key from the AI Guardrails Dashboard. Example: Bearer sk_123…
Request
List of messages comprising the interaction history with the LLM in OpenAI API Chat Completions format. Can be multiple messages of any role: user, assistant, system, tool, or developer.
Metadata tags can be attached to screening requests as an object that can contain any arbitrary key-value pairs. Common use cases include specifying the user or session ID.
Response
Depends on the action configured for the project. If action is enforce, flagged is true if any threats were detected with sufficient confidence. But if action is detect, flagged is always false. See Project Mode for more details.
The action configured for the project screening this request. enforce means full enforcement: the top-level flagged is true whenever a detector triggers. detect surfaces detections in the breakdown but forces the top-level flagged to false, letting you observe detector behavior without blocking traffic. Configured on the project level.
Contains detected PII, profanity, or custom regex matches with their locations. Only returned if payload=true in request.
List of detectors run and their results. Only returned if breakdown=true in request.
Build information. Only returned if dev_info=true in request.