Portkey

Overview

Akto integrates with Portkey AI Gateway to provide comprehensive security guardrails for AI applications. This integration enables automatic guardrail detection and prevention at both the request and response stages of LLM interactions.

What is Portkey?

Portkey is an AI gateway that routes requests to various LLM providers (OpenAI, Anthropic, etc.) and provides a unified interface for managing AI infrastructure. Learn more at portkey.aiarrow-up-right.

Key Benefits

  • Guardrails: Identify prompt injection, data leakage, and other LLM-specific attacks

  • Flexible Response Actions: Block, sanitize, alert, or log suspicious activity

  • Transparent Integration: Works seamlessly with existing Portkey configurations

  • Centralized Management: Configure guardrails from Portkey's admin dashboard

Architecture

The integration operates as a Portkey plugin that hooks into two critical lifecycle points:

spinner

Setup Guide

1

Prerequisites

Ensure the following requirements are available:

  • Access to Portkey AI Gateway (v2.0.0 or later)

  • Administrative access to Portkey settings

  • Akto API key

  • Akto API domain

2

Configure Akto Credentials in Portkey

  1. Log in to your Portkey dashboard

  2. Navigate to Admin SettingsPlugins

  3. Find the Akto plugin section

  4. Enter the following credentials:

    • Akto API Key: Your Akto API key from the dashboard

    • Akto API Domain: Your Akto Agentic component domain (e.g., api.akto.io)

  5. Click Save to activate the plugin.

3

Obtain Guardrail IDs from Our Support

Guardrails are pre-configured and managed by the Akto team. To get the guardrail IDs for your specific guardrail detection needs:

  1. Contact Akto Support at [email protected]envelope or through your account manager,

  2. Our team will provide you with:

    • Input Guardrail IDs: For request-level scanning

    • Output Guardrail IDs: For response-level scanning

    • Configuration details and any specific requirements

4

Create a Portkey Configuration with Akto Guardrails

Define a reusable configuration that includes guardrails and model settings.

  1. Navigate to Portkey Configurations

  2. Create a new configuration

  3. Add:

    • Input guardrails: List of Akto guardrail IDs

    • Output guardrails: List of Akto guardrail IDs

  4. Configure:

    • Provider (for example: OpenAI)

    • Model (for example: gpt-4)

  5. Save the configuration

Portkey generates a config ID.

5

Use Config ID in API Requests

You now attach the Portkey configuration at the client level using the generated config ID. The config ID encapsulates Akto guardrails and model settings.

For more guidance, refer to the Portkey Configarrow-up-right.

You can now route all LLM traffic through Portkey with Akto guardrails enforced.

Troubleshooting

Issue: Guardrails Not Applied

Symptoms: Requests passing without guardrail validation

Solutions:

  1. Verify guardrail IDs in configuration match Portkey records

  2. Check Akto credentials are correctly configured in Portkey

  3. Confirm Akto plugin is enabled in Admin Settings

  4. Check network connectivity to Akto service

Issue: Legitimate Requests Being Blocked

Symptoms: Valid requests returning 403 errors

Solutions:

  1. Review blocked request details in logs

  2. Adjust guardrail sensitivity settings

  3. Temporarily switch BLOCK action to ALERT for analysis

  4. Contact Akto support with examples

Issue: Performance Degradation

Symptoms: Increased latency in API requests

Solutions:

  1. Reduce number of guardrails applied

  2. Use caching for repeated queries

  3. Monitor Akto service health

  4. Consider separating critical vs. non-critical paths

Issue: Akto Service Unavailable

Symptoms: Errors about inability to reach Akto

Solutions:

  1. Check network firewall rules allow Akto domain

  2. Verify API key is valid and not expired

  3. Check Akto service status page

  4. Configure fallback policy (fail open/closed)

Get Support for your Akto setup

There are multiple ways to request support from Akto. We are 24X7 available on the following:

  1. In-app intercom support. Message us with your query on intercom in Akto dashboard and someone will reply.

  2. Join our discord channelarrow-up-right for community support.

  3. Contact [email protected]envelope for email support.

  4. Contact us herearrow-up-right.

Last updated