Analyze, anonymize, encrypt, decrypt PII via REST API. Token-based pricing (200 free tokens). Bearer token auth. Sub-200ms response time. Code examples for Python, Node.js, JavaScript, cURL.
pip install anonym-legal
# Coming soon
import anonymize
client = anonymize.Client(
api_key="YOUR_API_KEY",
base_url="https://anonym.legal/api"
)
result = client.analyze(
text="John Smith, SSN 123-45-6789",
language="en"
)
print(result.entities)
npm install @anonym-legal/sdk
# Coming soon
const { AnonymClient } = require(
"@anonym-legal/sdk"
);
const client = new AnonymClient({
apiKey: process.env.API_KEY
});
const result = await client.analyze({
text: "Jane Doe, email jane@ex.com",
language: "en"
});
console.log(result.entities);
Detect & extract PII entities from text. Returns entity types, positions, confidence scores.
Replace detected PII with redactions, masks, hashes, or encryption. Returns anonymized text.
Decrypt previously encrypted PII. Requires decryption key. Bearer token auth.
curl -X POST https://anonym.legal/api/presidio/analyze \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "John Smith works at Acme Corp",
"language": "en"
}'
# Response
{
"entities": [
{
"type": "PERSON",
"value": "John Smith",
"start": 0,
"end": 10,
"score": 0.95
},
{
"type": "ORGANIZATION",
"value": "Acme Corp",
"start": 21,
"end": 30,
"score": 0.88
}
]
}
200 tokens/month. 1 token per 100 characters analyzed. Ideal for learning & testing.
€3/1,000 tokens. Scale to 100K+ characters/month. Priority support.
from langchain.chat_models import ChatOpenAI
from anonym_legal import AnonymClient
client = AnonymClient(api_key=KEY)
llm = ChatOpenAI(model="gpt-4")
# Customer input with PII
user_input = "My name is John, SSN 123-45-6789"
# Sanitize before LLM
sanitized = client.anonymize(
text=user_input,
method="mask"
)
# Safe to send to LLM
response = llm.predict(text=sanitized)
See PII detection and anonymization via REST API and MCP Server
Sign up for free API key. 200 tokens included. Code examples in Python, Node.js, cURL. Sub-200ms response time.
Get API KeyAlso from anonym.legal