Using Walled AI with Portkey
1. Add Walled AI Credentials to Portkey
- Click on the
Admin Settingsbutton on Sidebar - Navigate to
Pluginstab under Organisation Settings - Click on the edit button for the Walled AI integration
- Add your Walled AI API Key (obtain this from your Walled AI dashboard)
2. Add Walled AI’s Guardrail Check
- Navigate to the
Guardrailspage and click theCreatebutton - Search for “Walled AI Guardrail” and click
Add - Set any
actionsyou want on your check, configure the parameters, and create the Guardrail!
Guardrail Actions allow you to orchestrate your guardrails logic. You can learn more about them here
| Check Name | Description | Supported Hooks |
|---|---|---|
| Walled AI Guardrail | Ensure the safety and compliance of your LLM inputs and outputs | beforeRequestHookafterRequestHook |
| Parameter | Type | Description | Default |
|---|---|---|---|
generic_safety_check | boolean | Enable generic safety checks on the text input. | true |
greetings_list | array | List of greetings to be used in the guardrail check. | ["Casual & Friendly"] |
pii_list | array | PII types that should be checked in the input text. | (All PII types) |
compliance_list | array | Compliance checks to be performed on the text input. | [] |
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

