Skip to main content

Guardrails

Where to find it in the UI

  • Sidebar: "Guardrails"
  • Tab: "Guardrails"

Purpose

Guardrails protect requests before they are sent to an LLM provider.
They are used to mask sensitive information, block unsafe input, and enforce safety policies.

All guardrails in LLMrouter currently operate in Pre-processing mode.

Guardrail Types

LLMrouter supports multiple guardrail types, including redaction and content safety mechanisms.

View Guardrail Details

Initial State

When first visiting the Guardrails page:

  • No guardrails are assigned to API keys by default
  • Guardrails are inactive until explicitly assigned
Guardrails OverviewGuardrails Overview

Figure 1: Guardrails Overview

Create Guardrail

To create a new guardrail:

  1. Click Create Guardrail
  2. Enter a name and description
  3. Select the guardrail type
  4. Choose the enforcement mode
  5. Save the guardrail
Create Guardrail DialogCreate Guardrail Dialog

Figure 2: Create Guardrail Dialog

Apply Guardrails to API Keys

Guardrails are enforced per API key.
To activate a guardrail, it must be explicitly assigned to one or more API keys.

Where to apply

You can apply a guardrail directly from the Guardrails overview:

  1. Open Guardrails.
  2. Locate the guardrail you want to apply.
  3. Click the more actions menu.
  4. Select Apply to API Keys.
Assign API Key to GuardrailsAssign API Key to Guardrails

Figure 4: Accessing “Apply to API Keys” from the Guardrails list

Apply Dialog

The Apply Guardrail to API Keys dialog allows you to assign or unassign the selected guardrail to multiple API keys at once.

Assign API Key to GuardrailsAssign API Key to Guardrails

Figure 5: API Key options

  • The list shows all available API keys
  • You can search API keys.
  • Select Api keys and click save.

Assigning Guardrails to an API Key

To assign a guardrail:

  1. Navigate to the API Key Assignment section in the LLMrouter dashboard.
  2. Locate the API key you want to apply the guardrail to.
  3. Click the more actions menu.
  4. Click “Manage guardrail for this API key.”
Assign Guardrails to API KeyAssign Guardrails to API Key

Figure 6: Guardrail options

After saving:

  • The guardrail becomes active for the selected API keys.
  • All requests made with those keys are evaluated against the guardrail.
  • Enforcement starts immediately.

Unassign Guardrails from API Keys

To unassign a guardrail from an API key:

  1. In the dialog, uncheck the API key you want to remove the guardrail from
  2. Click Save

The guardrail is unassigned from the API key immediately after saving.