To add guardrails and PII redaction to LLM API calls, route requests through https://router.requesty.ai/v1 and turn on a PII scanner in the Requesty Console. In November 2026, Requesty's documentation recommends starting in Report mode, reviewing the findings, then switching to Mask so detected values are replaced before they reach the model provider.
Put the scanner in the request path
A direct provider call goes straight from your application to that provider. With Requesty in the path, the gateway can apply your selected PII and Secrets scanners before forwarding the request.

The alternative is redaction code in each application, which every team has to build and keep consistent. Requesty keeps scanner settings at the organization or group level and applies them to requests using those settings across supported models. Direct provider calls still need to be moved to the gateway. For the broader set of controls and where they run, read our guide to AI guardrails.
Turn on PII redaction
You need a Requesty API key and an organization admin to change the scanner settings. The guardrails documentation says guardrails are available to every organization, including those outside the Enterprise plan.
- 1Route a request through Requesty
Point your OpenAI-compatible client at
https://router.requesty.ai/v1and authenticate with your Requesty API key. Use a prompt containing synthetic data for the first test. - 2Open guardrails
In the Requesty Console, go to Admin Panel > Guardrails. An organization admin can configure the scanners there.
- 3Choose scanners
Choose a PII scanner for personal information and a Secrets scanner for credentials. Each has a Fast and an ML option, configured separately.
- 4Start in Report mode
Set the scanners you want to test to Report. Send requests using synthetic data, then review the findings in Logs and Compliance. Report leaves the request unchanged, so detected values can still reach the model provider.
- 5Move to Mask
Review the matches and false positives, then set the selected scanners to Mask. Saving the change applies it to subsequent requests, with no restart or API key update.
Groups follow the organization settings by default. A group with its own guardrail settings uses those settings instead, and policy changes also create an audit-log event. See the guardrails documentation for the configuration path.
Send a request through the gateway
Set REQUESTY_API_KEY in your environment, then send a test request using one of the examples below. Each example sends a chat request containing a synthetic email address.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://router.requesty.ai/v1",
api_key=os.environ["REQUESTY_API_KEY"],
)
response = client.chat.completions.create(
model="openai/gpt-6.1-sol",
messages=[
{
"role": "user",
"content": (
"Does this customer message request a refund? "
"Please refund my order. Contact me at alex@example.com."
),
}
],
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://router.requesty.ai/v1",
apiKey: process.env.REQUESTY_API_KEY,
});
const response = await client.chat.completions.create({
model: "openai/gpt-6.1-sol",
messages: [
{
role: "user",
content:
"Does this customer message request a refund? " +
"Please refund my order. Contact me at alex@example.com.",
},
],
});
console.log(response.choices[0].message.content);curl https://router.requesty.ai/v1/chat/completions \
-H "Authorization: Bearer $REQUESTY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-6.1-sol",
"messages": [
{
"role": "user",
"content": "Does this customer message request a refund? Please refund my order. Contact me at alex@example.com."
}
]
}'Your application still sends the original request to Requesty. With a PII scanner set to Mask, Requesty replaces detected values before forwarding the request to the provider. If you are changing an existing client, see our guide to OpenAI-compatible APIs for what the base URL change means.
Verify the result
The guardrails documentation gives two verdicts: Flagged means a Report scanner found a violation, while Masked means at least one violation caused replacement. A Masked verdict does not confirm that every value you intended to mask was replaced, especially when several scanners are enabled.
Review the verdict and the violations listed for that request in Logs. If you have an approved way to observe what the provider received, check the provider-visible request too. Our guardrails and PII redaction tools comparison covers that test.
Logs show each request's guardrail verdict and the violations found. The Compliance page aggregates scan coverage, Flagged and Masked outcomes, and violations by data class for the selected period. If you need evidence for an audit, use those records alongside our LLM gateway security and compliance checklist.
What the provider receives
This example follows the refund example on our governance page and uses a synthetic email address.
| Stage | Request content |
|---|---|
| Application sends | Does this customer message request a refund? Please refund my order. Contact me at alex@example.com. |
| Provider receives | Does this customer message request a refund? Please refund my order. Contact me at [EMAIL_1]. |
The guardrails documentation describes Mask as replacing detected content with a synthetic equivalent. Requesty keeps the mapping long enough to restore the original value in the response.
Synthetic replacement can change the result when a model needs to interpret, calculate from or derive information from the original value. Test those workflows with synthetic examples before moving production traffic to Mask.
Choose Fast or ML scanners
Requesty has four independently configured scanners: PII Fast, PII ML, Secrets Fast and Secrets ML. Each can be Disabled, set to Report or set to Mask.
| Scanner option | Documented trade-off |
|---|---|
| Fast | Favors lower latency. |
| ML | Uses model-based detection for higher accuracy and may add latency. |
The PII scanners look for information including email addresses, phone numbers, names and government identifiers. The Secrets scanners look for credentials including API keys, tokens and database credentials. On standard plans, scanners are priced separately at the rate shown in the Console; Enterprise includes guardrails, according to the guardrails documentation.
Start with the data classes your requests contain, then use Report findings to check matches and false positives. The guardrails documentation recommends starting with Report on representative traffic before switching to Mask.
Estimate the scanner cost
The Console shows the current price beside each scanner and action. On plans where guardrails are charged separately, billing is per million input tokens not served from the provider's prompt cache. Multiple scanner charges add together; Enterprise includes guardrails, according to the guardrails documentation.
For one scanner, let P be the Console price per million non-cached input tokens:
Monthly scanner cost = requests per month
x non-cached input tokens per request
/ 1,000,000
x PFor example, a workload sends 100,000 requests per month with 4,000 input tokens per request, and the provider's prompt cache serves 50% of those input tokens.
That leaves 2,000 non-cached input tokens per request. The estimated monthly charge for one scanner is 100,000 x 2,000 / 1,000,000 x P, or 200 x P dollars. Add a line for each enabled scanner using its Console price.
Set rules for a group
By default, every group follows the organization guardrail settings. On Enterprise, an admin can give a group its own settings under Admin Panel > Groups, in the group's Guardrails column. Each request then uses its group's settings or the organization default.
A group can also be set to Off, and requests from that group are then not scanned, according to the guardrails documentation. Check the policy for the group associated with your test key before relying on the organization setting.
Set the other privacy controls
Masking protects detected values in the request sent to the provider. It does not cover every path through which sensitive data can move.
| Control | What to check |
|---|---|
| Model responses | Guardrails restore values masked in the request, but do not scan responses for new sensitive data. |
| Prompt injection and toxicity | The PII and Secrets scanners do not block either. See our agent prompt injection guide for that separate control. |
| Direct provider calls | Calls sent directly to a provider do not pass through Requesty guardrails. Connecting a provider platform in the admin panel does not route direct traffic through Requesty. |
| Payload storage | Masking and logging are separate. With key payload logging enabled and organization Zero Data Retention off, Requesty can store full raw request bodies. |
| Provider retention | Review provider retention and training policies using the Approved Models data-policy filters. |
For storage, review Requesty's data privacy controls. Organization Zero Data Retention prevents new payload storage by Requesty, but historical logs containing payloads remain. Enabling organization Zero Data Retention is permanent; turning off payload logging per key is the reversible alternative.
Provider retention and training are separate. Review the Approved Models data-policy filters, and check your provider agreement when you bring your own provider key.
For EU workloads, our GDPR guide for GPT and Claude covers the EU endpoint alongside other controls. Our subprocessors page explains that the EU endpoint governs Requesty's own processing; where inference runs depends on the model and provider you select.
If raw data must never leave your network, consider a self-hosted redaction step before the gateway. Our guardrails and PII redaction tools comparison covers alternatives.
Check the rollout
Roll out and verify Mask
0 of 13 done
Review a week of your own masked traffic in Logs and Compliance, alongside synthetic tests for values you expect the scanners to catch. Use the false positives and misses you find to adjust which scanners run in Fast or ML and Report or Mask.
Frequently asked questions
- How do I redact PII before sending it to the OpenAI API?
- Route the request through Requesty's OpenAI-compatible endpoint and set a PII scanner to Mask. Requesty replaces detected sensitive content before forwarding the request to the model provider.
- Do I need to change application code to use Requesty guardrails?
- Applications calling a provider directly need to use the Requesty base URL and a Requesty key. After that, organization or group guardrail changes apply without another code change, restart or API key update.
- Should I start with Report or Mask?
- Start with Report to see scanner matches without changing requests. Review the findings in Requesty's Logs and Compliance pages, then switch to Mask.
- Does Requesty scan model responses or block prompt injection?
- Requesty guardrails restore masked request values in responses, but they do not scan responses for new sensitive data or block prompt injection.
- Does PII masking stop Requesty from storing prompts?
- No. Masking and payload logging are separate controls. Organization Zero Data Retention prevents new payload storage and is permanent; turning off payload logging per key is a reversible alternative.
- How much do Requesty guardrails cost?
- On standard plans, scanners are priced separately at the rate shown in the Console per million input tokens not served from the provider's prompt cache. Enterprise includes guardrails.
- Can different teams use different guardrail settings?
- Yes. Requesty groups can override the organization default with their own scanner settings. Groups are an Enterprise feature.
- NOV '26
AI guardrails: what they block and where to enforce them
AI guardrails mask sensitive inputs, restrict model access and check outputs. Learn where each control runs and what it can and cannot block.
- OCT '26
GDPR Compliant ChatGPT API: Use GPT and Claude in Europe (2026)
Use a GDPR compliant ChatGPT API and Claude setup. Compare EU model routes, contracts, retention and tests that verify your gateway and inference regions.
- SEP '26
OpenAI-compatible APIs: format, providers and limits
An OpenAI-compatible API lets you reuse the OpenAI SDK. Compare provider endpoints and see where structured outputs and finish reasons vary.
