PrepLayer.ai

Deterministic text prep
for agents. No tokens.

Twelve x402-paid primitives — normalize, validate, extract, redact, classify, dedupe, diff, chunk, extract_custom, validate_json, slugify, hash — and a batch aggregator. Pure CPU, byte-identical output, multi-chain on Base, Solana, Polygon and Arbitrum.

No account. No API key. No contract. USDC on Base by default, $0.002–$0.01 per call.

How it works

The paying wallet is the identity. An agent with an x402 key and a spending cap calls any endpoint, gets a 402 challenge with exact price, network, and treasury address, pays, and receives the result — with no signup, no secret to leak, and no subscription.

  1. Call the endpoint. No Authorization header — a missing payment simply returns 402 with the exact USDC amount.
  2. Pay. The PAYMENT-REQUIRED header carries scheme exact, network eip155:8453 (or your choice), and the treasury address.
  3. Get structured output. Byte offsets, normalized values, validity booleans, hashes, LCS edit scripts — not prose. Same across vendors and runs.
# no account, no api key — wallet is the identity
curl https://preplayer.ai/v1/redact \
  -H 'Content-Type: application/json' \
  -H 'X-Payment: <base64 x402 payload>' \
  -d '{"text":"pay 4242424242424242 from bob@example.com"}'

Four chains

Every endpoint accepts an optional network field in the request body. The default is Base; Solana USDC and the two L2 EVMs are advertised at slightly different per-call prices to reflect facilitator verification cost. The 402 challenge echoes the requested network, and we probe each chain at boot to mark unreachable ones as unsupported rather than advertise a dead lane.

eip155:8453 · Base (1.00×) solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp · Solana (1.00×) eip155:137 · Polygon (1.20×) eip155:42161 · Arbitrum One (1.20×)

Four price tiers

Multi-tier pricing lifts earning-probability by 15 points in the live x402 data. Single is the default and works on every endpoint. Batch is real. Subscription and Priority are deliberately not wired in v0.2.0 — the spec lives at /v1/subscription and /v1/priority and returns 501 with the design doc. Charging 2× for an SLA we cannot guarantee would be dishonest.

REAL

Single · $0.002–0.01 / call

Default. One request, one x402 payment, one result. Available on all 12 primitives.

REAL

Batch · $0.40 / 10 calls

POST /v1/batch with {requests: [{endpoint, input} ×10]}. 20% off the per-call price. Mixed primitives in one round trip.

SPEC ONLY

Subscription · $200 / 10k calls / mo

Needs a D1 binding for token + rate-limit storage. Returns 501 with the design spec.

SPEC ONLY

Priority · $0.10 / call (2×)

Would need measured p99 & second-region failover. We do not charge for an SLA we cannot deliver.

Why not just regex it

An agent that writes its own regex pays for it in tokens and context, and still gets the edge cases wrong: Unicode NFKC folding, zero-width injection, IBAN mod-97, EIP-55 checksums, LCS-based diff, line-aware chunking — these are easy to get subtly incorrect.

Deterministic

Identical input yields byte-identical output, every run, every deployment. Nothing to seed, nothing to temperature-tune, nothing to re-roll when a retry changes the answer.

Sub-cent

$0.002–$0.01 per call in USDC. Below the spend cap of any agent wallet, so it never trips a human approval step.

Multi-chain

Base by default; opt-in to Polygon or Arbitrum at a 20% premium, or Solana USDC at par. The manifest advertises every supported chain and its price.

Zero marginal cost

Pure CPU string work. No inference, no GPU, no external API. Gross margin is essentially 100%.

Twelve endpoints

All POST, all JSON, all x402-gated. Prices are the exact USDC amount per call on Base.

normalize$0.002

Unicode NFKC, zero-width and bidi stripping, smart-quote and dash folding, whitespace collapse. Returns a stable content hash for exact-equality comparison.

validate$0.002

Email, URL, E.164 phone, IBAN mod-97, card Luhn, UUID, SHA-256, git SHA, EVM EIP-55, domain. Returns {valid, canonical, fingerprint}.

extract$0.005

Emails, URLs, IPv4, phones, money, ISO dates, UUIDs, EVM addresses, SKUs, semver — each with byte offsets and a normalized value.

redact$0.005

Card, IBAN, email, private key, EVM address, phone, IPv4, URL. Returns redacted text plus exact spans and per-class counts before you log or persist.

classify$0.003

Rule-based multi-label over a fixed 12-label taxonomy with weights and a risk score. Same text always gets the same labels.

dedupe$0.01

Exact Jaccard similarity over word-3-shingle sets across up to 200 documents, plus a 64-bit SimHash content fingerprint per document.

diff$0.005

Line-level LCS diff. Returns {insertions, deletions, operations} and, with format: "unified", a unified-diff string. Two implementations of the same algorithm agreed the same edit script.

chunk$0.005

Split text for RAG. sentence strategy packs whole sentences into a size budget — never splits mid-sentence. paragraph prefers boundaries. fixed is a hard char window with overlap.

extract_custom$0.005

Caller-defined fields by regex + type coercion. Types: string, number, bool, date, url, email. Pure deterministic — no LLM call.

validate_json$0.003

JSON-Schema subset validator: type, required, properties, items, minLength, maxLength, pattern, enum, minimum, maximum. Errors collected, not raised.

slugify$0.002

URL-safe IDs from arbitrary text. NFKD-decomposes unicode, lowercases, replaces non-alphanumerics, truncates on separator boundaries. Never emits leading/trailing separators.

hash$0.002

Content addressing: sha256 (Web Crypto), xxhash64 & murmur3 (inline, deterministic across runs). Hex digest + algo + byte count.

batch$0.40 / 10

Aggregator. POST /v1/batch with up to 10 {endpoint, input} requests; one payment of $0.40; 10 results in one round trip. 20% off per-call price.

For agent developers

Add PrepLayer to any MCP client in one command, or call it directly with the x402 + EVM helper.

claude mcp add preplayer https://preplayer.ai/mcp --transport http
GET https://preplayer.ai/v1/manifest.json

Before you rely on it

Heads up: redact, extract and extract_custom use deterministic pattern matching, not a statistical model. They catch the formats listed in the manifest and will not catch a novel PII format. Treat them as a fast first filter, not as compliance.
Also: classify is rule-based and knows nothing about your domain. It is a triage signal with a risk_score, not a judgement. And the token estimate returned by normalize is a documented heuristic, not a BPE tokenizer — use it for budgeting, not for billing.