Skip to main content
New to RAXE? Start with the Quickstart and learn how detection works.

Overview

RAXE integrates with Portkey AI Gateway to provide security scanning as a custom webhook guardrail. Portkey is an AI gateway that routes requests to 200+ LLMs with built-in observability, caching, and guardrails. RAXE offers two integration patterns:

Installation

Option 1: Webhook Guardrail

Use RAXE as a custom webhook guardrail that Portkey calls for input/output validation.

Create the Webhook Endpoint

Configure Portkey

Add RAXE as a webhook guardrail in your Portkey config:

Blocking Mode

Enable blocking to return verdict: false on threats:

Response Format

RAXE returns Portkey-compatible verdicts:
When threats are detected (with blocking enabled):

Option 2: Client Wrapper

Scan requests locally before they go through Portkey:

Blocking Mode

Direct Scan and Call

For more control, use scan_and_call:

Configuration

Error Handling

Statistics

Track scanning statistics:

Flask Integration

Best Practices

Monitor threats before enabling blocking:
Choose blocking threshold based on risk tolerance:
Portkey webhook requests timeout after 3 seconds. RAXE’s fail_open=True (default) returns a pass verdict if scanning takes too long or errors:

Combining with Portkey Features

RAXE works alongside Portkey’s other features:

Supported Versions

What’s Next

Production Checklist

Deploy RAXE safely to production

Common Patterns

Error handling, logging, and production patterns