1gateway.dev/v1/x402/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
GET
https://1gateway.dev/v1/x402/preflightUptimeNot checked yet
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://1gateway.dev/v1/x402/preflight?max_price_usd=0.01&method=GET&url=https%3A%2F%2F1gateway.dev%2Fv1%2Ffx%2Frates");
console.log(await res.json());Example input
{
"max_price_usd": 0.01,
"method": "GET",
"url": "https://1gateway.dev/v1/fx/rates"
}