> ## Documentation Index
> Fetch the complete documentation index at: https://docs.portkey.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List of Guardrail Checks

Each Guardrail Check has a specific purpose, it's own parameters, supported hooks, and sources.

## Partner Guardrails

<CardGroup cols={3}>
  <Card title="Acuvity" href="/integrations/guardrails/acuvity" img="https://mintcdn.com/portkey-docs/wAHXB_jjwLt8bYcN/images/product/Guardrails/Acuvity.jpg?fit=max&auto=format&n=wAHXB_jjwLt8bYcN&q=85&s=37349c5d9950c465895d3fc0ad34dbfe" width="798" height="549" data-path="images/product/Guardrails/Acuvity.jpg">
    * Scan prompts and responses for security threats
    * Detect PII, toxicity, and prompt injections
    * Real-time content analysis and filtering
  </Card>

  <Card title="Aporia" href="/integrations/guardrails/aporia" img="https://mintcdn.com/portkey-docs/wAHXB_jjwLt8bYcN/images/product/Guardrails/Aporia.jpg?fit=max&auto=format&n=wAHXB_jjwLt8bYcN&q=85&s=4f65646a8721789e6a3134ded9d731fb" width="798" height="549" data-path="images/product/Guardrails/Aporia.jpg">
    * Validate custom Aporia policies via project ID
    * Define policies on your Aporia dashboard
    * Seamless integration with Portkey checks
  </Card>

  <Card title="Azure" href="/integrations/guardrails/azure-guardrails" img="https://mintcdn.com/portkey-docs/wAHXB_jjwLt8bYcN/images/product/Guardrails/Azure.jpg?fit=max&auto=format&n=wAHXB_jjwLt8bYcN&q=85&s=5d4e0a83a3c90193422d482a180a8d9f" alt="Azure OpenAI" width="798" height="549" data-path="images/product/Guardrails/Azure.jpg">
    * Detect and redact sensitive PII data
    * Apply Azure's comprehensive content safety checks
    * Enterprise-grade security compliance
  </Card>

  <Card title="AWS Bedrock" href="/integrations/guardrails/bedrock-guardrails" img="https://mintcdn.com/portkey-docs/wAHXB_jjwLt8bYcN/images/product/Guardrails/Bedrock.jpg?fit=max&auto=format&n=wAHXB_jjwLt8bYcN&q=85&s=0260740d53b4c6ece7632cfa20d5cceb" width="798" height="549" data-path="images/product/Guardrails/Bedrock.jpg">
    * Analyze and redact PII to prevent manipulation
    * Integrate AWS Guardrails directly in Portkey
    * Advanced security policy enforcement
  </Card>

  <Card title="Lasso Security" href="/integrations/guardrails/lasso" img="https://mintcdn.com/portkey-docs/VWP2Y8zxPP5N4jE6/images/product/Guardrails/Lasso.jpg?fit=max&auto=format&n=VWP2Y8zxPP5N4jE6&q=85&s=587e455c6b0984419570b5ee33760261" width="798" height="549" data-path="images/product/Guardrails/Lasso.jpg">
    * Analyze content for security risks and jailbreaks
    * Enforce custom policy violations detection
    * AI-powered threat detection and prevention
  </Card>

  <Card title="Mistral" href="/integrations/guardrails/mistral" img="https://mintcdn.com/portkey-docs/VWP2Y8zxPP5N4jE6/images/product/Guardrails/Mistral-AI.jpg?fit=max&auto=format&n=VWP2Y8zxPP5N4jE6&q=85&s=484f1e88353f474600a3176802acaf27" width="798" height="549" data-path="images/product/Guardrails/Mistral-AI.jpg">
    * Detect and filter harmful content automatically
    * Multi-dimensional content safety analysis
    * Real-time moderation capabilities
  </Card>

  <Card title="Pangea" href="/integrations/guardrails/pangea" img="https://mintcdn.com/portkey-docs/VWP2Y8zxPP5N4jE6/images/product/Guardrails/Pangea.jpg?fit=max&auto=format&n=VWP2Y8zxPP5N4jE6&q=85&s=45eb1e1e136ce07de974c033e3975799" width="798" height="549" data-path="images/product/Guardrails/Pangea.jpg">
    * Guard LLM inputs and outputs with Text Guard
    * Detect malicious content and data transfers
    * Prevent model manipulation attempts
  </Card>

  <Card title="Patronus" href="/integrations/guardrails/patronus-ai" img="https://mintcdn.com/portkey-docs/VWP2Y8zxPP5N4jE6/images/product/Guardrails/Patronus.jpg?fit=max&auto=format&n=VWP2Y8zxPP5N4jE6&q=85&s=b4d0ffce8d0854057448220f48e7533e" width="798" height="549" data-path="images/product/Guardrails/Patronus.jpg">
    * Detect hallucinations and factual errors
    * Assess quality: conciseness, helpfulness, tone
    * Identify gender and racial bias in outputs
  </Card>

  <Card title="Pillar" href="/integrations/guardrails/pillar" img="https://mintcdn.com/portkey-docs/VWP2Y8zxPP5N4jE6/images/product/Guardrails/Pillar.jpg?fit=max&auto=format&n=VWP2Y8zxPP5N4jE6&q=85&s=4692617ebc7ae9a56f4beca8ff225027" width="798" height="549" data-path="images/product/Guardrails/Pillar.jpg">
    * Scan prompts and responses comprehensively
    * Detect PII, toxicity, and injection attacks
    * Enterprise security and compliance features
  </Card>

  <Card title="Prompt Security" href="/integrations/guardrails/prompt-security" img="https://mintcdn.com/portkey-docs/VWP2Y8zxPP5N4jE6/images/product/Guardrails/PromptSecurity.jpg?fit=max&auto=format&n=VWP2Y8zxPP5N4jE6&q=85&s=7d09d76b4c0ca0951d9dad5fb1673322" width="798" height="549" data-path="images/product/Guardrails/PromptSecurity.jpg">
    * Scan prompts for security vulnerabilities
    * Analyze responses for policy violations
    * Advanced threat detection and mitigation
  </Card>
