API reference

Strategies

The strategy field decides what replaces each detected value. Three are reversible; three are one-way. The API default is tokenize; the integrations default to fpe.

Real output for the same input under each strategy. The fpe, hash and synthetic values below came from a test instance with its own keys; the hosted API produces different ones.

Refund card 4242 4242 4242 4242 for Priya Sharma, priya.sharma@example.com, +91 98765 43210
StrategyOutputReversible
tokenizeRefund card [CREDIT_CARD_1] for [PERSON_1], [EMAIL_1], [PHONE_1]yes, with token_map
syntheticRefund card 3449 5039 8850 7709 for Noor Das, leo.sharma39@sample.org, +86 64465 12004yes, with token_map
fpeRefund card 9244 7815 4042 5941 for [PERSON:3bihtlnay7dp…], rwkbj.mprpta@wcrwbuh.com, +31 74902 86938yes, key only
maskRefund card [REDACTED] for [REDACTED], [REDACTED], [REDACTED]no
hashRefund card CREDIT_CARD_bc77cbe1 for PERSON_a0ac8999, EMAIL_375ce008, PHONE_5d5c768bno (stable)
partialRefund card ***************4242 for ********arma, ********************.com, ***********3210no

tokenize

Each value becomes a numbered placeholder like [EMAIL_1]; the same value gets the same placeholder within a request. Restore with POST /v1/restore and the returned token_map. Placeholders are collision-safe: text that already contains [EMAIL_1] still round-trips exactly.

Use it for LLM round trips where you want the model to see clearly that a value was removed, and when a model might invent contact details (restore only touches tokens in the map). Keep in mind: the token_map holds the originals; keep it in memory for the round trip and don’t log or store it.

synthetic

Each value becomes a realistic fake of the same type: a different name, an email, a card number that passes Luhn, an Aadhaar that passes Verhoeff. Restore with /v1/restore and the token_map.

Use it for prompts and test data that should read naturally, and downstream systems that validate formats and checksums.

fpe: map-free, format-preserving

Structured values are encrypted in place with NIST SP 800-38G FF1 (AES-256) under your account’s key (on the hosted API every account has its own key: see security). The result has the same format and still passes its checksum: a card stays a Luhn-valid card, an Aadhaar stays Verhoeff-valid, an IBAN passes mod-97, an email keeps its TLD. The response’s token_map is {}, and POST /v1/restore-fpe reverses it with no map. Nothing to store.

Bracketed-token fallback. Values that can’t keep their format (names, places, and values whose domain is too small for FF1, below its minimum of 1,000,000 possibilities, such as a@b.io) become authenticated AES-SIV tokens like [PERSON:3bihtlnay7dp…]. They are map-free too, and restore never “decrypts” text that isn’t a genuine token.

  • Deterministic: the same value under the same key gives the same token, so joins and analytics keep working on redacted data.
  • Self-checked: every fpe redaction verifies that restore reproduces the exact input before the response is returned.
  • Restore with the same settings: pass the same labels and min_confidence to /v1/restore-fpe that you used to redact.

Storing tokens to restore later? Store key_version with them. Every redact response includes key_version. Pass it back to /v1/restore-fpe or /v1/restore-json when you restore. Round trips that finish in one flow need nothing extra, and the MCP, LangChain and LlamaIndex integrations carry it for you. Why restore doesn’t just try each version: an FF1 token decrypted under the wrong key doesn’t fail, it becomes a valid-looking but wrong value, so the caller has to say which version made it.

Partial values come back wrong, and look right. If a model quotes part of an fpe value (“card ending in 7588”), the fragment can’t be restored, and because fpe tokens look real, the wrong digits look real too. In a small test with real Claude, 2 of 3 plain replies did this. Tell the model to repeat values whole (0 of 3), or use tokenize (0 of 3). Details and the prompt line.

Limit. Key-only restore finds structured tokens again by detecting them. If a model invents a new card or email that looks like a token, restore transforms it into a different value. Names and places are immune. Use tokenize when that matters.

How FF1 works and why we chose it over FF3-1: FF1 explained, map-free vs vault tokenization.

mask

Every value becomes [REDACTED]. Nothing to restore. Use it for logs, dumps and analytics exports where the value is never needed again.

hash

Each value becomes LABEL_ plus a keyed hash (e.g. EMAIL_375ce008). Stable: within your account and key version, the same value always gives the same hash, so you can count and join without seeing values. Hashes differ between accounts and between key versions. Not reversible.

Key change (19 November 2026). When the hosted API moved to one key per account, fpe tokens and hash pseudonyms created before that change stopped restoring and matching. tokenize, synthetic, mask and partial were not affected. Re-redact anything you stored from before the change.

partial

Keeps the last 4 characters and masks the rest (***************4242); short values are fully masked. Use it for human review screens and support tools.

Which one?

You needUse
Round trip through an LLM, nothing to storefpe
Round trip, model may invent contact detailstokenize
Natural-looking text or valid-format test datasynthetic
Never need the value againmask
Count or join on a value without seeing ithash (or fpe, which is also deterministic)
A person needs a hint of the valuepartial

Get a free API key

Free plan: 1,000 requests a month, all strategies. Your key is shown once — we store only a hash of it.

Prefer the terminal?
curl -s API/v1/signup \
  -H 'content-type: application/json' \
  -d '{"email":"you@company.com"}'

Contact

Our contact address is being set up.