80trust / 100

X402 Preflight

by Agent Utility Suite in Onchain & crypto

x402 APIPassing, checked 19 min ago

Preflight before paying any x402 endpoint: validates its 402 challenge (network, amount, asset, payTo, timeout, Bazaar declaration), prices it in USD, screens the payTo wallet (OFAC, wallet vs token contract) and shows real usage (Bazaar 30-day calls and unique payers). Budget check with max_price_usd. ok_to_pay / caution / do_not_pay. $0.003 USDC per call.

POST
https://x402-agent-api.onrender.com/api/v1/x402-preflight
Price
$0.003
per call in USDC
Uptime
100%
last 30 days
Response time
248 ms
650 ms slowest 5%
Last check
Passed
19 min ago, next in 11 min

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed · Watch with other listings

How to call it

POST https://x402-agent-api.onrender.com/api/v1/x402-preflight

Each call costs $0.003 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

POST https://x402-agent-api.onrender.com/api/v1/x402-preflight
content-type: application/json

{
  "max_price_usd": 0.01,
  "url": "https://x402-agent-api.onrender.com/api/v1/email-verify"
}

Parameters

ParameterTypeRequiredDescription
max_price_usdnumberNoYour budget per call: a higher price makes the verdict do_not_pay.
methodstringNoHow to request it: auto (default) tries GET, then POST with an empty JSON body. One of: auto, GET, POST. Default: "auto".
urlstring (uri)YesThe paid endpoint, e.g. https://api.example.com/v1/tool.
viastringNoOptional: the tool whose next_calls suggested this call (filled in for you).

Example response

The provider's example. We can't check it without paying.

Example response, 53 lines
{
  "challenge": {
    "bazaar_declaration": "valid",
    "cheapest_usd": 0.001,
    "description": "Is this email address real and safe to send to?",
    "found": true,
    "method": "GET",
    "options": [
      {
        "amount": "1000",
        "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "max_timeout_seconds": 300,
        "network": "eip155:8453",
        "network_label": "Base",
        "pay_to": "0x6847231bD28E16A0A57c59793f6B8BD8CC0043aC",
        "price_usd": 0.001,
        "problems": [],
        "scheme": "exact",
        "testnet": false
      }
    ],
    "response_ms": 420,
    "status": 402,
    "x402_version": 2
  },
  "disclaimer": "Checks what can be seen without paying; it cannot prove the paid response will be good. Not financial or legal advice.",
  "next_calls": [],
  "pay_to": {
    "account_type": "wallet",
    "address": "0x6847231bD28E16A0A57c59793f6B8BD8CC0043aC",
    "sanctioned": false,
    "transactions_sent": 12,
    "verdict": "no_flags"
  },
  "reasons": [
    {
      "code": "established",
      "message": "12 different wallets paid it in the last 30 days (340 calls).",
      "severity": "info"
    }
  ],
  "url": "https://x402-agent-api.onrender.com/api/v1/email-verify",
  "usage": {
    "calls_30d": 340,
    "index_size": 32305,
    "last_called_at": "2026-10-12T05:00:00.000Z",
    "listed_on_bazaar": true,
    "seller_calls_30d": 900,
    "seller_listings": 22,
    "unique_payers_30d": 12
  },
  "verdict": "ok_to_pay"
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.003.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://x402-agent-api.onrender.com/api/v1/x402-preflight' \
  -H 'content-type: application/json' \
  --data-raw '{"max_price_usd":0.01,"url":"https://x402-agent-api.onrender.com/api/v1/email-verify"}'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://x402-agent-api.onrender.com/api/v1/x402-preflight' \
  -H 'content-type: application/json' \
  --data-raw '{"max_price_usd":0.01,"url":"https://x402-agent-api.onrender.com/api/v1/email-verify"}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.003 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.003" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.003 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fx402-agent-api.onrender.com%2Fapi%2Fv1%2Fx402-preflight&method=POST
const res = await pay("https://x402-agent-api.onrender.com/api/v1/x402-preflight", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "max_price_usd": 0.01,
    "url": "https://x402-agent-api.onrender.com/api/v1/email-verify"
  }),
});
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.003 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.003"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://x402-agent-api.onrender.com/api/v1/x402-preflight",
        json={
            "max_price_usd": 0.01,
            "url": "https://x402-agent-api.onrender.com/api/v1/email-verify",
        },
    )
    print(res.status_code, res.text)

Security scan

No findings

We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
19 min agoPassed402238 ms$0.003
5 h agoPassed402232 ms$0.003
9 h agoPassed402674 ms$0.003
13 h agoPassed402371 ms$0.003
17 h agoPassed402235 ms$0.003
Show 10 older checks
21 h agoPassed402241 ms$0.003
26 h agoPassed402248 ms$0.003
30 h agoPassed402650 ms$0.003
34 h agoPassed402215 ms$0.003
38 h agoPassed402264 ms$0.003
42 h agoPassed402603 ms$0.003
46 h agoPassed402258 ms$0.003
2 days agoPassed402247 ms$0.003
2 days agoPassed402225 ms$0.003
2 days agoPassed402250 ms$0.003