Skip to main content
Walled AI provides an advanced guardrail system for your LLM applications, allowing you to enforce comprehensive safety checks, detect and redact PII, validate greetings, and perform custom compliance checks. To get started with Walled AI, visit their website:

Using Walled AI with Portkey

1. Add Walled AI Credentials to Portkey

  • Click on the Admin Settings button on Sidebar
  • Navigate to Plugins tab 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 Guardrails page and click the Create button
  • Search for “Walled AI Guardrail” and click Add
  • Set any actions you 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 NameDescriptionSupported Hooks
Walled AI GuardrailEnsure the safety and compliance of your LLM inputs and outputsbeforeRequestHook
afterRequestHook
Parameters:
ParameterTypeDescriptionDefault
generic_safety_checkbooleanEnable generic safety checks on the text input.true
greetings_listarrayList of greetings to be used in the guardrail check.["Casual & Friendly"]
pii_listarrayPII types that should be checked in the input text.(All PII types)
compliance_listarrayCompliance 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_guardrails or output_guardrails params 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.
Here’s an example configuration:
{
  "input_guardrails": ["guardrails-id-xxx"],
  "output_guardrails": ["guardrails-id-yyy"]
}
const portkey = new Portkey({
    apiKey: "PORTKEY_API_KEY",
    config: "pc-***" // Supports a string config id or a config object
});
For more, refer to the Config documentation. Your requests are now guarded by Walled AI’s protection mechanisms, and you can see the verdict and any actions taken directly in your Portkey logs!

Get Support

If you face any issues with the Walled AI integration, join the Portkey community forum for assistance.
Last modified on March 7, 2026