The Layerup Security SDK can be used to intercept threats in both prompts and responses, mask PII & sensitive data, and handle incident management for LLM calls.
LAYERUP_API_KEY
.
layerup.abuse
guardrail will compare requests per minute to the specified thresholds, and if exceeded, will mark an LLM call as unsafe.project_rpm
- if a project-level threshold is set, then all requests to the project will be measured. If the project’s RPM exceeds the given threshold, the LLM call will be marked as unsafe.customer_rpm
- if a customer-level threshold is set, then all requests made by the customer will be measured for a given project. If the customer’s RPM exceeds the given threshold, the LLM call will be marked as unsafe.scope_rpm
- if a scope-level threshold is set, then all requests made for the scope will be measured for a given project. If the scope’s RPM exceeds the given threshold (regardless of customer), the LLM call will be marked as unsafe.customer_scope_rpm
- if a customer-scope-level threshold is set, then all requests made by the customer for a given scope will be measured for a project. If the customer’s RPM exceeds the given threshold for the given scope, the LLM call will be marked as unsafe.