farsi-tools

Persian / Arabic data cleanup

One flat, prepaid price per file — not per row, not per call. Upload a CSV, TSV or text file and get it back normalized: Arabic yeh and kaf become their Persian forms, the ZWNJ half-space is normalised, digits are unified to ASCII, whitespace and line endings are cleaned. Optionally appends a Latin transliteration column.

$0.90
up to 50 rows
/api/fa/cleanup-50
$9
up to 500 rows
/api/fa/cleanup-500
$25
up to 5000 rows
/api/fa/cleanup-5000
Price
$0.90 / $9 / $25 flat
Network
eip155:8453 (Base)
Asset
USDC
PayTo
0x326F9DBB7027F5aB8be9956353dFF62b6a05Dc29
Max file
5 MB
Row ceiling
50 / 500 / 5000
Paying from your own x402 client? The x402 client SDK caps a single payment at $1 by default, and it refuses a larger requirement before it builds a payment. So a default client can buy the $0.90 tier as-is; for the $9 and $25 tiers raise spendControls.maxAmountPerPayment (or set spendControls: false).

Try it

How the price works. The price is never taken from your request. The server counts the rows in the bytes you upload, picks the tier that covers the file, and states that flat price in the 402 challenge. A file that fits the smaller tier is never billed at the larger tier's price, and a file with more rows than the tier allows is refused before any payment is requested.

How it works

Upload & quote
The server inspects the file and tells you the tier and the exact flat price. Free, no payment.
Pay in USDC on Base
The 402 challenge carries the exact amount, the USDC asset and the receiving address. Pay with any x402 client, then retry the same request.
Download the cleaned file
The response carries the cleaned file base64-encoded, plus a job id. Jobs are kept for 24 hours behind a download link.

For agents & developers

Quote the file (free):

curl -X POST https://farsi-tools.johnaio281.workers.dev/api/fa/cleanup-quote \
  -H "Content-Type: application/json" \
  -d '{"filename":"contacts.csv","content_b64":"bmFtZSxjaXR5CmVsZSwudGhyYW4K"}'

Then POST the same body to the priced route. The first response is a 402 with the flat price; pay it and retry:

curl -X POST https://farsi-tools.johnaio281.workers.dev/api/fa/cleanup-50 \
  -H "Content-Type: application/json" \
  -H "PAYMENT-SIGNATURE: <x402 client handles this>" \
  -d '{"filename":"contacts.csv","content_b64":"bmFtZSxjaXR5CmVsZSwudGhyYW4K"}'

Machine-readable surfaces: x402 manifest · OpenAPI · skill.md · llms.txt · API index