Skip to main content
Akto provides advanced threat detection and security scanning for your AI applications, protecting against prompt injection, sensitive data leakage, and other LLM security threats. To get started with Akto, visit their website:

Get Started with Akto

Using Akto with Portkey

1. Add Akto 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 Akto integration
  • Add your Akto API Key and API Domain (obtain these from your Akto account)

2. Add Akto’s Guardrail Check

  • Navigate to the Guardrails page and click the Create button
  • Search for “Akto Guardrail” and click Add
  • Set any actions you 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 NameDescriptionParametersSupported Hooks
Akto GuardrailScans and validates LLM inputs and outputs for security threatsNonebeforeRequestHook, 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 before_request_hooks or after_request_hooks 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 Akto’s security scanning, and you can see the verdict and any actions taken directly in your Portkey logs!

Get Support

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