dev.kagurazaka.dev/v1/discovery
Generates the discovery documents directories and agents read for a list of paid endpoints (up to 100): an OpenAPI 3.1 document with x-payment-info prices and examples, the /.well-known/x402 resource list and an llms.txt, in the shape x402scan and the CDP Bazaar index.
POST
https://dev.kagurazaka.dev/v1/discoveryUptime100% of 1 check in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://dev.kagurazaka.dev/v1/discovery", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"description":"Current weather for any city.","endpoints":[{"input_example":{"city":"Tokyo"},"input_schema":{"properties":{"city":{"type":"string"}},"required":["city"]},"method":"GET","output_example":{"temp_c":18},"path":"/v1/weather","price_usd":0.001,"summary":"Current weather"}],"name":"Weather API","origin":"https://api.example.com"}),
});
console.log(await res.json());Example input
{
"description": "Current weather for any city.",
"endpoints": [
{
"input_example": {
"city": "Tokyo"
},
"input_schema": {
"properties": {
"city": {
"type": "string"
}
},
"required": [
"city"
]
},
"method": "GET",
"output_example": {
"temp_c": 18
},
"path": "/v1/weather",
"price_usd": 0.001,
"summary": "Current weather"
}
],
"name": "Weather API",
"origin": "https://api.example.com"
}More from x402 Dev Tools
- dev.kagurazaka.dev/v1/decodeDecodes a PAYMENT-REQUIRED, PAYMENT-SIGNATURE or PAYMENT-RESPONSE header (x402 v2, or X-PAYMENT / X-PAYMENT-RESPONSE of v1), base64 or JSON, detecting which it is. Explains it in plain terms (price in dollars, network, payer and payee, validity window, explorer link) and lists problems: wrong USDC EIP-712 domain, expired or not-yet-valid authorizations, amount or payee mismatches, missing Bazaar e0.002
- dev.kagurazaka.dev/v1/encodeEncodes a PaymentRequired, PaymentPayload or settlement response object as the base64 value of its x402 header, for hand-written servers, clients and tests, and reports the same problems /v1/decode finds.0.002
- dev.kagurazaka.dev/v1/facilitatorsAsks the public x402 facilitators (CDP, x402.org, PayAI, x402.rs, Dexter, Daydreams, OpenX402, Mogami, Heurist) for GET /supported right now: whether each answers, its latency, and the x402 versions, schemes and networks it settles. Pass network to keep only those that support it.0.003
- dev.kagurazaka.dev/v1/lintChecks an x402 API origin the way x402scan, the CDP Bazaar and agents read it: fetches /openapi.json and /.well-known/x402, then calls each paid route without paying (up to 30) and decodes its 402. Reports routes that do not answer 402, missing or v1-only PAYMENT-REQUIRED headers, prices that differ from the OpenAPI document, resource URLs that differ from the route, wrong USDC EIP-712 domains, mi0.01
- dev.kagurazaka.dev/v1/networksReference for x402 sellers and clients: each network's CAIP-2 id, v1 name, chain id, USDC contract, decimals, the EIP-712 domain name and version its USDC signs over (read from the contracts), and explorer. Pass network to get one.0.002
- dev.kagurazaka.dev/v1/requirementsBuilds an x402 v2 PaymentRequired object for a price in dollars on one or more networks, with the right USDC contract, atomic amount and EIP-712 domain (name and version) for each, plus the base64 PAYMENT-REQUIRED header value to send with the 402.0.002
