Skip to main content
Plugins are request-scoped transforms applied to the text exchanged with a model in the AI Gateway. A plugin mutates the request before the provider sees it and can restore the response on the way back. This sets plugins apart from Guardrails, which only observe and block. Attach plugins per request through the plugins array. Each plugin is identified by an id discriminator.

PII Redaction

Replace personally identifiable information with placeholders before the provider sees it, then restore the original values in the response.

Supported endpoints

The plugins array is accepted on the following AI Gateway routes:
  • POST /v3/router/responses
  • POST /v3/router/chat/completions
  • POST /v3/router/completions
  • POST /v3/router/embeddings
  • POST /v3/router/rerank
  • POST /v3/router/images/generations