</CardGroup>

The logic for all of the Guardrail Checks (including Partner Guardrails) is open source.

<Info>
  View it [here](https://github.com/Portkey-AI/gateway/tree/feat/plugins/plugins/default) and [here](https://github.com/Portkey-AI/gateway/tree/feat/plugins/plugins/portkey) on the Portkey Gateway repo.
</Info>

## Bring Your Own Guardrail

We have built Guardrails in a very modular way, and support bringing your own Guardrail using a custom webhook! [Learn more here](/integrations/guardrails/bring-your-own-guardrails).

## Portkey's Guardrails

Along with the partner Guardrails, there are also deterministic as well as LLM-based Guardrails supported natively by Portkey.

<Note>
  `BASIC` Guardrails are available on all Portkey plans.<br /><br />
  `PRO` Guardrails are available on Portkey Pro & Enterprise plans.
</Note>

### `BASIC` — Deterministic Guardrails

<CardGroup cols={2}>
  <Card title="Regex Match">
    <br />

    Checks if the request or response text matches a regex pattern.<br /><br />
    **Parameters**: rule: `string`<br />
    **Supported On**: `input_guardrails`, `output_guardrails`
  </Card>

  <Card title="Sentence Count">
    <br />

    Checks if the content contains a certain number of sentences. Ranges allowed.<br /><br />
    **Parameters**: minSentences: `number`, maxSentences: `number`<br />
    **Supported On**: `input_guardrails`, `output_guardrails`
  </Card>

  <Card title="Word Count">
    <br />

    Checks if the content contains a certain number of words. Ranges allowed.<br /><br />
    **Parameters**: minWords: `number`, maxWords: `number`<br />
    **Supported On**: `input_guardrails`, `output_guardrails`
  </Card>

  <Card title="Character Count">
    <br />

    Checks if the content contains a certain number of characters. Ranges allowed.<br /><br />
    **Parameters**: minCharacters: `number`, maxCharacters: `number`<br />
    **Supported On**: `input_guardrails`, `output_guardrails`
  </Card>

  <Card title="JSON Schema">
    <br />

    Check if the response JSON matches a JSON schema.<br /><br />
    **Parameters**: schema: `json`<br />
    **Supported On**: `output_guardrails` only
  </Card>

  <Card title="JSON Keys">
    <br />

    Check if the response JSON contains any, all or none of the mentioned keys.<br /><br />
    **Parameters**: keys: `array`, operator: `string`<br />
    **Supported On**: `output_guardrails` only
  </Card>

  <Card title="Contains">
    <br />

    Checks if the content contains any, all or none of the words or phrases.<br /><br />
    **Parameters**: words: `array`, operator: `string`<br />
    **Supported On**: `output_guardrails` only
  </Card>

  <Card title="Valid URLs">
    <br />

    Checks if all the URLs mentioned in the content are valid<br /><br />
    **Parameters**: onlyDNS: `boolean`<br />
    **Supported On**: `output_guardrails` only
  </Card>

  <Card title="Contains Code">
    <br />

    Checks if the content contains code of format SQL, Python, TypeScript, etc.<br /><br />
    **Parameters**: format: `string`<br />
    **Supported On**: `output_guardrails` only
  </Card>

  <Card title="Lowercase Detection">
    <br />

    Check if the given string is lowercase or not.<br /><br />
    **Parameters**: format: `string`<br />
    **Supported On**: `input_guardrails`, `output_guardrails`
  </Card>

  <Card title="Ends With">
    <br />

    Check if the content ends with a specified string.<br /><br />
    **Parameters**: Suffix: `string`<br />
    **Supported On**: `input_guardrails`, `output_guardrails`
  </Card>

  <Card title="Webhook">
    <br />

    Makes a webhook request for custom guardrails<br /><br />
    **Parameters**: webhookURL: `string`, headers: `json`<br />
    **Supported On**: `input_guardrails`, `output_guardrails`
  </Card>

  <Card title="JWT Token Validator">
    <br />

    Check if the JWT token is valid.

    <br />

    **Parameters**:
    JWKS URI: `string`,
    Header Key: `string`,
    Cache Max Age: `number`,
    Clock Tolerance: `number`,
    Max Token Age: `number` (in seconds)

    **Supported On**: `input_guardrails`
  </Card>

  <Card title="Model Whitelist">
    <br />

    Check if the inference model to be used is in the whitelist.

    <br />

    **Parameters**:
    Models: `array`, Inverse: `boolean`

    **Supported On**: `input_guardrails`
  </Card>
</CardGroup>

### `PRO` — LLM Guardrails

<CardGroup cols={2}>
  <Card title="Moderate Content">
    <br />

    Checks if the content passes the mentioned content moderation checks.<br /><br />
    **Parameters**: categories: `array`<br />
    **Supported On**: `input_guardrails` only
  </Card>

  <Card title="Check Language">
    <br />

    Checks if the response content is in the mentioned language.<br /><br />
    **Parameters**: language: `string`<br />
    **Supported On**: `input_guardrails` only
  </Card>

  <Card title="Detect PII">
    <br />

    Detects Personally Identifiable Information (PII) in the content.<br /><br />
    **Parameters**: categories: `array`<br />
    **Supported On**: `input_guardrails`, `output_guardrails`
  </Card>

  <Card title="Detect Gibberish">
    <br />

    Detects if the content is gibberish.<br /><br />
    **Parameters**: `boolean`<br />
    **Supported On**: `input_guardrails`, `output_guardrails`
  </Card>
</CardGroup>

<Note>
  You can now have configurable timeouts for Partner & Pro Guardrails!
</Note>

## Contribute Your Guardrail

Integrate your Guardrail platform with Portkey Gateway and reach our growing user base.
Check out some [existing integrations](https://github.com/portkey-ai/gateway) to get started.
