Create policy

Create a new policy configuration

Authentication

AuthorizationBearer

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

Request

This endpoint expects an object.
namestringRequired
A descriptive name for the policy
policy_modeenumRequired
Set to "IO" for screening model inputs and outputs
Allowed values:
input_detectorslist of objectsRequired
List of detector configurations to apply to LLM inputs
output_detectorslist of objectsRequired
List of detector configurations to apply to LLM outputs

Response

Policy created successfully
statusenum or null
Response status
Allowed values:
messagestring or null

Human-readable response message

idstring or null
Policy ID
dataobject or null
Policy details