Skip to main content

Overview

Guardrails let you redact sensitive data automatically when using an API key.
  • Configure guardrails once on an API key.
  • Use that key normally with /v1/responses.
  • Redaction applies automatically based on that key’s settings.
You can also call the redact-v1 model directly to get a scrubbed copy of your input without invoking an LLM. See Redact as a model.
Guardrails are key-level settings, not request-body parameters on /v1/responses.

Configure in Dashboard

  1. Go to Guardrails
  2. Select an API key
  3. Enable redaction
  4. Choose target: input, output, or both
  5. Select entity types
  6. Save changes

Settings in UI

  • Enabled / Disabled: turns redaction on or off for the selected key.
  • Target: choose whether redaction applies to input, output, or both.
  • Entity Types: choose which categories of sensitive data to redact.

Behavior You Can Expect

  • target: "input" redacts sensitive content before model processing.
  • target: "output" redacts model output before the response is returned.
  • target: "both" applies both.
Output redaction is not applied to streamed responses ("stream": true). Use non-streamed requests if you need output redaction.

Tips

  • Start with target: "input" if your main goal is protecting prompt data.
  • Use target: "both" for stricter protection on non-streamed calls.
  • Use entity_types to avoid over-redacting low-risk data.

Entity types

These are the entity types you can select when configuring redaction, grouped by category. Selecting a type redacts every detected occurrence of it, replacing the match with a placeholder token such as [EMAIL] (or the custom placeholder configured on your key).

Personally Identifiable Information (PII)

Information that can identify an individual.

Payment Card Industry (PCI)

Financial and payment card data.

Protected Health Information (PHI)

HIPAA-protected health information.

Credentials & Secrets

Authentication credentials and API keys.

Technical Identifiers

Network and technical identifiers.

Organizations

Temporal Data

Redact as a model

Set model to redact-v1 (aliases: redact, concentrate-redact) on /v1/responses to redact your input without forwarding it to an upstream LLM. The response returns the scrubbed payload directly, which is useful for:
  • Pre-processing prompts before sending them to a different model or system.
  • Building redaction into pipelines that don’t issue downstream LLM calls.
  • Auditing what guardrails would strip from a given input.

Requirements

  • The API key used for the request must have redaction guardrails enabled with at least one entity type selected. Requests fail with 400 otherwise.
  • The model uses the entity types, placeholder, and confidence threshold from the key’s guardrail settings. The target setting is ignored, since redact-v1 always returns redacted input.

Step-by-step walkthrough

Step 1: Enable guardrails on your API key

In the dashboard, go to Guardrails, select the API key you’ll use, enable redaction, and select at least one entity type — say PERSON, EMAIL, PHONE, and CREDIT_CARD. The target setting doesn’t matter for redact-v1; it’s ignored. Without this step, any redact-v1 request with that key returns a 400.

Step 2: Send a request

Call /v1/responses exactly as you would for any other model, with model set to redact-v1:

Step 3: Read the response

The reply follows the standard Responses shape. The redacted text appears in output[0].content[0].text, and a full redact summary is attached to the reply with the lossless scrubbed payload and any entities that were stripped. A response to the request above looks like this (values are illustrative):
What each part means:
  • output — the redacted input, remapped into assistant output_text messages so any Responses-compatible client can read it in the usual place. Only message and function_call items appear here.
  • redact.redacted_input — the lossless scrubbed copy of your entire input array, in its original shape (including items like function_call_output that have no output representation).
  • redact.redacted_tools — a scrubbed copy of the request’s tools, if any were sent.
  • redact.entities_found — total number of entities that were redacted.
  • redact.entity_types — the entity types actually detected in this request (not the full set configured on the key).
  • redact.models_used, redact.execution_time_ms, redact.redaction_coverage — detection diagnostics.

Step 4: Handle the failure case

If the key doesn’t have redaction guardrails enabled with at least one entity type, the request is rejected before routing:
Fix it by completing Step 1 for that key.

Structured input example

redact-v1 accepts the full Responses input array, and redacts text everywhere it can appear — message content, function call arguments, function call outputs, and tool definitions:
In the reply, the message and function_call items come back redacted in output; the function_call_output item has no output-item representation, so it appears only in redact.redacted_input:

Streaming

"stream": true is supported with redact-v1: the gateway synthesizes the standard Responses SSE event lifecycle from the redaction result, so streaming clients work unchanged.

Quickstart

Get started with API keys and first requests

Streaming

Streaming behavior and event format
Last modified on August 28, 2026