Lasso Security provides comprehensive protection for your GenAI applications against various security threats including prompt injections, data leaks, and other potential risks that could compromise your AI systems. To get started with Lasso Security, visit their documentation:Documentation Index
Fetch the complete documentation index at: https://portkey-docs-mintlify-gateway-updates-1774431741.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Get Started with Lasso Security
Using Lasso with Portkey
1. Add Lasso credentials to Portkey
- Navigate to the
Integrationspage underSettings - Click on the edit button for the Lasso integration
- Add your Lasso API Key (obtain this from your Lasso Security account)
- Optionally, set a custom API Endpoint if you use a dedicated Lasso deployment (defaults to
https://server.lasso.security)
2. Add Lasso’s guardrail check
- Navigate to the
Guardrailspage and click theCreatebutton - Search for “Classifier” and click
Add - Set any
actionsyou want on your check, and create the Guardrail!
Guardrail Actions allow you to orchestrate your guardrails logic. You can learn more about them here
| Check Name | Description | Parameters | Supported Hooks |
|---|---|---|---|
| Classifier | Classifies content for security risks using Lasso Security’s Deputies v3 API. Returns detailed findings with action types (BLOCK, WARN, AUTO_MASKING) and severity levels. | messages (array), conversationId (string, optional), userId (string, optional) | beforeRequestHook, afterRequestHook |
3. Add Guardrail ID to a Config and Make Your Request
- When you save a Guardrail, you’ll get an associated Guardrail ID - add this ID to the
input_guardrailsoroutput_guardrailsparams in your Portkey Config - Create these Configs in Portkey UI, save them, and get an associated Config ID to attach to your requests. More here.
- NodeJS
- Python
- OpenAI NodeJS
- OpenAI Python
- cURL
Verdict behavior
The Lasso plugin uses the Deputies v3 API and determines whether to block a request based onviolations_detected and the action field in findings:
| Scenario | Verdict | Behavior |
|---|---|---|
| No violations detected | Allow | Request passes through |
Violations with BLOCK action | Block | Request is blocked |
Violations with only WARN actions | Allow | Request passes through, findings included in response data |
Violations with only AUTO_MASKING actions | Allow | Request passes through, findings included in response data |
| API error | Block | Request is blocked (fail-safe) |
Key security features
Lasso Security’s Deputies analyze content for various security risks across multiple categories:- Prompt Injections: Detects attempts to manipulate AI behavior through crafted inputs
- Data Leaks: Prevents sensitive information from being exposed through AI interactions
- Jailbreak Attempts: Identifies attempts to bypass AI safety mechanisms
- Custom Policy Violations: Enforces your organization’s specific security policies
- Harmful Content Detection: Flags sexual content, hate speech, illegal content, and more

