Get Started with Acuvity AI
Using Acuvity with Portkey
1. Add Acuvity Credentials to Portkey
- Navigate to the Integrationpage underSidebar
- Click on the edit button for the Acuvity integration
- Add your Acuvity API Key
2. Add Acuvity’s Guardrail Check
- Navigate to the Guardrailspage and click theCreatebutton
- Search for Acuvity Scan and click Add
- Configure your guardrail settings: toxicity, jail break, biased etc.
- Set any actionsyou want on your check, and create the Guardrail!
Guardrail Actions allow you to orchestrate your guardrails logic. You can learn them here
| Check Name | Description | Parameters | Supported Hooks | 
|---|---|---|---|
| Acuvity Scan | Comprehensive content safety and security checks | Prompt Injection,Toxicity,Jail Break,Malicious Url,Biased,Harmful,Language,PII,Secrets,Timeout | 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
Using Raw Guardrails with Acuvity
You can define Acuvity guardrails directly in your code for more programmatic control without using the Portkey UI. This “raw guardrails” approach lets you dynamically configure guardrails based on your application’s needs.We recommend that you create guardrails using the Portkey UI whenever possible. Raw guardrails are more complex and require you to manage credentials and configurations directly in your code.
Key Configuration Properties
Key Configuration Properties
Available Acuvity Guardrails
| Guardrail Name | ID | Description | Parameters | 
|---|---|---|---|
| Acuvity Scan | acuvity.scan | Comprehensive content safety and security checks | Prompt Injection,Toxicity,Jail Break,Malicious Url,Biased,Harmful,Language,PII,Secrets,Timeout | 
Implementation Examples
Key Configuration Properties
Key Configuration Properties
- type: Always set to- "guardrail"for guardrail checks
- id: A unique identifier for your guardrail
- credentials: Authentication details for Acuvity- api_key: Your Acuvity API key
 
- checks: Array of guardrail checks to run- id: The specific guardrail ID from the table above
- parameters: Configuration options specific to each guardrail
 
- deny: Whether to block the request if guardrail fails (true/false)
- async: Whether to run guardrail asynchronously (true/false)
- on_success/- on_fail: Optional callbacks for success/failure scenarios- feedback: Data for logging and analytics
- weight: Importance of this feedback (0-1)
- value: Feedback score (-10 to 10)
 
When using raw guardrails, you must provide valid credentials for the Acuvity service directly in your config. Make sure to handle these credentials securely and consider using environment variables or secrets management.

