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)
2. Add Lasso’s Guardrail Check
- Navigate to the
Guardrailspage and click theCreatebutton - Search for “Scan Content” and click
Add - Set the timeout in milliseconds (default: 10000ms)
- 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 |
|---|---|---|---|
| Scan Content | Lasso Security’s Deputies analyze content for various security risks including jailbreak attempts, custom policy violations, sexual content, hate speech, illegal content, and more. Returns structured findings with action levels (BLOCK, AUTO_MASKING, WARN). | Timeout (number) | beforeRequestHook |
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
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
BLOCK, AUTO_MASKING, or WARN), and severity. Requests are blocked when any finding has a BLOCK action.
Supported Request Types
Lasso works across multiple request types:- Chat Completions (
/v1/chat/completions) - Messages (Anthropic-style)
- Completions (
/v1/completions) - Embeddings (
/v1/embeddings)
Self-Hosted Lasso Endpoint
If you are running a self-hosted Lasso deployment, you can configure a customapiEndpoint in your Lasso credentials to point to your own instance instead of the default Lasso cloud.
Learn more about Lasso Security’s features here.

