{"protocolVersion":"0.3.0","name":"PrepLayer.ai","description":"Deterministic text-preparation primitives for agents — normalize, validate, extract, redact, classify, dedupe, diff, chunk, extract_custom, validate_json, slugify, hash. Pure CPU: same input, same output, no LLM or GPU underneath. Paid per call in USDC over x402 (no accounts, no API keys).","url":"https://api.maximusmediahouse.com/","preferredTransport":"HTTP+JSON","version":"0.2.0","provider":{"organization":"Maximus Media House","url":"https://api.maximusmediahouse.com"},"documentationUrl":"https://api.maximusmediahouse.com/llms-full.txt","capabilities":{"streaming":false,"pushNotifications":false,"stateTransitionHistory":false},"defaultInputModes":["application/json","text/plain"],"defaultOutputModes":["application/json"],"skills":[{"id":"normalize","name":"normalize","description":"Deterministic text normalization: Unicode NFKC, zero-width/bidi stripping, smart-quote and dash folding, whitespace collapse, case folding. Returns a stable content hash so two texts can be compared for exact equality.","tags":["text-processing","deterministic","x402"],"inputModes":["application/json"],"outputModes":["application/json"],"examples":["{\"request\":{\"text\":\"Hello,   world—\"},\"response\":{\"normalized\":\"hello world-\",\"content_hash\":\"sha256:9f86d0…\"}}"]},{"id":"validate","name":"validate","description":"Validate and canonicalize one identifier: email, URL, E.164 phone, IBAN (mod-97), payment card (Luhn), UUID, SHA-256, git SHA, EVM address (EIP-55) or domain. Returns {valid, canonical, fingerprint}.","tags":["text-processing","deterministic","x402"],"inputModes":["application/json"],"outputModes":["application/json"],"examples":["{\"request\":{\"kind\":\"email\",\"value\":\"User@Example.COM\"},\"response\":{\"valid\":true,\"canonical\":\"user@example.com\",\"fingerprint\":\"email:9f86d0…\"}}"]},{"id":"extract","name":"extract","description":"Extract structured fields from unstructured text with byte offsets and normalized values: emails, URLs, IPv4, phones, money amounts, ISO dates, UUIDs, EVM addresses, SKUs, semver.","tags":["text-processing","deterministic","x402"],"inputModes":["application/json"],"outputModes":["application/json"],"examples":["{\"request\":{\"text\":\"Mail user@example.com or visit https://example.com\",\"types\":[\"email\",\"url\"]},\"response\":{\"fields\":{\"email\":[\"user@example.com\"],\"url\":[\"https://example.com\"]},\"count\":2}}"]},{"id":"redact","name":"redact","description":"Redact PII from text before it is stored or logged. Returns redacted text plus exact byte spans and counts per class: credit_card, iban, email, private_key, evm_address, phone, ipv4, url.","tags":["text-processing","deterministic","x402"],"inputModes":["application/json"],"outputModes":["application/json"],"examples":["{\"request\":{\"text\":\"SSN 123-45-6789\",\"classes\":[\"ssn\"]},\"response\":{\"redacted\":\"Contact [REDACTED:email]\",\"spans\":[{\"cls\":\"email\",\"start\":8,\"end\":24}]}}"]},{"id":"classify","name":"classify","description":"Rule-based multi-label text classification over a fixed taxonomy (urgency, financial_promise, credential_request, crypto_mention, cta, legal_offer, medical_claim, seo_spam, url_shortener, press_release, question, has_contact). Deterministic - identical text always yields identical labels.","tags":["text-processing","deterministic","x402"],"inputModes":["application/json"],"outputModes":["application/json"],"examples":["{\"request\":{\"text\":\"The quick brown fox jumps over the lazy dog.\"},\"response\":{\"language\":\"en\",\"language_confidence\":0.97,\"content_type\":\"prose\"}}"]},{"id":"dedupe","name":"dedupe","description":"Near-duplicate detection across a batch of documents. Exact Jaccard similarity over word-3-shingle sets decides duplication; a 64-bit SimHash is returned per document as a compact content fingerprint. Up to 200 documents per call.","tags":["text-processing","deterministic","x402"],"inputModes":["application/json"],"outputModes":["application/json"],"examples":["{\"request\":{\"documents\":[\"the quick brown fox jumps over the lazy dog\",\"the quick brown fox jumped over a lazy dog\"],\"threshold\":60},\"response\":{\"groups\":[{\"ids\":[\"a\",\"b\"],\"similarity\":0.94}],\"duplicate_count\":1}}"]},{"id":"diff","name":"diff","description":"Line-level LCS diff of two text blobs. Returns a structured edit script with insertions, deletions, unchanged line counts and per-operation metadata; with format='unified' also returns a unified-diff string.","tags":["text-processing","deterministic","x402"],"inputModes":["application/json"],"outputModes":["application/json"],"examples":["{\"request\":{\"a\":\"the quick brown fox\",\"b\":\"the quick red fox\",\"format\":\"unified\"},\"response\":{\"changed\":true,\"added\":1,\"removed\":0,\"diff\":\"@@ -1 +1 @@\"}}"]},{"id":"chunk","name":"chunk","description":"Split long text into pieces for RAG retrieval. Strategies: 'sentence' packs whole sentences into a size budget and never splits mid-sentence; 'paragraph' prefers \\n\\n boundaries; 'fixed' is a hard char window with overlap. The highest-value endpoint for agents that build retrieval pipelines.","tags":["text-processing","deterministic","x402"],"inputModes":["application/json"],"outputModes":["application/json"],"examples":["{\"request\":{\"text\":\"…\",\"size\":1000,\"overlap\":100,\"strategy\":\"sentence\"},\"response\":{\"chunks\":[{\"index\":0,\"text\":\"…\",\"size\":1000}],\"count\":3}}"]},{"id":"extract_custom","name":"extract_custom","description":"Pull caller-defined structured fields from text using regex patterns with deterministic type coercion. Supported types: string, bool, date, url, email, number. Returns {fields: {name: value|null}, found, missing}. Pure deterministic — no LLM call.","tags":["text-processing","deterministic","x402"],"inputModes":["application/json"],"outputModes":["application/json"],"examples":["{\"request\":{\"text\":\"Ticket TKT-1234 for $42.00\",\"fields\":[{\"name\":\"ticket_id\",\"type\":\"string\",\"pattern\":\"TKT-[0-9]+\"}]},\"response\":{\"fields\":{\"ticket_id\":[\"TKT-1234\"]}}}"]},{"id":"validate_json","name":"validate_json","description":"Deterministic JSON-Schema subset validator. Catches malformed JSON before it breaks a pipeline. Supports: type, required, properties, items, minLength, maxLength, pattern, enum, minimum, maximum, additionalProperties. No external dependencies.","tags":["text-processing","deterministic","x402"],"inputModes":["application/json"],"outputModes":["application/json"],"examples":["{\"request\":{\"json\":\"{\\\"b\\\":2,\\\"a\\\":1}\"},\"response\":{\"valid\":true,\"canonical\":\"{\\\"a\\\":1,\\\"b\\\":2}\"}}"]},{"id":"slugify","name":"slugify","description":"URL-safe slug from arbitrary text. NFKD-decomposes unicode (é -> e), lowercases, replaces every non-[a-z0-9] run with a separator, strips leading/trailing separators, truncates on separator boundaries (never mid-word).","tags":["text-processing","deterministic","x402"],"inputModes":["application/json"],"outputModes":["application/json"],"examples":["{\"request\":{\"text\":\"Café Déjà Vu — Episode 1\"},\"response\":{\"slug\":\"cafe-deja-vu-episode-1\"}}"]},{"id":"hash","name":"hash","description":"Content-addressable hashing for caching and dedup. Three algorithms: sha256 (via node:crypto / Web Crypto), xxhash64 and murmur3 (inline pure-JS, deterministic across runs). Returns hex digest + algorithm + byte count.","tags":["text-processing","deterministic","x402"],"inputModes":["application/json"],"outputModes":["application/json"],"examples":["{\"request\":{\"text\":\"some content\",\"algo\":\"sha256\"},\"response\":{\"algo\":\"sha256\",\"hash\":\"9f86d081884c7d65…\"}}"]},{"id":"batch","name":"batch","description":"Run up to 10 primitive calls in one round trip for one x402 payment of $0.02 (= $0.0020 per call, below the priciest single-call route at $0.01). Each request names an `endpoint` (normalize, validate, extract, redact, classify, dedupe, diff, chunk, extract_custom, validate_json, slugify, hash) and its input; results return in request order. Single payment, no streaming. Larger rungs cost less per call: /v1/batch/50 ($0.075, $0.0015/call) and /v1/batch/100 ($0.100, $0.0010/call).","tags":["text-processing","deterministic","x402"],"inputModes":["application/json"],"outputModes":["application/json"],"examples":["{\"request\":{\"requests\":[{\"endpoint\":\"normalize\",\"input\":{\"text\":\"Hello\"}}]},\"response\":{\"results\":[{\"endpoint\":\"normalize\",\"ok\":true}],\"billed_calls\":2}}"]},{"id":"batch50","name":"batch50","description":"Run up to 50 primitive calls in one round trip. One x402 payment of $0.075 (=$0.0015 per call — cheaper per call than the 10-slot batch). Same `{endpoint, input}` request shape as /v1/batch; the response carries up to 50 results in order. Built for a production buyer running a whole corpus in one settle.","tags":["text-processing","deterministic","x402"],"inputModes":["application/json"],"outputModes":["application/json"],"examples":["{\"request\":{\"requests\":[{\"endpoint\":\"normalize\",\"input\":{\"text\":\"Hello\"}}]},\"response\":{\"tier\":\"batch50\",\"results\":[{\"endpoint\":\"normalize\",\"ok\":true}],\"ok_count\":1,\"error_count\":0}}"]},{"id":"batch100","name":"batch100","description":"Run up to 100 primitive calls in one round trip. One x402 payment of $0.100 (=$0.0010 per call — the deepest rung of the batch ladder, cheaper per call than the 10- and 50-slot batches). Same `{endpoint, input}` request shape as /v1/batch. The volume mechanic for a corpus-holding buyer: one settle per 100 calls.","tags":["text-processing","deterministic","x402"],"inputModes":["application/json"],"outputModes":["application/json"],"examples":["{\"request\":{\"requests\":[{\"endpoint\":\"hash\",\"input\":{\"text\":\"Hello\"}}]},\"response\":{\"tier\":\"batch100\",\"results\":[{\"endpoint\":\"hash\",\"ok\":true}],\"ok_count\":1,\"error_count\":0}}"]},{"id":"subscription","name":"subscription","description":"Recurring tier: a PREPAID CALL BALANCE. One x402 payment of $1.00 credits 1,000 units of prepaid capacity (= $0.0010 per call), drawn down across sessions on the cheap deterministic routes (<= $0.01). The funded balance is the source of truth, queryable at GET /v1/subscription/balance, and remaining_calls is reported on every paid response. Non-auto-renewing: a one-time top-up whose spend stops at zero. No account, no API key, no monthly lock-in.","tags":["text-processing","deterministic","x402"],"inputModes":["application/json"],"outputModes":["application/json"],"examples":["{\"request\":{\"network\":\"eip155:8453\"},\"response\":{\"ok\":true,\"tier\":\"subscription\",\"prepaid\":{\"wallet\":\"0x…\",\"calls_credited\":1000,\"remaining_calls\":1000}}}"]}],"securitySchemes":{"x402":{"type":"http","scheme":"x402","description":"Pay per call in USDC via x402 (scheme 'exact'; Base, Polygon, Arbitrum, Solana). A request with no payment header receives HTTP 402 carrying the payment requirements. A funded $0.10 starter credit is available at no cost on routes priced <= $0.01 when a wallet identity is supplied as X-Agent-Id: 0x<40-hex-wallet> with no payment header."}},"security":[{"x402":[]}],"supportsAuthenticatedExtendedCard":false}