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

# Guardrails and PII redaction for the Responses API

> Redact PII from prompts and responses by configuring key-level guardrails or calling the redact-v1 model directly on /v1/responses.

## 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](#redact-as-a-model).

<Info>
  Guardrails are key-level settings, not request-body parameters on `/v1/responses`.
</Info>

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

<Warning>
  Output redaction is not applied to streamed responses (`"stream": true`). Use non-streamed requests if you need output redaction.
</Warning>

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

## 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 — `redact-v1` always returns redacted input.

### Example

```bash theme={null}
curl https://api.concentrate.ai/v1/responses \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "redact-v1",
    "input": "Email me at jane@example.com about invoice #4823"
  }'
```

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.

## Related Documentation

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/docs/getting-started/quickstart">
    Get started with API keys and first requests
  </Card>

  <Card title="Streaming" icon="water" href="/docs/api-reference/endpoint/streaming">
    Streaming behavior and event format
  </Card>
</CardGroup>
