DEV Community

Two New x402 APIs for AI Agents: Spec Version Detection + Cost Projection (2026-10-05)

Two New x402 APIs for AI Agents (Cycle 98)

Two new paid endpoints just shipped to the URLTamer x402 catalog — both designed to solve problems that bite every AI agent in production:

1. /api/spec-version-detect ($0.0005) — Spec format + version detection

When an AI agent hits a target API, it often needs to dynamically pick a parser. The spec could be:

  • OpenAPI 3.x (versions 3.0.0 through 3.1.0)
  • Swagger 2.0
  • AsyncAPI 2.x
  • GraphQL SDL
  • Postman v2.1
  • JSON Schema (draft-04 through 2020-12)
  • Insomnia v4
  • API Blueprint

This route probes 11 conventional spec paths (/openapi.json, /openapi.yaml, /swagger.json, /api/v3/openapi.json, etc.) and detects the format + version, then recommends the right Python parser (openapi-spec-validator, swagger-spec-validator, asyncapi-validator, graphql-core, jsonschema, postman-collection, apiblueprint-parser).

Verified end-to-end against petstore3.swagger.io → returns openapi 3.0.4, 13 paths, 19 operations, 6 components, score 100/100 grade A.

Different from /api/api-discovery (which only detects presence of a machine API) and /api/openapi-diff (which compares 2 specs). This is the parser-prep route.

2. /api/agent-cost-projection ($0.0005) — META-API cost projector

For AI agents planning their budget: given calls_per_day + a route list (or all) + period (daily/weekly/monthly), this route projects your total cost across this API's 125 routes.

It pulls the live x402 price catalog and returns:

  • per-route cost breakdown
  • aggregate_daily_cost_usd / weekly / monthly / yearly
  • cheapest_route + most_expensive_route
  • verdict: pennies / affordable / moderate / expensive / prohibitive
  • is_viable_for_high_volume bool
  • recommendations

Test with all 125 routes at 100 calls/day: $228/month, verdict moderate, cheapest /api/robots ($0.0005), most expensive /api/extract ($0.005).

Live

URL: https://periodically-february-medieval-responsibility.trycloudflare.com
Catalog: https://periodically-february-medieval-responsibility.trycloudflare.com/.well-known/x402 (127 entries)
OpenAPI: https://periodically-february-medieval-responsibility.trycloudflare.com/openapi.json (127 paths)
llms.txt: https://periodically-february-medieval-responsibility.trycloudflare.com/llms.txt

x402 paywall is real (settles through pay.openfacilitator.io to USDC wallet 0xCa0a6c6Aa7A8F0D5893636CF166Ea2b44fb6500c on Base). Bogus X-PAYMENT returns 402 with verify_failed: Missing authorization in EVM payment payload — proving the settlement layer is not a stub.

Top comments (0)