PII Anonymization API

Integrate PII detection and anonymization into any application. Official SDKs for JavaScript/TypeScript and Python with client-side encryption.

Quick Start

Get started with the API in minutes

  1. 1

    Install the SDK: npm install @cloak-business/sdk or pip install cloak-business

  2. 2

    Get your API token from the dashboard

  3. 3

    Make your first anonymization request

  4. 4

    Integrate into your application

Official SDKs

Type-safe libraries for JavaScript/TypeScript and Python with zero-knowledge encryption support

JavaScript / TypeScript

npm install @cloak-business/sdk
  • Full TypeScript support
  • Client-side AES-256-GCM encryption
  • Automatic retry with exponential backoff
  • Works in Node.js and browsers
View on npm

Python

pip install cloak-business
  • Full type hints (PEP 484)
  • Client-side encryption via cryptography
  • Async support with aiohttp
  • Python 3.9+ compatible
View on PyPI

Zero-Knowledge Encryption

Both SDKs include ClientCrypto modules for true zero-knowledge encryption. Your encryption keys never leave your device - all encryption/decryption happens locally using AES-256-GCM.

Learn about Zero-Knowledge Security

API Features

RESTful Endpoints

Clean, intuitive API design following REST best practices.

JWT Authentication

Secure token-based authentication for all API calls.

Rate Limiting

Fair rate limits with clear headers. Higher limits for enterprise.

Official SDKs

JavaScript/TypeScript and Python SDKs with client-side encryption.

Available Endpoints

POST/api/analyzeDetect PII in text
POST/api/anonymizeAnonymize detected PII
POST/api/deanonymizeReverse encryption-based anonymization

Asymmetric Key Management

GET/api/asymmetric-keysList key pairs
POST/api/asymmetric-keysCreate key pair
GET/api/asymmetric-keys/{id}/publicGet public key

Frequently Asked Questions

How do I authenticate API requests?

Generate an API key from your dashboard under Settings > API Keys. Include it in the Authorization header as 'Bearer YOUR_API_KEY' with every request.

What are the rate limits?

Rate limits depend on your plan: Free (10 req/min), Basic (60 req/min), Pro (300 req/min), Business (1,000 req/min). The API returns HTTP 429 with a Retry-After header when limits are exceeded.

Is batch processing supported?

Yes. The /api/v1/batch endpoint processes up to 100 texts per request. Each item can specify its own language and entity settings. Results include per-item entities and aggregated metadata.

What response format does the API use?

The API returns JSON responses with detected entities (type, start, end, score), anonymized text, and processing metadata. Full OpenAPI documentation is available at /docs.

How do I get an API key?

Sign up for a free account at cloak.business, then navigate to Settings > API Keys. You can create multiple keys with different permissions for different applications.

Is This Right for You?

Best For

  • Developers building privacy-first apps with programmatic PII anonymization
  • Automated pipelines — CI/CD, ETL jobs, and scheduled data processing
  • SaaS integrations that must sanitize user data before sending to third-party services
  • Teams with JavaScript or Python stacks using the official SDKs
  • Microservices architectures needing a dedicated anonymization endpoint

Not Ideal For

  • No-code or low-code teams — use the web app, Desktop App, or Office Add-in instead
  • Air-gapped environments with no internet access — use the Desktop App for offline processing
  • Very high-volume usage (>10M tokens/day) — contact sales for a dedicated tier
  • Ad-hoc one-off anonymization tasks — the web interface is faster for manual use

Start Building Today

300 free API calls per month. No credit card required.