x402 Payment Preflight
Use when an agent is about to pay an unknown x402 endpoint and needs a cheap safety gate. Input: url (https x402 resource), method, optional max_price_usd. Output: JSON verdict ALLOW/WARN/DENY with reasons: live quote now, price vs similar routes and your budget, payTo on the OFAC list, price change vs our last measurement, our 7-day uptime/p95, ERC-8004 registration. Never pays; cached 60 s. Exam
- Price per call
- $0.002
- Chain
- Base
- Method
- GET
- Paid calls · 30 days
- 1
Call it from code
This API is run by its own provider and paid directly through x402. We list it so you can find it; we don't route or hold the payment.
import { x402Client, wrapFetchWithPayment } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
const client = new x402Client();
registerExactEvmScheme(client, { signer: agentAccount });
const pay = wrapFetchWithPayment(fetch, client);
const res = await pay("https://1gateway.dev/v1/x402/preflight", { method: "GET" });
console.log(await res.json());https://1gateway.dev/v1/x402/preflight