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

# Enforcing Org Level Guardrails

## Overview

Portkey enables organization owners to enforce request guardrails at the organization level. This feature ensures that all API requests made within the organization comply with predefined policies, enhancing security, compliance, and governance.

## How It Works

Organization owners can define input and output guardrails in the Organization Guardrails section. These guardrails are enforced on all API requests made within the organization, ensuring uniform policy enforcement across all users and applications.

* **Input Guardrails**: Define checks and constraints for incoming LLM requests.
* **Output Guardrails**: Ensure LLM responses align with organizational policies.

The guardrails available here are the same as those found in the Guardrails section of the Portkey platform. Multiple providers are supported for setting up guardrails. For a detailed list of supported providers and configurations

<Card title="Guardrials Docs" href="/docs/product/guardrails">
  Learn about the different Guardrails you can set up in Portkey
</Card>

## Configuration

### Setting Up Guardrails Requirements

1. Head to `Admin Settings` on the Portkey dashboard
2. Navigate to the `Organisation Guardrails` section
3. Add your `Input` and/or `Output` Guardrails
4. Save your changes

Once configured, these guardrails will be enforced on all API requests across the organization.

## Excluding Workspaces

Some workspaces — an internal evaluation sandbox, for example — may need to run without the organisation's default guardrails. You can exempt them individually while every other workspace stays covered.

Exclusions are managed per guardrail direction through the Admin API, and require an organisation service API key with the `organisation_exclusions.update` and `organisation_exclusions.list` scopes.

<Note>
  Workspace exclusions are currently available via the API only. Support for managing them from the Portkey dashboard is coming shortly.
</Note>

```bash theme={"system"}
curl -X PUT "https://api.portkey.ai/v1/workspace-exclusions/input-guardrails" \
  -H "x-portkey-api-key: YOUR_ADMIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "organisation_id": "ORGANISATION_ID",
    "workspaces": [
      { "workspace_id": "WORKSPACE_ID", "excluded": true }
    ]
  }'
```

Use `/workspace-exclusions/output-guardrails` for output guardrails, and set `excluded` to `false` to bring a workspace back under enforcement. Pass `override_existing: true` to replace the current exclusion list rather than merge into it. The matching `GET` endpoint returns the workspaces currently excluded.

<Note>
  Best Practices

  * Clearly communicate guardrail requirements to all developers in your organization.
  * Maintain internal documentation on your guardrail policies to ensure consistency.
</Note>

## Support

For questions about configuring metadata schemas or troubleshooting issues, contact [Portkey support](mailto:support@portkey.ai) or reach out on [Discord](https://portkey.sh/reddit-discord).
