PrepLayer.ai

Run a whole job.
Deterministic text prep for agents.

Twelve x402-paid primitives — normalize, validate, extract, redact, classify, dedupe, diff, chunk, extract_custom, validate_json, slugify, hash — and a batch aggregator: one $0.40 payment runs 10 calls in a single round trip (=$0.04 each). Dress one cheap per-call to try, then run the whole job in batch. Pure CPU, byte-identical output, multi-chain on Base, Solana, Polygon and Arbitrum.

No account. No API key. No contract. $0.40/10 in batch; per-call $0.002–$0.01 to try. A funded $0.50 demo envelope lets visiting wallets draw prepaid credit on cheap routes.

Try it, then run a whole job

The paying wallet is the identity. Start with the live demo (no wallet, ~1s), draw prepaid starter credit if you just want to poke a real route, then run the whole job as one $0.40 batch — or one cheap per-call if you need a single result right now.

  1. Try it free. GET /v1/demo runs the real deterministic engine — same output as the paid route, no payment needed, verifiable in ~1s.
  2. Draw prepaid credit. Add X-Agent-Id: 0x… to a cheap route (≤$0.01) with no payment; the funded $0.50 envelope covers it. No account, no key.
  3. Run the job in batch. POST /v1/batch with up to 10 {endpoint, input} pairs = one $0.40 payment, 10 results, one round trip. Repay the funnel with per-call anywhere you need one result now.
# 1. try the engine — no wallet, ~1s, deterministic
  curl https://preplayer.ai/v1/demo # live HTML page, press Run

  # 2. funded demo envelope — cheap route, prepaid credit
  curl https://preplayer.ai/v1/dedupe -H 'Content-Type: application/json'     -H 'X-Agent-Id: 0x0deaBEEf…'     -d '{"documents":["the quick brown fox","the swift brown dog"],"threshold":60}'

  # 3. repeat product — whole job in one $0.40 batch
  curl https://preplayer.ai/v1/batch     -H 'Content-Type: application/json'     -H 'X-Payment: <base64 x402 payload>'     -d '{"requests":[{"endpoint":"normalize","input":{"text":"hello world"}},{"endpoint":"hash","input":{"text":"hello world"}}]}'

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.

REPEAT PRODUCT

Batch · $0.40 / 10 calls

POST /v1/batch with {requests: [{endpoint, input} ×10]}. One round trip, one payment. 20% off the per-call price. This is how you run a whole job.

TRIAL

Single · $0.002–0.01 / call

Default. One request, one x402 payment, one result. The sub-cent foot-in-door — try any of the 12 primitives before committing to a batch.

FUNDED DEMO

Starter credit · $0.50 envelope

Send X-Agent-Id with no payment on a cheap route (≤$0.01) to draw prepaid credit from the funded pool. See /v1/credit/status. Exhausts to paid.

SPEC ONLY

Subscription / Priority

Specified in the manifest but return 501. Charging for an SLA we cannot yet guarantee would be dishonest.

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%.

Media generation: not offered here. This endpoint serves deterministic text prep only. Any GPU/media/video pipeline elsewhere is experimental and gated — do not treat it as a live API.

Twelve endpoints

All POST, all JSON, all x402-gated. Batch-first: prices are per single call on Base; run 10 in one /v1/batch call for $0.40 (=$0.04 each).

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 — the repeat product. 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. Run a whole job, then drill in with per-call where you need one result now.

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.