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

# Plugins

> Plugins transform the request, the response, or stored traces in the AI Gateway, such as PII redaction, response healing, and trace scrubbing.

**Plugins** transform the request, the response, or stored traces as the **AI Gateway** handles a call. This sets plugins apart from [Guardrails](/ai-gateway/configuration/guardrails), which only observe and block.

Attach a plugin per request through the `plugins` array, or turn it on for the whole workspace under **Settings** > **Plugins** so it applies without a `plugins` array on each call. Each plugin is identified by an `id` discriminator.

<CardGroup cols={3}>
  <Card title="PII Redaction" icon="user-shield" href="/ai-gateway/features/plugins/pii-redaction">
    Replace personally identifiable information with placeholders before the
    provider sees it, then restore the original values in the response.
  </Card>

  <Card title="Response Healing" icon="bandage" href="/ai-gateway/features/plugins/response-healing">
    Repair malformed JSON in model output, such as markdown code fences,
    trailing commas, and missing brackets.
  </Card>

  <Card title="Trace Scrubbing" icon="eraser" href="/ai-gateway/features/plugins/trace-scrubbing">
    Mask selected fields in stored traces, without changing the live request,
    the response, or the payload the provider receives.
  </Card>
</CardGroup>

## Supported endpoints

The `plugins` array is accepted on the following **AI Gateway** endpoints:

* [`POST /v3/router/responses`](/reference/responses/create-response)
* [`POST /v3/router/chat/completions`](/reference/chat/create-chat-completion)
* [`POST /v3/router/completions`](/reference/completions/create-completion)
* [`POST /v3/router/embeddings`](/reference/embeddings/create-embeddings): input only, no restore
* [`POST /v3/router/rerank`](/reference/rerank/create-rerank): input only, echoed text restored
* [`POST /v3/router/images/generations`](/reference/images/create-image): input only, no restore
