Redact sensitive data (PII, secrets, credentials) from log entries and text
Automatically detect and mask sensitive data in log entries, error messages, and text content. Log redaction identifies email addresses, credit card numbers, IP addresses, API keys, and other PII patterns, replacing them with safe placeholders. Essential for GDPR compliance, SOC 2 audits, and secure logging practices.
X-API-Key header with every request.
All requests go through the API gateway which handles authentication, rate limiting, and usage tracking.
{
"text": "User john@example.com logged in from 192.168.1.100 with card 4111-1111-1111-1111"
}
| Field | Type | Description |
|---|---|---|
text |
string |
Text content to analyze |
{
"redacted": "User [EMAIL] logged in from [IP_ADDRESS] with card [CREDIT_CARD]",
"detections": [
{
"type": "EMAIL",
"count": 1
},
{
"type": "IP_ADDRESS",
"count": 1
},
{
"type": "CREDIT_CARD",
"count": 1
}
],
"totalRedactions": 3
}
| Field | Type | Description |
|---|---|---|
redacted |
string |
Field value |
detections |
array |
Array of items |
totalRedactions |
integer |
Field value |
| Status | Meaning |
|---|---|
200 | Request completed successfully |
400 | Bad request — invalid or missing parameters |
401 | Missing or invalid X-API-Key header |
429 | Rate limit exceeded — check Retry-After header |
500 | Internal server error |
400 Empty log contentRequest that triggers this:
{"log": ""}
Error response:
{"type": "/problems/validation-error", "title": "Empty Log", "status": 400, "detail": "Log content cannot be empty"}
How to fix: Provide non-empty log content to redact.
413 Log too largeRequest that triggers this:
{"log": "[very large log > 100MB]"}
Error response:
{"type": "/problems/payload-too-large", "title": "Payload Too Large", "status": 413, "detail": "Log exceeds maximum size of 100MB"}
How to fix: Split large logs into multiple requests or increase batch size limits.
curl -X POST /v1/text/redact \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"text": "User john@example.com logged in from 192.168.1.100 with card 4111-1111-1111-1111"
}'
// Node.js (18+) or modern browser
const response = await fetch("/v1/text/redact", {
method: "POST",
headers: {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"text": "User john@example.com logged in from 192.168.1.100 with card 4111-1111-1111-1111"
}),
});
const data = await response.json();
console.log(response.status, data);
import requests
response = requests.post(
"/v1/text/redact",
headers={
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"text": "User john@example.com logged in from 192.168.1.100 with card 4111-1111-1111-1111"
},
)
print(response.status_code)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"text": "User john@example.com logged in from 192.168.1.100 with card 4111-1111-1111-1111"
}`)
req, _ := http.NewRequest("POST", "/v1/text/redact", body)
req.Header.Set("X-API-Key", "YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
data, _ := io.ReadAll(resp.Body)
fmt.Println(resp.StatusCode)
fmt.Println(string(data))
}
{
"name": "log_redaction",
"description": "Redact sensitive data (PII, secrets, credentials) from log entries and text",
"inputSchema": {
"type": "object",
"properties": {
"api_key": {"type": "string", "description": "Your Orovai API key"},
"request": {"type": "object", "description": "Request body"}
},
"required": ["api_key", "request"]
},
"endpoint": "/v1/text/redact",
"method": "POST",
"headers": {
"X-API-Key": "{{api_key}}",
"Content-Type": "application/json"
}
}