DEVELOPER API

3 Lines of Code. 285+ Entity Types. Zero Data Retention.

Anonymize PII in your pipeline. MCP Server (7 tools), REST API, Python/Node SDKs. Sub-200ms response. Bearer token auth. Enterprise-grade privacy infrastructure.

The Security Problem

🚨

MCP 8000+ Exposed

Claude's Model Context Protocol has 8000+ exposed servers. Agents can enumerate internal APIs without auth. Data exfiltration in seconds.

🔗

LangChain CVE-2025-68664

CVSS 9.3. Attacker-controlled LLM can execute arbitrary tool calls. Database queries, file access, network requests. No PII filtering.

🛡️

Zero Privacy by Default

LLMs don't understand PII. LangChain agents paste customer data. RAG systems upload contracts to Claude context. No redaction layer.

Yes. Install with pip install anonym-legal. The Python SDK wraps the REST API with type hints, async support, and automatic retry. 3 lines to anonymize: client = AnonymLegal(token); result = client.anonymize(text, language='en').

The MCP Server exposes 7 privacy tools that LangChain agents can call directly. Add pii_detect, pii_anonymize, pii_decrypt to your agent toolkit. Prevents PII leakage in RAG pipelines and agent workflows.

Sub-200ms for standard text requests. Batch endpoints process arrays of text in a single call. The API runs on EU servers with zero data retention — request data is processed and immediately discarded.

The API runs on our EU-hosted infrastructure with zero data retention. For enterprise self-hosting requirements, contact us. The MCP Server can also run locally with Docker.

Yes. Send arrays of text strings in a single API call. The batch endpoint processes up to 100 items per request with consistent sub-200ms per-item latency.

Free tier: 200 tokens/month with all features. Basic: €3/month (1,000 tokens). Pro: €15/month (4,000 tokens). Business: €29/month (10,000 tokens). One token = one API call.

MCP Server (7 Tools)

Tool 1: /analyze

POST /mcp/analyze | { "text", "language" }

Detect 285+ PII entity types. Response: array of `{entity_type, value, start, end, score}`.

Tool 2: /anonymize

POST /mcp/anonymize | { "text", "method" }

Redact PII. Methods: mask (████), hash (SHA-256), encrypt (RSA-4096), remove.

Tool 3: /deanonymize

POST /mcp/deanonymize | { "text", "key" }

Decrypt reversible redactions. Authorized users only. Audit log per access.

Tool 4: /scan_file

POST /mcp/scan_file | { "file_content", "file_type" }

Scan PDF, DOCX, XLSX. Return redaction suggestions. Batch process 5000+ files.

Tool 5: /batch

POST /mcp/batch | { "texts": [...] }

Process 5000+ items in parallel. Returns all results in under 30 seconds.

Tool 6: /get_entities

GET /mcp/get_entities | ?language=en

List all 285+ entity types. Filterby language or domain.

Tool 7: /estimate

POST /mcp/estimate | { "text_length", "entities_count" }

Estimate token cost before processing. No charges for dry-run.

REST API Quick Start

curl -X POST https://anonym.legal/api/presidio/analyze \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "My SSN is 123-45-6789 and email is john@example.com",
    "language": "en"
  }'

# Response:
# {
#   "results": [
#     { "entity_type": "US_SSN", "start": 11, "end": 23, "score": 0.99 },
#     { "entity_type": "EMAIL_ADDRESS", "start": 38, "end": 56, "score": 0.99 }
#   ]
# }

Why Developers Choose This

  • ⚡ Speed: Sub-200ms response. 48 languages. 285+ entity types. Faster than Presidio standalone.
  • 🔐 Zero Cloud: No PII uploaded. Processed in-memory on your infrastructure. Compliant with GDPR, HIPAA, SOC 2.
  • 📊 Flexible Auth: Bearer token, API key, OAuth 2.0. Works with LangChain, LlamaIndex, custom agents.
  • 💰 Cost Predictable: Token-based pricing. No surprise bills. Batch pricing 50% cheaper.
  • 📈 Enterprise Scale: 5000+ concurrent requests. Auto-scaling. Redundant endpoints globally.

SDKs & Libraries

🐍 Python SDK

pip install anonym-legal
# Coming soon

from anonym import Client
client = Client(api_key='...')
results = client.analyze(
  'SSN: 123-45-6789',
  language='en'
)

📘 Node.js SDK

npm install @anonym-legal/sdk
# Coming soon

import { Client } from '@anonym-legal/sdk';
const client = new Client({
  apiKey: '...'
});
const results = await client.analyze({
  text: 'SSN: 123-45-6789'
});

🔗 REST API

curl -X POST \
  https://anonym.legal/api/presidio/analyze \
  -H "Authorization: Bearer KEY" \
  -d '{"text":"SSN:123"}'

Watch the API In Action

See PII detection and anonymization via REST API and MCP Server

Start Building Privacy-First Today

Get API key. No credit card required. 200 free tokens to start.

Generate API Key

Frequently Asked Questions

Yes. The REST API integrates into any data pipeline — Kafka consumers, Spark jobs, Airflow DAGs, dbt models. Process text through the /api/analyze endpoint to detect PII, then /api/anonymize to redact. Sub-200ms latency for real-time pipelines.

The REST API supports synchronous request-response (sub-200ms). For high-volume streaming, batch requests to /api/anonymize with arrays of text. For event-driven architectures, wrap the API in a Kafka consumer or AWS Lambda function.

Two approaches: (1) MCP Server — add anonym.legal as a tool in Claude, Cursor, or any MCP-compatible AI. (2) REST API — call /api/anonymize before sending data to any LLM. Both detect 285+ entity types and anonymize in real-time.

REST API for any HTTP client. MCP Server for AI tools (Claude, Cursor, VS Code). Python SDK (pip install). Node.js SDK (npm). Compatible with Kafka, Spark, Snowflake, dbt, Airflow, AWS Lambda, Google Cloud Functions, and Azure Functions.