PII Redactor API
Mask emails, phones, IBANs, cards, and EU IDs with reversible tokens before LLM calls.
Detect and mask leaked API keys, JWTs, and private keys in logs, diffs, and prompts. Scan logs, diffs, and LLM prompts for leaked AWS keys, GitHub tokens, Stripe keys, Slack webhooks, JWTs, and private keys with reversible redaction.
Additional endpoints in this module: POST /v1/secret-scanner/restore
{
"ok": true,
"data": {
"verdict": "block",
"risk_score": 55,
"redacted_text": "Authorization: Bearer [SECRET_STRIPE_KEY_1]",
"findings": [
{
"type": "STRIPE_KEY",
"severity": "critical",
"start": 22,
"end": 61,
"line": 1,
"replacement": "[SECRET_STRIPE_KEY_1]",
"entropy": 4.88,
"validated": true
}
],
"counts": {
"STRIPE_KEY": 1
},
"total_secrets": 1,
"tokens": {
"[SECRET_STRIPE_KEY_1]": "sk_live_51Nq9abcDEF1234567890ghijklMNOP"
}
},
"meta": {
"request_id": "req_sec_01",
"ms": 1
}
}
curl -X POST "https://api.tinplate.dev/v1/secret-scanner" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TINPLATE_KEY" \
-d '{"text":"Authorization: Bearer sk_live_51Nq9abcDEF1234567890ghijklMNOP","mode":"token"}'import { TinplateClient } from "@tinplate/sdk";
const tinplate = new TinplateClient({
apiKey: process.env.TINPLATE_API_KEY!,
});
const { data, meta } = await tinplate.call("/v1/secret-scanner", {
"text": "Authorization: Bearer sk_live_51Nq9abcDEF1234567890ghijklMNOP",
"mode": "token"
});
console.log(`[${meta.ms} ms]`, data);import requests
response = requests.post(
"https://api.tinplate.dev/v1/secret-scanner",
headers={
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_TINPLATE_KEY",
},
json={
"text": "Authorization: Bearer sk_live_51Nq9abcDEF1234567890ghijklMNOP",
"mode": "token"
}
)
print(response.json())const response = await fetch("https://api.tinplate.dev/v1/secret-scanner", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_TINPLATE_KEY",
},
body: JSON.stringify({
"text": "Authorization: Bearer sk_live_51Nq9abcDEF1234567890ghijklMNOP",
"mode": "token"
}),
});
const result = await response.json();
console.log(result);{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "tinplate_secret_scanner",
"arguments": {
"text": "Authorization: Bearer sk_live_51Nq9abcDEF1234567890ghijklMNOP",
"mode": "token"
}
}
}POST /v1/secret-scanner)| Parameter | Type & Constraints | Description |
|---|---|---|
text required |
stringminLen: 1, maxLen: 262144 |
Raw log output, .env file, code snippet, or unified git diff to scan. |
mode optional |
"token" | "mask" | "partial"default: "token" |
'token' replaces each unique secret with [SECRET_<TYPE>_<N>] and returns a caller-only map; 'mask' replaces with [REDACTED:<TYPE>]; 'partial' preserves a short prefix/suffix. |
types optional |
string[] |
Optional allowlist of secret types to scan for. Scans all 28 types when omitted. |
diff_only_added optional |
booleandefault: false |
When true on a unified git diff, ignores removed lines ('-...') and only scans added/context lines. |
min_entropy optional |
numbermin: 2.5, max: 6, default: 3.8 |
Minimum Shannon entropy (bits/char) required for GENERIC_HIGH_ENTROPY matches. |
data Object Fields (200 OK)| Field | Type | Description |
|---|---|---|
verdict |
"allow" | "warn" | "block" |
Field 'verdict' |
risk_score |
integer |
Field 'risk_score' |
redacted_text |
string |
Field 'redacted_text' |
findings |
object[] |
Field 'findings' |
counts |
object |
Field 'counts' |
total_secrets |
integer |
Field 'total_secrets' |
tokens |
object |
Token-to-secret lookup map (populated only when mode === 'token', never persisted). |
Release: v1.0.39 ·
Verified: 16 November 2026 ·
Portfolio Median: 0.318 ms in-Worker V8 compute (add 15–65 ms HTTPS RTT) ·
See Full Portfolio Benchmarks →
Direct Polar All-Access Keys unlock all 42 APIs (49 endpoints), /v1/pipeline, and /mcp on api.tinplate.dev:
Pro ($29/mo · 120 req/min · 100k/mo · 128 KB) or Team ($79/mo · 300 req/min · 500k/mo · 256 KB).
| Plan | Monthly Price | Included Requests | Rate Limit | Max Payload | Best For |
|---|---|---|---|---|---|
| BASIC | $0.00 / mo | 500 / month | 10 req / min | 64 KB | Evaluation & CI smoke tests |
| PRO | $9.99 / mo | 15,000 / month | 60 req / min | 128 KB | Solo devs & production apps |
| ULTRA | $29.99 / mo | 100,000 / month | 300 req / min | 256 KB | Growing SaaS & multi-agent pipelines |
| MEGA | $79.99 / mo | 500,000 / month | 1,000 req / min | 256 KB | High-volume enterprise workloads |
Tinplate runs with Cloudflare Workers Observability and invocation logging completely disabled (observability.enabled = false). Payloads are processed in volatile memory and immediately garbage-collected.
UUIDs, 40-char hex git SHAs, CSS hashes, and common lockfile integrity hashes are explicitly filtered before entropy scoring.
Yes—run Secret Scanner on logs/code diffs and PII Redactor on customer support text or combine both before LLM ingestion.
Critical security guarantee: scanned secrets and logs exist strictly in volatile V8 memory for ~1 ms and are never logged or stored anywhere.
Worker Zero-Logging Guarantee: Cloudflare Workers Observability and invocation logging are disabled (observability.enabled = false, head_sampling_rate = 0, invocation_logs = false). Requests via RapidAPI or Zyla traverse marketplace proxies; use a Direct Bearer Key for zero-intermediary routing.
Mask emails, phones, IBANs, cards, and EU IDs with reversible tokens before LLM calls.
Catch prompt injections, role hijacks, and encoded jailbreaks in user inputs and RAG chunks.
Audit MCP server manifests for hidden tool poisoning, shell risks, and excessive permissions.