Lakera Guard screens prompts and responses via theDocumentation Index
Fetch the complete documentation index at: https://docs.portkey.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
/v2/guard API — blocking on policy hits and redacting PII spans when only pii/* detectors fire.
Requires Backend
v1.16.2+.Using Lakera with Portkey
1. Add Lakera Credentials to Portkey
- Navigate to
Admin Settings→Plugins - Edit the Lakera integration
- Add your Lakera API Key (create a Guard API key at platform.lakera.ai)
- Optionally set API Base URL (defaults to
https://api.lakera.ai)
2. Add Lakera Guardrail Check
- Navigate to
Guardrails→Create - Search for “Lakera Guard” and click
Add - Configure:
- Lakera Project ID (
projectID, optional) — project whose policy defines detectors to run - Payload End Offset Is Inclusive (
endInclusive, defaultfalse) - Timeout (
timeout, default30000ms)
- Lakera Project ID (
- Set guardrail actions and create the guardrail
| Check Name | Description | Parameters | Supported Hooks |
|---|---|---|---|
| Lakera Guard | Calls Lakera /v2/guard with payload+breakdown | projectID, endInclusive, timeout | beforeRequestHook, afterRequestHook |

