{"openapi":"3.1.0","info":{"title":"TxPreflight API","version":"0.6.0","description":"Spend a fraction of a cent to independently screen a Base transaction before risking onchain value. TxPreflight returns deterministic ALLOW, REVIEW, or BLOCK with ERC20/Permit2 approval analysis, direct OFAC SDN EVM screening, malformed-calldata detection, and current-state Base simulation."},"servers":[{"url":"https://agent-sign-guard-main-production.up.railway.app"}],"paths":{"/classify":{"post":{"operationId":"classifyUnsignedBaseTransaction","summary":"Free coarse classification before a paid risk check","description":"Free pre-check that decodes common transaction structure, including token, spender, recipient, amount, Permit2 involvement, and unlimited-approval candidates when safely derivable. It intentionally does not return a security verdict, sanctions result, or simulation. Follow payment_recommended and recommendation_reason to decide whether to call the paid /risk-check endpoint.","tags":["AI Agents","Base","Transaction Classification"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chain":{"type":"string","const":"base"},"from":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"to":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"data":{"type":"string","pattern":"^0x([0-9a-fA-F]{2})*$"},"value":{"type":"string","pattern":"^[0-9]+$"}},"required":["chain","to","data","value"]},"example":{"chain":"base","from":"0x1111111111111111111111111111111111111111","to":"0x2222222222222222222222222222222222222222","data":"0x","value":"0"}}}},"responses":{"200":{"description":"Free coarse transaction classification."},"400":{"description":"Invalid transaction payload."}}}},"/risk-check":{"post":{"operationId":"screenEvmTransactionBeforeSigning","summary":"Call before signing or broadcasting an unsigned Base transaction","description":"Use this endpoint as a pre-sign guard for autonomous transaction execution. Returns deterministic ALLOW, REVIEW, or BLOCK with decoded approval/Permit2 risk, direct OFAC SDN EVM screening, and current-state Base simulation. For autonomous policy: ALLOW may continue; REVIEW should pause for additional policy or review; BLOCK should not be signed automatically. Access is paid via x402.","tags":["EVM Security","Transaction Risk","AI Agents","Base","x402"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chain":{"type":"string","const":"base"},"from":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Optional sender address; improves simulation accuracy."},"to":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"data":{"type":"string","pattern":"^0x([0-9a-fA-F]{2})*$"},"value":{"type":"string","pattern":"^[0-9]+$","description":"Native value in wei as a decimal integer string."}},"required":["chain","to","data","value"]},"example":{"chain":"base","from":"0x1111111111111111111111111111111111111111","to":"0x2222222222222222222222222222222222222222","data":"0x","value":"0"}}}},"responses":{"200":{"description":"Risk decision after successful x402 payment.","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":"string","enum":["ALLOW","REVIEW","BLOCK"]},"risk_score":{"type":"integer","minimum":0,"maximum":100},"action":{"type":"string"},"sanctioned_match":{"type":"boolean"},"unlimited_approval":{"type":"boolean"},"flags":{"type":"array","items":{"type":"string"}},"reasons":{"type":"array","items":{"type":"string"}},"simulation":{"type":["object","null"]}},"required":["verdict","risk_score","action","sanctioned_match","flags","reasons"]}}}},"402":{"description":"x402 payment required."},"429":{"description":"Rate limit exceeded."}}}}}}