Buy PII Token Vault.
Keep customer personal data out of model logs and third-party prompts. Zero-knowledge reversible vault.
Drop-In Integration Stage
OpenAPI 3.1 & Gateway Compatibleimport httpx
# Step 1: Tokenize PII before sending to LLM
tokenized = httpx.post(
"https://api.youstostore.com/v1/tokenize",
headers={"X-API-Key": "sk_live_your_key"},
json={
"conversation_id": "conv_q3_review",
"text": "Send the invoice to Sarah Connor at sarah.c@skytech.io (Card: 4532-8921-0021-9981)",
"entity_types": ["name", "email", "credit_card"],
"ttl_seconds": 86400
}
).json()
print(tokenized["redacted_text"])
# Step 2: Restore tokens after LLM response
restored = httpx.post(
"https://api.youstostore.com/v1/restore",
headers={"X-API-Key": "sk_live_your_key"},
json={
"conversation_id": "conv_q3_review",
"text": tokenized["redacted_text"],
"grant": tokenized["grant"]
}
).json()Live PII Redaction & Restoration
Observe zero-knowledge tokenization before prompt data is sent to public LLMs.
Developer Tier
Growth Tier
RECOMMENDEDEnterprise Tier
PII Token Vault
**Eyebrow:** Reversible PII tokenization for text workflows
Engineering Pain & Fragility
External AI services can be useful in support, legal operations, healthcare administration, and other text-heavy workflows. They also create a basic data-minimization problem: a prompt may contain names, email addresses, phone numbers, account details, or other identifiers that the model does not need to complete the task.
Simple redaction is often too destructive. If every name becomes `[REDACTED]`, the model can lose track of who said what. Home-grown substitution tables preserve context, but they soon become security-sensitive state: mappings need tenant isolation, expiry, controlled restoration, deletion, and protection at rest. Detection and overlapping matches also need consistent handling.
PII Token Vault packages that narrow workflow behind three API operations. It is designed for teams that want reversible pseudonymization before an external text-processing call without turning a prompt-filtering helper into another permanent identity database.
What the API Solves
The API accepts customer-supplied text and a conversation ID. It detects selected entity types and replaces each match with a readable token such as `[NAME_1]` or `[EMAIL_1]`. The same value receives the same token when it appears again within the same tenant and conversation, which helps an LLM preserve references across turns. Token identity does not carry across tenants or conversations.
Mappings are encrypted with Fernet authenticated encryption and expire on a caller-selected TTL of 5 minutes to 24 hours. Restoration requires both API authentication and a valid short-lived restore grant. The caller chooses which tokens to restore; it does not have to re-identify every value in the returned text. A separate delete operation removes the mappings for a conversation.
How it works. Step by step.
Choose the scope.
Assign a `conversation_id` and select the entity types relevant to the workflow. The default selection is name, email, phone, and credit card.
Tokenize the source text.
Send up to 100,000 characters to `POST /v1/tokenize`, with an optional TTL between 300 and 86,400 seconds.
Use the tokenized copy.
The response contains `tokenized_text`, an entity list, confidence values, and `expires_at`. Pass the tokenized copy to the external model or text processor rather than the identified original.
Keep tokens through the exchange.
Stable tokens within the tenant and conversation let later turns refer to the same person or identifier without exposing its original value.
Restore selectively.
After processing, submit the returned text, the specific tokens to restore, the same conversation ID, and a restore grant to `POST /v1/restore`.
Delete or let the mapping expire.
Call `DELETE /v1/conversations/{conversation_id}` with an idempotency key when the workflow ends, or rely on the configured TTL, which can never exceed 24 hours.
Built for enterprise production standards.
Deterministic tokens scoped to one tenant and one conversation
Selective restoration rather than all-or-nothing re-identification
Fernet-encrypted value mappings
Configurable short retention from 5 minutes to 24 hours
Immediate, idempotent conversation deletion
Caller-selected detection policy across supported entity types
Confidence values alongside detected entities
API key authentication and tenant-resolved access
Structured errors with request IDs
Request limits that bound text size and concurrent detection work
Ideal use cases & engineering workflows.
PII Token Vault fits product and platform teams adding external language models to workflows that already handle sensitive text. Typical buyers include security-conscious SaaS companies, support automation vendors, legal operations platforms, health administration tools, financial software teams, and internal AI platform groups.
It is most useful when the engineering team wants a narrow tokenization service with short-lived state and controlled restoration, but does not want to own a custom vault, token namespace, expiry engine, and deletion path.
- Tokenize a support ticket before summarization or classification, then restore the customer's email only in the authorized agent view. - Preserve references to multiple people across an LLM conversation without sending their names to the model. - Pseudonymize legal or health-administration text before a bounded extraction task. - Replace account numbers, IBANs, phone numbers, and email addresses before external text analysis. - Delete a conversation vault as soon as a job or user session finishes. - Add a data-minimization layer in front of an existing LLM integration without changing model providers.
Why buy instead of building internally?
A regex replacement function is easy to write. The surrounding controls are not. A production path needs stable tokens that do not collide, encryption for reversible mappings, tenant boundaries, grant-gated restoration, expiry, deletion, request limits, and error behavior your application can safely automate.
Buying the API can remove that stateful security component from your application backlog. It also gives product teams one contract for tokenize, restore, and delete operations. You still own the policy decision: which text may leave your environment, which entity types to scan for, whether a result is safe enough to use, and who may obtain a restoration grant.
Build your own if you need on-premises deployment, document or image processing, custom entity models, retention longer than 24 hours, or a certification-specific control environment. Those requirements fall outside this product's current boundary.
Security, privacy and operational integrity.
Mappings are separated by tenant and conversation and encrypted using Fernet authenticated encryption. API keys resolve the tenant server-side; key material is represented by a digest at rest rather than stored as reusable plaintext. Restoration adds a second control in the form of a short-lived grant, and cross-tenant restoration does not reveal another tenant's value.
Retention is deliberately short. A mapping lives for no more than 24 hours and can be deleted earlier through an idempotent API call. The service is designed to avoid plaintext request bodies and restored values in application logs; deployment and logging configuration still need customer review before production use.
Structured failure responses cover authentication, validation, expiry, rate limits, and vault availability. Resource limits bound oversized text and concurrent detection work. These controls reduce exposure and make failures easier to handle, but they do not make the service a substitute for threat modeling, access governance, or review of downstream data use.
Architectural Scope & Production Boundaries
Questions & answers for engineering leads.
No. The service creates reversible, short-lived pseudonyms. The mapping can be restored by an authorized caller, and surrounding text may still identify a person. Treat the result according to your own data-classification policy.
Deploy PII Token Vault in minutes.
Start with our developer tier on Polar.sh Merchant of Record. Automated EU VAT invoices, instant API key generation, and 99.99% edge uptime SLA.