Redact API
Remove sensitive information (PII/PHI) from text using the Redact API
Analyzes text and redacts sensitive information such as SSNs, emails, phone numbers, and other PII. Supports custom entity types and optional PDF file processing.
Bearer token authentication using your API key
In: header
The text content to be analyzed and redacted
Optional array of custom entity types to redact. If not provided, defaults to standard PII entities (SSNs, emails, phone numbers, etc.)
Response Body
curl -X POST "https://app.superagent.sh/api/redact" \ -H "Content-Type: application/json" \ -d '{ "text": "My email is john@example.com and SSN is 123-45-6789" }'{
"id": "550e8400-e29b-41d4-a716-446655440000",
"model": "superagent-lm-redact-20b",
"choices": [
{
"message": {
"role": "assistant",
"content": "My email is <EMAIL_REDACTED> and SSN is <SSN_REDACTED>",
"reasoning": "Redacted email address and social security number"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 25,
"completion_tokens": 12,
"total_tokens": 37
}
}{
"error": "Invalid text provided"
}{
"error": "API key missing"
}{
"error": "No subscription found"
}{
"error": "Team not found"
}{
"error": "Failed to analyze prompt"
}Guard API POST
Classifies user inputs to detect malicious intent such as prompt injection, system prompt extraction, or data exfiltration attempts. Returns classification with violation types and CWE codes.
Verify API POST
Fact-check text by verifying claims against provided source materials using the Verify API