Text Redact
by Tanod utilpeek in Onchain & crypto
utilpeek (Tanod) PII redaction: emails, phones, cards, IBANs, SSNs, IPs, crypto addresses; names and street addresses are not detected. Use when an agent must mask emails, phone or card numbers and other PII in text before storing or sharing it.
POST https://tanod.dev/v1/text/redact
Last 30 days
Status and outage history · Atom feed
- Uptime
- 100%
- Response time
- 285 ms typical, 285 ms slowest 5%
- Last check
- 2 h ago
- Next check
- any minute now
How to call it
POST https://tanod.dev/v1/text/redact
Each call costs $0.002 in USDC on Base, paid with the request over x402.
Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.
Example request
From the listing.
POST https://tanod.dev/v1/text/redact
content-type: application/json
{
"text": "Mail [email protected] or call +1 650-253-0000; card 4111 1111 1111 1111, from 203.0.113.7"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
mask | string | No | tag (default: [EMAIL], [PHONE], [CARD] ...), stars (the same number of *, so the length is kept) or hash ([EMAIL:8 hex of SHA-256 of the normalised value]: equal values get equal tags). One of: tag, stars, hash. Default: "tag". |
text | string | Yes | The text (at most 200,000 characters). |
types | array of string or null | No | Limit detection to these types: email, phone, card, iban, ssn, ipv4, ipv6, crypto_address, url_secret (default: all). Default: null. |
Example response
The provider's example. We can't check it without paying.
Example response, 71 lines
{
"by_type": {
"card": 1,
"crypto_address": 0,
"email": 1,
"iban": 0,
"ipv4": 1,
"ipv6": 0,
"phone": 1,
"ssn": 0,
"url_secret": 0
},
"count": 4,
"entities": [
{
"end": 21,
"replacement": "[EMAIL]",
"start": 5,
"type": "email"
},
{
"end": 45,
"replacement": "[PHONE]",
"start": 30,
"type": "phone"
},
{
"end": 71,
"replacement": "[CARD]",
"start": 52,
"type": "card"
},
{
"end": 89,
"replacement": "[IPV4]",
"start": 78,
"type": "ipv4"
}
],
"mask": "tag",
"not_detected": [
"person names",
"street addresses",
"dates of birth",
"national ID numbers other than US SSNs",
"secrets outside URL query strings"
],
"notes": {
"card": "13-19 digits, Luhn-valid, with a known issuer prefix and length; spaces or dashes allowed",
"offsets": "start / end are code-point offsets into the input text (end exclusive)"
},
"source": {
"engine": "RE2 (google-re2 1.1.20251105)",
"iban": "python-stdnum 2.2 IBAN registry (LGPL-2.1-or-later, unmodified)",
"license": "BSD-3-Clause",
"phone": "phonenumbers 9.0.40 (Apache-2.0)",
"url": "https://github.com/google/re2"
},
"text": "Mail [EMAIL] or call [PHONE]; card [CARD], from [IPV4]",
"types": [
"email",
"phone",
"card",
"iban",
"ssn",
"ipv4",
"ipv6",
"crypto_address",
"url_secret"
]
}Call it from code
The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.002.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://tanod.dev/v1/text/redact' \
-H 'content-type: application/json' \
--data-raw '{"text":"Mail [email protected] or call +1 650-253-0000; card 4111 1111 1111 1111, from 203.0.113.7"}'
# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://tanod.dev/v1/text/redact' \
-H 'content-type: application/json' \
--data-raw '{"text":"Mail [email protected] or call +1 650-253-0000; card 4111 1111 1111 1111, from 203.0.113.7"}' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Pays at most $0.002 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.002" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.002 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Ftanod.dev%2Fv1%2Ftext%2Fredact&method=POST
const res = await pay("https://tanod.dev/v1/text/redact", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"text": "Mail [email protected] or call +1 650-253-0000; card 4111 1111 1111 1111, from 203.0.113.7"
}),
});
console.log(res.status, await res.text());Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
# Pays at most $0.002 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.002"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.post(
"https://tanod.dev/v1/text/redact",
json={
"text": "Mail [email protected] or call +1 650-253-0000; card 4111 1111 1111 1111, from 203.0.113.7",
},
)
print(res.status_code, res.text)Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 2 h ago | Passed | 402 | 1.0 s | $0.002 |
| 6 h ago | Passed | 402 | 285 ms | $0.002 |
| 15 h ago | Passed | 402 | 266 ms | $0.002 |