> ## Documentation Index
> Fetch the complete documentation index at: https://portkey-docs-chore-bedrock-service-tier-support.mintlify.site/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-chore-bedrock-service-tier-support/x2UnRmyOWc7GYDqa/images/product/Guardrails/Acuvity.jpg?fit=max&auto=format&n=x2UnRmyOWc7GYDqa&q=85&s=05ebd0906e37b416f924ccaa87bbb9b0" 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-chore-bedrock-service-tier-support/x2UnRmyOWc7GYDqa/images/product/Guardrails/Aporia.jpg?fit=max&auto=format&n=x2UnRmyOWc7GYDqa&q=85&s=b95b9f94628b7895b369143ea3f7c724" 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-chore-bedrock-service-tier-support/x2UnRmyOWc7GYDqa/images/product/Guardrails/Azure.jpg?fit=max&auto=format&n=x2UnRmyOWc7GYDqa&q=85&s=c8c4d2979e06e1bd7b2f362bfee98f4f" 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-chore-bedrock-service-tier-support/x2UnRmyOWc7GYDqa/images/product/Guardrails/Bedrock.jpg?fit=max&auto=format&n=x2UnRmyOWc7GYDqa&q=85&s=e891deac163518bedfba56e58fc6d6ee" 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-chore-bedrock-service-tier-support/x2UnRmyOWc7GYDqa/images/product/Guardrails/Lasso.jpg?fit=max&auto=format&n=x2UnRmyOWc7GYDqa&q=85&s=8757103e0c3cea879ae0b80f738e6628" 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-chore-bedrock-service-tier-support/x2UnRmyOWc7GYDqa/images/product/Guardrails/Mistral-AI.jpg?fit=max&auto=format&n=x2UnRmyOWc7GYDqa&q=85&s=f9054f22ffedfe036086d56d40b6e456" 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-chore-bedrock-service-tier-support/x2UnRmyOWc7GYDqa/images/product/Guardrails/Pangea.jpg?fit=max&auto=format&n=x2UnRmyOWc7GYDqa&q=85&s=4940f23ad0a107114611173da9d4b7e1" 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-chore-bedrock-service-tier-support/x2UnRmyOWc7GYDqa/images/product/Guardrails/Patronus.jpg?fit=max&auto=format&n=x2UnRmyOWc7GYDqa&q=85&s=4b2d7f1d2186fd391ce213f407b6dfd5" 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-chore-bedrock-service-tier-support/x2UnRmyOWc7GYDqa/images/product/Guardrails/Pillar.jpg?fit=max&auto=format&n=x2UnRmyOWc7GYDqa&q=85&s=5b838ea4d38ce11ce5d873170d3f1840" 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-chore-bedrock-service-tier-support/x2UnRmyOWc7GYDqa/images/product/Guardrails/PromptSecurity.jpg?fit=max&auto=format&n=x2UnRmyOWc7GYDqa&q=85&s=88cd821f50561cba871ba8d6a9b04ca3" 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.
