Guardrails
Replace personal information and secrets before model calls, with separate controls for each API key.
Guardrails replace detected sensitive values with placeholders before sending message text to a model. Sliplane restores the original values in the model's reply before returning it to your application.
Enable the detection types you need for each API key. Your application uses the same API requests and SDK code.
Detection and restoration are best effort. They can miss sensitive values, replace harmless text, or fail to restore a placeholder that the model changes. Perfect results are not guaranteed. Test with representative prompts before using this with sensitive data.
Configure a key
- Open Inference > Keys.
- Create a key or edit an existing key.
- Turn each detection type on or off, then save the key.
The controls are independent. For example, you can replace secrets while keeping names unchanged, or enable all detection types. Settings apply to requests made with that key. Other keys keep their own settings.
Secrets
Secret detection looks for recognizable credentials, such as API tokens and private keys. Detected values are replaced before the model call and restored wherever the model returns their exact placeholders.
PII
PII means personally identifiable information. Choose either or both of these controls:
| Detection type | What it looks for |
|---|---|
| Names and places | Person names and location names in text |
| Pattern-based PII | Recognizable formats, such as email addresses and phone numbers |
How replacement works
For a request such as Write a reminder to alex@example.com, the flow is:
| Stage | Example text |
|---|---|
| Your application sends | Write a reminder to alex@example.com |
| The model receives | Write a reminder to [EMAIL_1] |
| The model replies | Reminder for [EMAIL_1]: your meeting is tomorrow. |
| Your application receives | Reminder for alex@example.com: your meeting is tomorrow. |
The placeholder in this example is simplified. Repeated occurrences of the same detected value use the same placeholder within a model call. The model works with the placeholder in place of that value. Your application receives the original value wherever the model returns the exact placeholder. This also applies to detected secrets.
Replacement can affect the model's answer when the task depends on the hidden value. For example, a model cannot infer a time zone from a place name that it receives only as a placeholder.
Supported requests
Protection applies to message text in Chat Completions (/v1/chat/completions) and Responses (/v1/responses), including Responses instructions. Both support streaming with "stream": true. Detection adds processing time before the model call starts.
Attachments, tool payloads, and reasoning fields are not processed. Embedding, audio transcription, and decision requests are not covered.
Try it
Enable pattern-based PII detection on a key, then send an example email address:
curl https://inference.sliplane.io/v1/chat/completions \
-H "Authorization: Bearer $SLIPLANE_INFERENCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemma4-26b",
"messages": [{
"role": "user",
"content": "Write a one-sentence meeting reminder addressed to alex@example.com. Keep the recipient exactly as supplied."
}]
}'Check that the reply contains alex@example.com. Try the same prompt with different models to compare their replies. For streaming, add "stream": true to the request and use curl -N.
How is this guide?