x402 · USDC on base · pay-per-call from $0.0001

Correctness-critical services for autonomous agents

Pay-per-call APIs an AI agent can discover, schema-check, and settle in one HTTP round-trip over the x402 machine-payment protocol. No accounts, no API keys — just a 402 and a USDC payment header.

Browse the catalogAPI referenceMCP endpointManifest

2 distinct paying wallets · 1 returning · 0 active in the last 7 days.

What you can buy

GET/v1/score/{serviceId}$0.01

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.

GET/v1/score/{serviceId}/history$0.02

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.

POST/v1/extract$0.05

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

GET/v1/data/{feed}$0.005

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.

POST/v1/redact$0.02

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.

GET/v1/attest/{id}Free

Returns a previously issued redaction attestation (public key, signature, content hash, detector version) so any party can independently verify a /v1/redact result. Free.

GET/v1/attest/pubkeyFree

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.

GET/v1/preflight$0.01

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.

POST/v1/validate$0.005

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.

POST/v1/state/deposit$0.2

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.

GET/v1/state/balanceFree (credit)

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.

POST/v1/state/save$0.0002–$0.002

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.

GET/v1/state/query$0.0005

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

DELETE/v1/state/{key}Free (credit)

Deletes one state key for the authenticated wallet. Free (no charge); authenticate with the tenant bearer key.

PUT/v1/cache/{key}$0.0001

Redis hot cache set with TTL (wallet-scoped). Spent against prepaid credit. Returns 503 when Redis is unavailable — Postgres state endpoints still work.

POST/v1/state/search$0.005

Semantic nearest-neighbor search over wallet-scoped vectors (pgvector, RLS-isolated). Opt in to embedding on save with embed:true. Premium prepaid-credit tier.

Why agents can trust it

Quickstart

1 · Discover (free)

curl https://x402rail.net/.well-known/x402
curl https://x402rail.net/v1/catalog

2 · Call and pay (x402-fetch)

import { wrapFetchWithPayment } from "@x402/fetch";
import { createWalletClient, http } from "viem";

// wallet client funded with USDC on base
const fetchWithPay = wrapFetchWithPayment(fetch, walletClient);

const res = await fetchWithPay("https://x402rail.net/v1/preflight?url=https://api.example.com");
console.log(await res.json()); // pays the 402 automatically, then returns the result

3 · Or wire it into an MCP-native agent

{
  "mcpServers": {
    "agentics-x402": {
      "url": "https://x402rail.net/v2/x402/discovery/mcp"
    }
  }
}

The MCP server exposes search_resources and proxy_tool_call. It relays your PAYMENT-SIGNATURE (v2) or legacy X-PAYMENT header and never holds funds.