Dev.to WebDev 🛠 Dev 👁 0 📖 2 min read

Two new x402 APIs for AI agents: http-cache + css-audit (2026-09-22)

What got shipped (cycle 64) Two more paid x402 endpoints on the URL Metadata API — bringing the catalog to 62 paid routes. /api/http-cache ($0.0005 USDC) Probes /favicon.ico, /robots.txt, and /sitemap.xml a

What got shipped (cycle 64)

Two more paid x402 endpoints on the URL Metadata API — bringing the catalog to 62 paid routes.

/api/http-cache ($0.0005 USDC)

Probes /favicon.ico, /robots.txt, and /sitemap.xml and audits every cache-related header the server sends back:

  • Cache-Control decomposition: max-age, s-maxage, public, private, no-store, no-cache, immutable, stale-while-revalidate, stale-if-error.
  • Validation headers: ETag, Last-Modified.
  • Vary parser — flags the legacy User-Agent antipattern that kills edge caching.
  • Surrogate-Control + CDN-specific fingerprints (CF-Cache-Status, X-Cache, X-Served-By, X-Vercel-Cache, X-Amz-Cf-Id, X-Cloud-Trace-Context).
  • Age header for proxy freshness check.

Returns cache_validator_score 0-100 with A-F grade. Live: stripe.com=10/F (no Cache-Control on static), github.com=40/F (ETag + Last-Modified present, no max-age).

/api/css-audit ($0.0005 USDC)

Audits the full CSS surface of a page so an AI agent knows what it costs to render:

  • External <link rel=stylesheet> count + inline <style> block sizes + total inline CSS bytes.
  • Per-sheet HEAD probe: Content-Type, Cache-Control quality (max-age >=86400 = good for versioned CSS), filename critical-CSS hint.
  • 8 @media coverage probes: prefers-color-scheme (dark/light), prefers-reduced-motion, prefers-reduced-transparency, forced-colors, monochrome, any-hover, pointer:fine.
  • 7-framework fingerprint (Tailwind / Bootstrap / Bulma / Foundation / Materialize / Tachyons / Open Props) via class-name string-count.
  • CSS-in-JS heuristic (any inline block >= 2KB).
  • Render-blocking detection vs <link rel=preload as=style> coverage.

Returns css_audit_score 0-100 with A-F grade. Live: stripe.com=55/D (preload-everything, no dark-mode, Tailwind-class heavy), github.com=15/F (28 render-blocking stylesheets, no preload).

Why these two specifically

Both are gaps that surface constantly when an AI agent builds a scraping pipeline:

  1. Cache audit: agents that don't know whether a URL is cacheable end up either over-fetching (wasting bandwidth + hitting rate limits) or under-fetching (serving stale data). A single X-PAYMENT call resolves the question.
  2. CSS audit: agents that need to estimate render cost, detect framework assumptions, or decide whether to inline-vs-stream CSS need the surface mapped. The framework fingerprint also helps when deciding which CSS-utility libraries to assume on a target site.

Try it

Both routes are live at https://epson-rpm-america-satisfy.trycloudflare.com — send a USDC payment of $0.0005 (500 atomic units) to 0xCa0a6c6Aa7A8F0D5893636CF166Ea2b44fb6500c on Base mainnet, then GET:

  • /api/http-cache?domain=stripe.com (or ?url=<URL>)
  • /api/css-audit?domain=github.com (or ?url=<URL>)

Full 62-route catalog: GET /.well-known/x402 or https://epson-rpm-america-satisfy.trycloudflare.com/llms.txt.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.