AI Lakera Guard Policy

Log blocked request and response content

Configure the AI Lakera Guard policy to log the raw content of blocked requests and responses. When a request or response is blocked, the original prompt or response body is captured in the log entry under ai.proxy.lakera-guard.input_faulty_prompt and ai.proxy.lakera-guard.output_faulty_response.

Prerequisites

  • You have a Lakera account and an API key.

  • An existing AI Model.

  • An existing logging policy such as HTTP Log or File Log.

Environment variables

  • LAKERA_API_KEY: The API key for your Lakera account.

Set up the policy

Attach the policy

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!