{"items":[{"endpoint":"/v1/score/{serviceId}","method":"GET","description":"Returns a 0-100 reliability score for another x402 service (availability, latency, fidelity, and identity sub-scores) computed from an append-only, hash-anchored probe evidence trail. Use it to vet a counterparty x402 endpoint's trustworthiness before paying it.","keywords":["reliability score","reputation rating","trust score","service health score","endpoint quality","availability score","fidelity score"],"priceUsd":0.01,"network":"base","asset":"USDC","scheme":"exact","acceptedSchemes":["exact"],"billing":"x402","inputSchema":{"type":"object","properties":{"serviceId":{"type":"string","description":"Identifier of the x402 service to score: its registry slug or the hostname-derived id (dots replaced by dashes, e.g. `api-example-com`). Look up known ids via GET /v1/data/x402-directory."}},"required":["serviceId"]},"outputExample":{"serviceId":"demo-service","score":92.4,"components":{"availability":99.1,"latency":87,"fidelity":95.2,"identity":88},"sampleSize":144,"lastProbeAt":"2026-06-18T12:00:00.000Z","evidenceHash":"9f2b1c…"}},{"endpoint":"/v1/score/{serviceId}/history","method":"GET","description":"Returns the reliability-score time series for an x402 service (most recent first), so an agent can judge trend and stability rather than a single point-in-time score.","keywords":["reliability trend","score over time","reputation time series","uptime history","service stability","score history"],"priceUsd":0.02,"network":"base","asset":"USDC","scheme":"exact","acceptedSchemes":["exact"],"billing":"x402","inputSchema":{"type":"object","properties":{"serviceId":{"type":"string","description":"Identifier of the x402 service whose score history to return (see /v1/score/{serviceId})."},"limit":{"type":"integer","minimum":1,"maximum":1000,"default":100,"description":"Maximum number of history points to return (query parameter; newest first)."}},"required":["serviceId"]},"outputExample":{"serviceId":"demo-service","points":[{"score":92.4,"computedAt":"2026-06-18T12:00:00.000Z"},{"score":91.8,"computedAt":"2026-06-18T11:30:00.000Z"}]}},{"endpoint":"/v1/extract","method":"POST","description":"Extracts structured JSON from unstructured text/markdown/HTML according to a caller-supplied JSON Schema. Cost-guarded so the price always exceeds the model token cost; oversized input and plaintext PII/secrets are rejected before settlement (never billed, never forwarded to the model).","keywords":["structured extraction","json schema extraction","text to json","parse unstructured text","data extraction","schema-guided extraction","llm extraction"],"priceUsd":0.05,"network":"base","asset":"USDC","scheme":"exact","acceptedSchemes":["exact"],"billing":"x402","model":{"provider":"anthropic","family":"claude-sonnet","model":"claude-sonnet-4-5","egress":"third_party"},"inputSchema":{"type":"object","properties":{"content":{"type":"string","description":"Raw text, markdown, or HTML to extract from. Capped at the published limit (GET /v1/policy -> limits.extract.maxContentChars); oversized input returns 413 before settlement. Must not contain plaintext PII/secrets (screened, rejected with 422 before the model sees it)."},"schema":{"type":"object","description":"JSON Schema describing the desired output object. The extractor returns data conforming to this shape; richer property descriptions yield better extraction.","additionalProperties":true},"instructions":{"type":"string","description":"Optional extra natural-language guidance to steer the extraction (e.g. disambiguation rules)."}},"required":["content","schema"]},"outputExample":{"data":{"title":"Quarterly Report","revenueUsd":1250000,"fiscalQuarter":"Q2-2026"},"model":"claude-sonnet-4-5","tokenUsage":{"input":812,"output":64}}},{"endpoint":"/v1/data/{feed}","method":"GET","description":"Fetches an owned, continuously-maintained niche data feed. Current feed `x402-directory`: a probed directory of known x402 services with their live reliability scores, networks, and last-probe timestamps.","keywords":["x402 directory","service directory","agent data feed","x402 services list","reliability directory","niche data feed"],"priceUsd":0.005,"network":"base","asset":"USDC","scheme":"exact","acceptedSchemes":["exact"],"billing":"x402","inputSchema":{"type":"object","properties":{"feed":{"type":"string","enum":["x402-directory"],"description":"Feed identifier. Supported: `x402-directory` (the probed directory of known x402 services)."}},"required":["feed"]},"outputExample":{"feed":"x402-directory","asOf":"2026-06-18T12:00:00.000Z","rows":[{"serviceId":"demo-service","url":"https://x402rail.net/v1/health/simple","network":"base","score":92.4,"sampleSize":144,"lastProbeType":"x402","lastProbeAt":"2026-06-18T12:00:00.000Z"}]}},{"endpoint":"/v1/redact","method":"POST","description":"Redacts PII and secrets (emails, phone numbers, SSNs, credit cards, API keys, JWTs, private keys) from caller content and returns the redacted text plus an off-chain Ed25519-signed attestation binding input to output. Choose how spans are replaced: `remove` (default `[REDACTED]`), `mask` (format-preserving partial masking), or `pseudonymize` (stable keyed HMAC tokens). The attestation is independently verifiable at /v1/attest/{id}; no content is forwarded to any model.","keywords":["pii redaction","redact secrets","data sanitization","scrub pii","signed attestation","compliance","remove sensitive data","anonymize"],"priceUsd":0.02,"network":"base","asset":"USDC","scheme":"exact","acceptedSchemes":["exact"],"billing":"x402","inputSchema":{"type":"object","properties":{"content":{"type":"string","description":"Text to redact. Capped at the published limit (GET /v1/policy -> limits.extract.maxContentChars)."},"redactionMode":{"type":"string","enum":["remove","mask","pseudonymize"],"default":"remove","description":"How to replace detected spans: `remove` → `[REDACTED]` (default); `mask` → format-preserving partial masking (e.g. `a***a@e***e.com`, `***-**-6789`); `pseudonymize` → stable keyed tokens (`pii_<16 hex>`)."}},"required":["content"]},"outputExample":{"redacted":"Contact a***a@e***e.com or call ***-***-0100.","detectors":["email","phone"],"redactionMode":"mask","attestation":{"id":"8f14e45f-ceea-4e2a-9b1a-3c2e6f0a1b2c","algorithm":"ed25519","hash":"9f2b1c…","signature":"MEUCIQ…","publicKey":"-----BEGIN PUBLIC KEY-----\n…\n-----END PUBLIC KEY-----\n","detectorVersion":"redact-v1","createdAt":"2026-06-18T12:00:00.000Z"},"attestationUrl":"https://x402rail.net/v1/attest/8f14e45f-ceea-4e2a-9b1a-3c2e6f0a1b2c"}},{"endpoint":"/v1/attest/{id}","method":"GET","description":"Returns a previously issued redaction attestation (public key, signature, content hash, detector version) so any party can independently verify a /v1/redact result. Free.","keywords":["verify attestation","attestation lookup","signature verification","audit proof"],"priceUsd":0,"network":"base","asset":"USDC","scheme":"exact","acceptedSchemes":["exact"],"billing":"x402","inputSchema":{"type":"object","properties":{"id":{"type":"string","description":"Attestation id returned by POST /v1/redact (path parameter)."}},"required":["id"]},"outputExample":{"attestation":{"id":"8f14e45f-ceea-4e2a-9b1a-3c2e6f0a1b2c","algorithm":"ed25519","hash":"9f2b1c…","signature":"MEUCIQ…","publicKey":"-----BEGIN PUBLIC KEY-----\n…\n-----END PUBLIC KEY-----\n","detectorVersion":"redact-v1","createdAt":"2026-06-18T12:00:00.000Z"},"detectors":["email","phone"],"verified":true}},{"endpoint":"/v1/attest/pubkey","method":"GET","description":"Returns the current Ed25519 public key (SPKI PEM) used to sign /v1/redact attestations, so any party can verify a redaction proof offline without first holding an attestation id. Free.","keywords":["attestation public key","ed25519 public key","verify offline","signing key","redaction proof"],"priceUsd":0,"network":"base","asset":"USDC","scheme":"exact","acceptedSchemes":["exact"],"billing":"x402","inputSchema":{"type":"object","description":"No parameters. GET the current attestation signing public key.","properties":{}},"outputExample":{"algorithm":"ed25519","publicKey":"-----BEGIN PUBLIC KEY-----\n…\n-----END PUBLIC KEY-----\n","detectorVersion":"redact-v1"}},{"endpoint":"/v1/preflight","method":"GET","description":"Vets an external x402 service before you pay it: fetches the target's /.well-known/x402 manifest (who is paid, which chain/scheme), runs a live health probe (reachability + latency), and returns our own append-only reliability score for that host if we have probed it. One paid call to decide whether a counterparty endpoint is safe to settle against.","keywords":["vet x402 service before paying","preflight check","go no-go decision","before you pay","counterparty risk","manifest probe","service due diligence","x402 safety check","endpoint verification"],"priceUsd":0.01,"network":"base","asset":"USDC","scheme":"exact","acceptedSchemes":["exact"],"billing":"x402","inputSchema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute http(s) URL of the x402 service (or one of its endpoints) to vet (query parameter). Private/loopback addresses are rejected. We derive the origin to fetch /.well-known/x402 and probe health."}},"required":["url"]},"outputExample":{"url":"https://api.example.com/v1/quote","origin":"https://api.example.com","serviceId":"api-example-com","manifest":{"provider":"Example","paymentEnv":"mainnet","scheme":"exact","payTo":"0xabc…","networks":["base"],"advertisedSchemes":["exact"],"receiveOnly":true},"health":{"url":"https://api.example.com/v1/health/simple","ok":true,"httpStatus":200,"latencyMs":142},"reputation":{"serviceId":"api-example-com","score":88.5,"sampleSize":60},"assessment":{"selfDescribes":true,"reachable":true,"hasReliabilityScore":true,"notes":[]},"checkedAt":"2026-06-18T12:00:00.000Z"}},{"endpoint":"/v1/validate","method":"POST","description":"Validates a JSON value against a caller-supplied JSON Schema and returns a definitive valid/invalid verdict with precise, JSON-Pointer-addressed errors. Use it to gate data handed between tools or returned by an LLM before acting on it. Pure, deterministic, no model involved.","keywords":["json schema validation","validate json","schema check","data validation","json pointer errors","verify payload shape","structured output validation"],"priceUsd":0.005,"network":"base","asset":"USDC","scheme":"exact","acceptedSchemes":["exact"],"billing":"x402","inputSchema":{"type":"object","properties":{"schema":{"type":"object","description":"The JSON Schema to validate against (draft 2020-12 / draft-07 compatible). An invalid schema is rejected with 422 before settlement.","additionalProperties":true},"value":{"description":"The JSON value to validate against `schema` (any JSON type: object, array, string, number, boolean, null)."}},"required":["schema","value"]},"outputExample":{"valid":false,"errorCount":1,"errors":[{"path":"/email","keyword":"format","message":"must match format \"email\""}]}},{"endpoint":"/v1/state/deposit","method":"POST","description":"Funds prepaid State Hub credit with a single x402 settlement and returns a wallet-scoped tenant bearer key. One deposit then covers many micro-priced ops (save/query/search/cache) billed in-DB against the credit — pay settlement overhead once, then run durable agent memory cheaply at scale. Top up any time by depositing again.","keywords":["prepaid credit","agent state deposit","fund balance","tenant key","state hub deposit","top up"],"priceUsd":0.2,"network":"base","asset":"USDC","scheme":"exact","acceptedSchemes":["exact"],"billing":"x402","inputSchema":{"type":"object","description":"No request body. Pay the x402 charge; the settling wallet is credited and a tenant key is returned once.","properties":{},"additionalProperties":false},"outputExample":{"tenantKey":"tnt_9f2b1c4d…","creditUsd":0.2}},{"endpoint":"/v1/state/balance","method":"GET","description":"Returns the remaining prepaid State Hub credit (USD) for the wallet that owns the supplied tenant key. Free (no x402 charge); authenticate with the tenant bearer key.","keywords":["prepaid balance","remaining credit","state hub balance","account balance"],"priceUsd":0,"network":"base","asset":"USDC","scheme":"exact","acceptedSchemes":["exact"],"billing":"prepaid_credit","inputSchema":{"type":"object","properties":{"tenantKey":{"type":"string","description":"Bearer token minted by POST /v1/state/deposit (sent as `Authorization: Bearer <tenantKey>`). Scopes every State Hub op to the paying wallet."}},"required":["tenantKey"]},"outputExample":{"creditUsd":0.1864}},{"endpoint":"/v1/state/save","method":"POST","description":"Stores a JSON document under a key, scoped to the paying wallet, with a TTL. Priced by TTL tier and spent against prepaid credit (fund once via POST /v1/state/deposit). Every doc is screened at write time (PII/secrets/opaque blobs) per GET /v1/policy. Tier-0 inline screen returns in <50 ms; deeper review is async.","keywords":["agent memory","state storage","json store","wallet-scoped state","key value store","durable state","session memory","persist json"],"priceUsd":0.0002,"network":"base","asset":"USDC","scheme":"exact","acceptedSchemes":["exact"],"billing":"prepaid_credit","priceTiers":{"shortUsd":0.0002,"stdUsd":0.0004,"extUsd":0.001,"maxUsd":0.002},"slaP99Ms":50,"inputSchema":{"type":"object","properties":{"tenantKey":{"type":"string","description":"Bearer token minted by POST /v1/state/deposit (sent as `Authorization: Bearer <tenantKey>`). Scopes every State Hub op to the paying wallet."},"key":{"type":"string","description":"Storage key, unique per wallet. Must match ^[a-zA-Z0-9._:-]+$ (max 256 chars)."},"doc":{"type":"object","description":"Arbitrary JSON document to store (object, array, or scalar). Capped at the published per-doc byte limit (GET /v1/policy).","additionalProperties":true},"ttlSeconds":{"type":"integer","minimum":1,"description":"Requested time-to-live in seconds, clamped to the max TTL ceiling. Determines the price tier (short/std/ext/max). Omit for the default short tier."}},"required":["tenantKey","key","doc"]},"outputExample":{"ok":true,"key":"agent:run-42:scratch","expiresAt":"2026-06-18T12:05:00.000Z","scanStatus":"clean"}},{"endpoint":"/v1/state/query","method":"GET","description":"Reads wallet-scoped state by exact key or key prefix. Spent against prepaid credit (fund once via POST /v1/state/deposit). Returns only non-expired rows belonging to the authenticated wallet (RLS-isolated).","keywords":["query state","read state","prefix scan","fetch memory","list keys","state lookup"],"priceUsd":0.0005,"network":"base","asset":"USDC","scheme":"exact","acceptedSchemes":["exact"],"billing":"prepaid_credit","slaP99Ms":50,"inputSchema":{"type":"object","properties":{"tenantKey":{"type":"string","description":"Bearer token minted by POST /v1/state/deposit (sent as `Authorization: Bearer <tenantKey>`). Scopes every State Hub op to the paying wallet."},"key":{"type":"string","description":"Exact key to fetch (query parameter). Mutually usable with `prefix`."},"prefix":{"type":"string","description":"Key prefix to scan (query parameter); returns all matching non-expired rows."}},"required":["tenantKey"]},"outputExample":{"items":[{"key":"agent:run-42:scratch","doc":{"step":3,"status":"in_progress"},"expiresAt":"2026-06-18T12:05:00.000Z","scanStatus":"clean"}]}},{"endpoint":"/v1/state/{key}","method":"DELETE","description":"Deletes one state key for the authenticated wallet. Free (no charge); authenticate with the tenant bearer key.","keywords":["delete state","remove key","erase memory","drop state"],"priceUsd":0,"network":"base","asset":"USDC","scheme":"exact","acceptedSchemes":["exact"],"billing":"prepaid_credit","inputSchema":{"type":"object","properties":{"tenantKey":{"type":"string","description":"Bearer token minted by POST /v1/state/deposit (sent as `Authorization: Bearer <tenantKey>`). Scopes every State Hub op to the paying wallet."},"key":{"type":"string","description":"The exact state key to delete (path parameter)."}},"required":["tenantKey","key"]},"outputExample":{"ok":true,"key":"agent:run-42:scratch"}},{"endpoint":"/v1/cache/{key}","method":"PUT","description":"Redis hot cache set with TTL (wallet-scoped). Spent against prepaid credit. Returns 503 when Redis is unavailable — Postgres state endpoints still work.","keywords":["cache","hot key","ttl","redis","session scratch"],"priceUsd":0.0001,"network":"base","asset":"USDC","scheme":"exact","acceptedSchemes":["exact"],"billing":"prepaid_credit","inputSchema":{"type":"object","properties":{"tenantKey":{"type":"string","description":"Bearer token minted by POST /v1/state/deposit (sent as `Authorization: Bearer <tenantKey>`). Scopes every State Hub op to the paying wallet."},"key":{"type":"string","description":"Cache key (path parameter); must match ^[a-zA-Z0-9._:-]+$."},"value":{"description":"JSON-serializable value to store in Redis for fast reads."},"ttlSeconds":{"type":"integer","minimum":1,"maximum":86400,"description":"Time-to-live in seconds (default from server config when omitted)."}},"required":["tenantKey","key","value"]},"outputExample":{"ok":true,"key":"agent:scratch","ttlSeconds":300}},{"endpoint":"/v1/state/search","method":"POST","description":"Semantic nearest-neighbor search over wallet-scoped vectors (pgvector, RLS-isolated). Opt in to embedding on save with embed:true. Premium prepaid-credit tier.","keywords":["semantic search","vector","nearest neighbor","embed","memory search"],"priceUsd":0.005,"network":"base","asset":"USDC","scheme":"exact","acceptedSchemes":["exact"],"billing":"prepaid_credit","inputSchema":{"type":"object","properties":{"tenantKey":{"type":"string","description":"Bearer token minted by POST /v1/state/deposit (sent as `Authorization: Bearer <tenantKey>`). Scopes every State Hub op to the paying wallet."},"query":{"type":"string","description":"Natural-language or keyword query to embed and match."},"k":{"type":"integer","minimum":1,"maximum":50,"description":"Maximum number of nearest neighbors to return (defaults to server config when omitted)."}},"required":["tenantKey","query"]},"outputExample":{"hits":[{"key":"agent:run-42:scratch","distance":0.12,"doc":{"step":3}}],"count":1}}],"policyUrl":"https://x402rail.net/v1/policy","discovery":{"policyUrl":"https://x402rail.net/v1/policy","wellKnownUrl":"https://x402rail.net/.well-known/x402","catalogUrl":"https://x402rail.net/v1/catalog","openapiUrl":"https://x402rail.net/openapi.json","mcpUrl":"https://x402rail.net/v2/x402/discovery/mcp","wellKnownPath":"/.well-known/x402"}}