{"uid":"cap_0N0bgSigNjITpLdyl06XA","slug":"x402-pre-flight-transaction-safety-check-825c4d8f","name":"x402 Pre-flight Transaction Safety Check","description":"Pre-Sign Co-Pilot — the ONE call an agent makes before signing ANY transaction, on ANY chain. Returns a single GO/CAUTION/STOP verdict: will it succeed (and if it reverts, why + the exact fix), is it safe (sanctions/drainer/unlimited-approval/rug — hard STOP), true cost (gas + USD), your exact wallet balance-changes after, AND the corrected transac","url":"https://x402-services-production.up.railway.app/api/preflight","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object"},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json"],"type":"string"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_NBR_d8__PK-PQjS7aY-Lr","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes any blockchain transaction before signing and returns a GO/CAUTION/STOP verdict covering success simulation, safety screening, true cost, and wallet balance changes","exampleAgentPrompt":"Before I sign this transaction, run a preflight check on it — simulate whether it'll succeed, flag any drainer or unlimited-approval risks, tell me the true gas cost in USD, and show me exactly how my wallet balances will change.","exampleUseCases":[{"title":"DeFi swap safety check before signing","prompt":"I'm about to approve a Uniswap swap for 5 ETH on mainnet — can you run a preflight on this transaction to make sure it won't revert, check if the contract is safe, and tell me the exact gas cost and how my balances will change?"},{"title":"Rug pull and drainer detection","prompt":"I got a link to mint an NFT but I'm not sure it's legit — can you simulate the transaction and tell me if it's a drainer or tries to steal my funds before I sign anything?"},{"title":"Failed transaction diagnosis and fix","prompt":"My transaction keeps failing and I don't know why — can you run a preflight simulation on it to find out what's causing the revert and give me the exact fix so I can resubmit it successfully?"}],"resultDescription":"A structured verdict (GO, CAUTION, or STOP) along with: success/revert simulation result with revert reason and suggested fix if applicable, safety flags (sanctions, drainer, unlimited approval, rug indicators), true cost breakdown (gas units, gas price, total USD cost), exact wallet balance changes post-execution, and a corrected transaction object if fixes are needed.","failureModes":["Transaction object missing required fields — returns validation error","Chain not supported — returns unsupported chain error","Node RPC unavailable for the target chain — returns simulation failure","Contract not verified or self-destructed — limited analysis, may return partial results","Malformed calldata — returns decode error with partial analysis","Payment not included or insufficient — returns 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when an AI agent or user needs a comprehensive pre-signing safety gate for any blockchain transaction — especially when combining success simulation, security screening, cost estimation, and balance-change prediction in a single call. Prefer it over standalone gas estimators, calldata decoders, or sanctions checkers when you need all four signals at once before committing to a transaction on any EVM-compatible chain.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:01:35.961Z","isFirstParty":false}