Lakera Guard API
Lakera Guard's runtime screening API. POST OpenAI-style chat messages to /v2/guard and receive a `flagged` decision based on the policy assigned to the project, with optional per-detector breakdown and payload-level PII/profanity match locations. Detectors cover prompt attacks, data leakage, PII, content violations, and unknown links across 100+ languages with sub-50ms latency. A second endpoint, /v2/guard/results, returns detector confidence levels (L1–L5) for offline analysis and threshold tuning without contributing to runtime screening logs.
Documentation
Documentation
https://docs.lakera.ai/docs/api/guard
GettingStarted
https://docs.lakera.ai/docs/quickstart
Documentation
https://docs.lakera.ai/api-reference/lakera-api/guard/screen-content
Specifications
Examples
Example
https://raw.githubusercontent.com/api-evangelist/lakera-ai/refs/heads/main/examples/lakera-guard-screen-content-example.json
Example
https://raw.githubusercontent.com/api-evangelist/lakera-ai/refs/heads/main/examples/lakera-guard-results-example.json
Schemas & Data
JSONSchema
https://raw.githubusercontent.com/api-evangelist/lakera-ai/refs/heads/main/json-schema/lakera-guard-request-schema.json
JSONSchema
https://raw.githubusercontent.com/api-evangelist/lakera-ai/refs/heads/main/json-schema/lakera-guard-response-schema.json
JSONStructure
https://raw.githubusercontent.com/api-evangelist/lakera-ai/refs/heads/main/json-structure/lakera-guard-request-structure.json