For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Lakera DashboardBook a Demo
HomeOverviewGuidesAPI ReferenceChangelogSupport
HomeOverviewGuidesAPI ReferenceChangelogSupport
  • Overview
    • API Overview
    • Guard
    • Guard Results
    • Kubernetes Probes
  • Lakera API
  • Platform API
      • POSTCreate policy
      • GETGet policy
      • PUTUpdate policy
      • DELDelete policy
LogoLogo
Lakera DashboardBook a Demo
Platform APIPolicies

Get policy

GET
https://platform.lakera.ai/api/v1-beta/policies/:policyId
GET
/api/v1-beta/policies/:policyId
$curl https://platform.lakera.ai/api/v1-beta/policies/policyId \
> -H "Authorization: Bearer <token>"
200Retrieved
1{
2 "name": "string",
3 "policy_mode": "IO",
4 "input_detectors": [
5 {
6 "type": "prompt_attack",
7 "threshold": "l1_confident",
8 "allowed_domains": [
9 "my-trusted-domain.com",
10 "another-safe-domain.com"
11 ]
12 }
13 ],
14 "output_detectors": [
15 {
16 "type": "prompt_attack",
17 "threshold": "l1_confident",
18 "allowed_domains": [
19 "my-trusted-domain.com",
20 "another-safe-domain.com"
21 ]
22 }
23 ]
24}
Was this page helpful?
Previous

Update policy

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication using API key. Generate an API key from the Lakera platform. Example: Bearer sk_123…

Path parameters

policyIdstringRequired

Response

Policy details
namestring
A descriptive name for the policy
policy_modeenum
Set to "IO" for screening model inputs and outputs
Allowed values:
input_detectorslist of objects
List of detector configurations to apply to LLM inputs
output_detectorslist of objects
List of detector configurations to apply to LLM outputs