> ## 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.

# F5 Guardrails

> F5 Guardrails (powered by CalypsoAI) provides advanced content moderation and PII detection capabilities for your LLM inputs and outputs.

[F5 Guardrails](https://calypsoai.com/) (formerly CalypsoAI) provides a sophisticated content moderation service that enables users to detect harmful text content and PII across multiple policy dimensions, helping to secure LLM applications and ensure safe AI interactions.

## Using F5 Guardrails with Portkey

### 1. Add F5 Guardrails Credentials to Portkey

* Navigate to the `Plugins` page under `Admin Settings`
* Click on the edit button for the **F5 Guardrails** integration
* Add your **F5 Guardrails API Key** (obtain this from your F5/CalypsoAI account)
* (Optional) Add your F5 Gaurdrail API URL, defaults to [https://us1.calypsoai.app](https://us1.calypsoai.app).

### 2. Add F5 Guardrails Check

* Navigate to the `Guardrails` page and click the `Create` button
* Search for "F5 Guardrails" and click `Add`
* Configure your moderation checks:
  * **Project ID**: Your F5 Guardrails project identifier (Required)
  * **Redact**: Whether to redact PII data detected by the guardrail. When enabled, detected PII will be masked in the content (Default: `false`)
  * **Timeout**: The timeout in milliseconds for the scan (Default: `5000`)
  * **Override Credentials** (optional, Backend `v1.16.0+`): Workspace-specific credentials that override the organisation-level integration. Useful when different workspaces need to use separate F5/CalypsoAI accounts.
    * `apiKey` — workspace-specific F5 Guardrails API key
    * `calypsoUrl` — workspace-specific F5 Guardrails API URL (defaults to `https://us1.calypsoai.app`)
* Set any `actions` you want on your check, and create the Guardrail!

> [!NOTE]
>
> Guardrail Actions allow you to orchestrate your guardrails logic. You can learn more about them [here](https://docs.portkey.ai/docs/product/guardrails.md#there-are-6-types-of-guardrail-actions)

| Check Name | Description | Parameters | Supported Hooks |
| - | - | - | - |
| F5 Guardrails | Checks content using F5 Guardrails scanner | `Project ID` (string), `Redact` (boolean), `Timeout` (number), `credentials` (object, optional) | `beforeRequestHook`, `afterRequestHook` |

### 3. Add Guardrail ID to a Config and Make Your Request

* When you save a Guardrail, you'll get an associated Guardrail ID - add this ID to the `input_guardrails` or `output_guardrails` params in your Portkey Config
* Create these Configs in Portkey UI, save them, and get an associated Config ID to attach to your requests. [More here](https://docs.portkey.ai/docs/product/ai-gateway/configs.md).

Here's an example config:

```json theme={"system"}
{
  "input_guardrails": ["guardrails-id-xxx", "guardrails-id-yyy"],
  "output_guardrails": ["guardrails-id-xxx", "guardrails-id-yyy"]
}
```

> [tab] NodeJS
>
> ```js theme={"system"}
> const portkey = new Portkey({
>     apiKey: "PORTKEY_API_KEY",
>     config: "pc-***" // Supports a string config id or a config object
> });
> ```

> [tab] Python
>
> ```py theme={"system"}
> portkey = Portkey(
>     api_key="PORTKEY_API_KEY",
>     config="pc-***" # Supports a string config id or a config object
> )
> ```

> [tab] OpenAI NodeJS
>
> ```js theme={"system"}
> const openai = new OpenAI({
>   apiKey: 'OPENAI_API_KEY',
>   baseURL: PORTKEY_GATEWAY_URL,
>   defaultHeaders: createHeaders({
>     apiKey: "PORTKEY_API_KEY",
>     config: "CONFIG_ID"
>   })
> });
> ```

> [tab] OpenAI Python
>
> ```py theme={"system"}
> client = OpenAI(
>     api_key="OPENAI_API_KEY", # defaults to os.environ.get("OPENAI_API_KEY")
>     base_url=PORTKEY_GATEWAY_URL,
>     default_headers=createHeaders(
>         provider="openai",
>         api_key="PORTKEY_API_KEY", # defaults to os.environ.get("PORTKEY_API_KEY")
>         config="CONFIG_ID"
>     )
> )
> ```

> [tab] cURL
>
> ```sh theme={"system"}
> curl https://api.portkey.ai/v1/chat/completions \
>   -H "Content-Type: application/json" \
>   -H "Authorization: Bearer $OPENAI_API_KEY" \
>   -H "x-portkey-api-key: $PORTKEY_API_KEY" \
>   -H "x-portkey-config: $CONFIG_ID" \
>   -d '{
>     "model": "gpt-3.5-turbo",
>     "messages": [{
>         "role": "user",
>         "content": "Hello!"
>       }]
>   }'
> ```

For more, refer to the [Config documentation](https://docs.portkey.ai/docs/product/ai-gateway/configs.md).

Your requests are now guarded by F5 Guardrails, and you can see the verdict and any actions taken directly in your Portkey logs!

## Get Support

If you face any issues with the F5 Guardrails integration, reach out to [Portkey support](https://support.portkey.ai/forms/customer-portal-ticket-form) for assistance.

***

> [card] [Portkey is now PRISMA AIRS AI Gateway. See it in action.](https://www.paloaltonetworks.in/ai-security/ai-gateway?utm_source=portkey\&utm_medium=referral\&utm_campaign=prisma_airs\&utm_content=docs_nav#contact)
>
> Contact Us


## Related topics

- [November](https://docs.portkey.ai/docs/changelog/2025/november.md)
- [List of Guardrail Checks](https://docs.portkey.ai/docs/product/guardrails/list-of-guardrail-checks.md)
- [Backend](https://docs.portkey.ai/docs/changelog/backend.md)
- [Guardrails](https://docs.portkey.ai/docs/product/guardrails.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.