Discovery endpoint for x402 APIs
x402helper.xyz/discovery
Discovery endpoint for x402 APIs. Send a task in natural language (or a pre-split list of sub-tasks); receive a set of routes that together address the request, plus a total price estimate.
POST
https://x402helper.xyz/discoveryUptimeNot checked yet
30 days agoToday
Call it from an agent
import { wrapFetchWithPayment } from "x402-fetch";
import { privateKeyToAccount } from "viem/accounts";
const pay = wrapFetchWithPayment(fetch, privateKeyToAccount(process.env.AGENT_KEY));
const res = await pay("https://x402helper.xyz/discovery", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"budget":{"currency":"USDC","maxTotalPrice":0.7},"queries":["needed to payment test","web-read-markdown"],"maxRoutesPerQuery":4}),
});
console.log(await res.json());Example input
{
"budget": {
"currency": "USDC",
"maxTotalPrice": 0.7
},
"queries": [
"needed to payment test",
"web-read-markdown"
],
"maxRoutesPerQuery": 4
}