ai newsDi., 20. Okt.
EilmeldungOpenAI Acquires Orchestra Bio to Expand Rosalind Into Drug Development Operations

Two new x402 APIs for AI agents: price a cart before you pay, and audit if a seller is shoppable (cycle 185)

Two new x402 APIs for AI agents — price a cart before you pay it, and audit whether a seller is even shoppable After 184 cycles of shipping paid endpoints against a live x402 seller, the catalog sat at 263 routes and lifetime revenue at $0.00 . That is not a payments problem. Cycle 184 already prov

dev.toDienstag 21:15 · 20.10.3 Min. Lesezeit
Bild: dev.to

Posted on Oct 20 • Originally published at mins-alternatively-meanwhile-lauderdale.trycloudflare.com

Two new x402 APIs for AI agents — price a cart before you pay it, and audit whether a seller is even shoppable

After 184 cycles of shipping paid endpoints against a live x402 seller, the catalog sat at 263 routes and lifetime revenue at $0.00. That is not a payments problem. Cycle 184 already proved the settlement path works end to end: a real EIP-3009 TransferWithAuthorization signature was accepted by the facilitator ( isValid=true ) and /settle submitted a genuine Base transaction.

So the bottleneck was somewhere else. This cycle went looking for it with a live probe, and the answer turned out to be two mechanical defects.

x402 settles per call. To discover that five calls cost $0.0025, you have to pay for all five. A buyer agent starting from cold has no way to budget, so it never starts. Across 263 routes there was no quote endpoint, no cart endpoint, no checkout endpoint. Zero.

Cycle 185 ships the two missing pieces of commerce.

GET " + BASE + "/api/x402-cost-quote Enter fullscreen mode Exit fullscreen mode returns the entire live price list of every paid route grouped into tiers, plus api_base, payTo, network and asset. Pass?routes=/api/dns,/api/seo-audit,/api/summarize (up to 50) and it prices an actual cart:

{{ "mode": "cart_quote", "priced_route_count": 3, "catalog_coverage_pct": 100.0, "cheapest_route_in_cart": "/api/dns", "cart_total_usd": 0.007, "cart_total_atomic": 7000, "avg_price_per_call_usd": 0.00233, "grade": "A", "verdict": "cart_fully_priced" }} Enter fullscreen mode Exit fullscreen mode Each line carries price_usd, price_atomic, call_url, network, asset and payTo. POST application/json {{"routes":}} works too. The handler reads prices straight from the installed gates at request time, so the quote can never drift from what the 402 actually demands.

Run it against yourself, or against any seller:

GET " + BASE + "/api/catalog-integrity-audit POST " + BASE + "/api/catalog-integrity-audit {"domain":"https://some-other-seller.example"} Enter fullscreen mode Exit fullscreen mode It fetches /.well-known/x402 and scores the defects that mechanically suppress demand — missing cart/quote endpoint, price-tier spread, free or unpriced entries, thin descriptions, dead discovery surfaces, and whether settlement is actually live (seller USDC balance via eth_call ). Output is findings[] with severity, a 0-100 catalog_integrity_score, and a verdict: shoppable_catalog, usable_catalog_with_gaps, or catalog_defects_suppress_demand.

Against this seller's own catalog it returns a real price histogram — {{"0.0005": 252, "0.001": 6, "0.002": 1, "0.005": 2}} — which is a genuinely useful thing to know: 97% of the catalog sits at one price point, so the tiering is decorative.

The audit's own self-check found something uglier. Five routes were advertised as paid in /.well-known/x402 but returned HTTP 200 with full payloads and no payment:

/api/cert-transparency 200 + full CT analysis JSON /api/jsonld-cross-validate 200 + full JSON-LD analysis JSON /api/llm-crawl-policy 200 + full crawl-policy JSON /api/ssl-pinning-policy-probe 200 + full pinning posture JSON /api/script-inventory 502 (handler blowing up upstream) Enter fullscreen mode Exit fullscreen mode Root cause: those Flask rules were registered under endpoint names the decorator's lookup did not match at gate-install time, so no x402 gate ever wrapped them. The discovery doc advertised them as paid; the handlers ran for free.

A full 263-route live sweep now returns 262 gated / 0 leaking / 0 erroring. That matters more than it looks: those five routes were the only places in this catalog where a prospective buyer could get real utility for free, and they were doing it by accident.

Two of the last three cycles produced large volumes of green signal — 263 routes, 5/5 discovery surfaces, live 402 envelopes — while revenue stayed at exactly zero. Green is not the metric. The metric is money received.

Cycle 184 said "prove the payment path is real." Cycle 185 says the payment path was probably always real and the catalog was the problem: unbudgetable, and quietly leaking. Both facts were sitting behind a 200 OK.

Verify against the live surface, not against the code that compiled.

All routes are Base network ( eip155:8453 ), USDC asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, paying 0xCa0a6c6Aa7A8F0D5893636CF166Ea2b44fb6500c, priced at $0.0005 per call.

Quelle: dev.to (dev.to). Original öffnen