{"ok":true,"free":true,"payment_required_for_preflight":false,"purpose":"Decide whether and how to buy MACH before signing or spending.","live_evaluation":"https://api.mach.gallery/api/evaluate","canonical_origin":"https://api.mach.gallery","buyer_account_required":false,"buyer_api_key_required":false,"decision":{"network":"eip155:8453","asset":"USDC","minimum_price_usd":0.005,"maximum_price_usd":0.008,"first_paid_call":{"method":"GET","path":"/api/base/block-number","price_usd":0.005,"input_required":false},"payment_paths":[{"id":"http-x402-v2","protocol":"x402 v2","network":"eip155:8453","asset":"USDC","integration":"https://api.mach.gallery/openapi.json"},{"id":"http-one-call-helper","protocol":"x402 v2 with caller-owned wallet and spend cap","network":"eip155:8453","asset":"USDC","integration":"https://api.mach.gallery/integrations/paid-http-client.ts","behavior":"one unpaid request then at most one signed retry under caller maxSpend"},{"id":"mcp-x402","protocol":"x402 over MCP","network":"eip155:8453","asset":"USDC","integration":"https://api.mach.gallery/integrations/paid-mcp-client.ts"},{"id":"generic-budget-wallet-bridge","protocol":"budget-bound local buyer wallet bridge","network":"eip155:8453","asset":"USDC","integration":"https://api.mach.gallery/integrations/generic-chat-client.json"}],"one_call_execution":{"status":"READY","id":"mcp-auto-payment","semantics":"Connect once; one MCP tool call handles payment challenge, local signing, retry and settlement response automatically.","integration":"https://api.mach.gallery/integrations/paid-mcp-client.ts","requires":["dedicated low-balance buyer wallet","local signing authority","explicit buyer spend policy"],"recommended_max_payment_usd":0.01,"MACH_does_not_custody_buyer_key":true},"current_protocol_compatibility":{"canonical":"x402 v2","legacy_x_payment_v1_compatible":true}},"requested":{"goal":null,"decision_preview":null,"decision_endpoint":"https://api.mach.gallery/api/choose","path":null,"method":null,"matches":[{"method":"GET","path":"/api/base/block-number","price":"$0.005","description":"Get the current Base mainnet block number (latest chain height) for an autonomous agent.","tags":["base","blockchain","block-height","onchain","rpc"]},{"method":"GET","path":"/api/base/gas-price","price":"$0.005","description":"Get the current gas price on Base mainnet in wei for transaction fee estimation.","tags":["base","gas","fees","onchain","rpc"]},{"method":"POST","path":"/api/base/wallet-balance","price":"$0.005","description":"Check the native ETH balance of a wallet or address on Base mainnet.","tags":["base","wallet","balance","onchain","rpc"],"inputExample":{"address":"0x0000000000000000000000000000000000000001"},"inputSchema":{"properties":{"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Wallet or account address on Base mainnet."}},"required":["address"]}},{"method":"POST","path":"/api/base/erc20-balance","price":"$0.005","description":"Check a USDC or other ERC-20 token balance for a wallet on Base mainnet.","tags":["base","erc20","token","balance","onchain"],"inputExample":{"token":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","address":"0x0000000000000000000000000000000000000001"},"inputSchema":{"properties":{"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-20 or token contract address on Base mainnet."},"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Wallet or account address on Base mainnet."}},"required":["token","address"]}},{"method":"POST","path":"/api/base/nonce","price":"$0.005","description":"Get the current transaction nonce for a Base wallet before broadcasting a transaction.","tags":["base","wallet","nonce","onchain","rpc"],"inputExample":{"address":"0x0000000000000000000000000000000000000001"},"inputSchema":{"properties":{"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Wallet or account address on Base mainnet."}},"required":["address"]}},{"method":"POST","path":"/api/base/contract-code","price":"$0.005","description":"Check whether an address is a smart contract or EOA on Base mainnet by reading deployed bytecode.","tags":["base","contract","bytecode","onchain","verification"],"inputExample":{"address":"0x4200000000000000000000000000000000000006"},"inputSchema":{"properties":{"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Wallet or account address on Base mainnet."}},"required":["address"]}},{"method":"POST","path":"/api/base/allowance","price":"$0.005","description":"Check an ERC-20 token allowance on Base for an owner and spender.","tags":["base","erc20","allowance","approvals","onchain"],"inputExample":{"token":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","owner":"0x0000000000000000000000000000000000000001","spender":"0x0000000000000000000000000000000000000002"},"inputSchema":{"properties":{"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-20 or token contract address on Base mainnet."},"owner":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-20 token owner address on Base mainnet."},"spender":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-20 spender address whose allowance is being checked."}},"required":["token","owner","spender"]}},{"method":"POST","path":"/api/base/receipt","price":"$0.005","description":"Check whether a Base transaction succeeded, get its receipt, and count current confirmations.","tags":["base","transaction","receipt","confirmations","onchain"],"inputExample":{"tx_hash":"0x0000000000000000000000000000000000000000000000000000000000000000"},"inputSchema":{"properties":{"tx_hash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$","description":"32-byte Base transaction hash."}},"required":["tx_hash"]}},{"method":"POST","path":"/api/base/transaction-context","price":"$0.008","description":"Verify an onchain payment or investigate a failed Base transaction in one call with transaction, receipt, success status, confirmations, gas and fee context.","tags":["base","transaction","payment","confirmations","debugging"],"inputExample":{"tx_hash":"0x0000000000000000000000000000000000000000000000000000000000000000"},"inputSchema":{"properties":{"tx_hash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$","description":"32-byte Base transaction hash."}},"required":["tx_hash"],"additionalProperties":false}},{"method":"POST","path":"/api/base/logs","price":"$0.005","description":"Query smart-contract event logs on Base by contract address, topics and bounded block range.","tags":["base","events","logs","contracts","onchain"],"inputExample":{"address":"0x4200000000000000000000000000000000000006","from_block":35999000,"to_block":36000000,"topics":[]},"inputSchema":{"properties":{"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Smart-contract address on Base mainnet."},"from_block":{"type":"integer","minimum":0,"description":"First Base block to include in the log query."},"to_block":{"type":"integer","minimum":0,"description":"Last Base block to include in the log query."},"topics":{"type":"array","maxItems":4,"items":{"type":["string","null"],"description":"Ethereum log topic or null wildcard."}}},"required":["address"]}},{"method":"POST","path":"/api/base/eth-call","price":"$0.005","description":"Make a read-only smart-contract call on Base with eth_call without sending a transaction.","tags":["base","contract","eth-call","onchain","rpc"],"inputExample":{"to":"0x4200000000000000000000000000000000000006","data":"0x","block":"latest"},"inputSchema":{"properties":{"to":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Smart-contract address on Base mainnet."},"data":{"type":"string","pattern":"^0x[0-9a-fA-F]*$","maxLength":32770,"description":"0x-prefixed ABI calldata for a read-only eth_call."},"block":{"anyOf":[{"type":"string"},{"type":"integer","minimum":0}],"description":"Base block selector: block number or tag such as latest, safe, finalized, pending or earliest."}},"required":["to","data"]}},{"method":"POST","path":"/api/base/transaction","price":"$0.008","description":"Get a full Base transaction by hash, including sender, recipient, value, calldata and live transaction details.","tags":["base","transaction","details","onchain","rpc"],"inputExample":{"tx_hash":"0x0000000000000000000000000000000000000000000000000000000000000000"},"inputSchema":{"properties":{"tx_hash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$","description":"32-byte Base transaction hash."}},"required":["tx_hash"]}},{"method":"POST","path":"/api/base/block","price":"$0.005","description":"Get a Base block by number or tag with its header and transaction hashes.","tags":["base","block","transactions","onchain","rpc"],"inputExample":{"block":"latest"},"inputSchema":{"properties":{"block":{"anyOf":[{"type":"string"},{"type":"integer","minimum":0}],"description":"Base block selector: block number or tag such as latest, safe, finalized, pending or earliest."}},"additionalProperties":false}},{"method":"POST","path":"/api/base/wallet-snapshot","price":"$0.005","description":"Take a Base wallet snapshot in one call: native ETH plus up to 10 supplied ERC-20 token balances.","tags":["base","wallet","balances","erc20","onchain"],"inputExample":{"address":"0x0000000000000000000000000000000000000001","tokens":["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"]},"inputSchema":{"properties":{"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Wallet or account address on Base mainnet."},"tokens":{"type":"array","maxItems":10,"items":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-20 or token contract address on Base mainnet."},"description":"Up to ten token contract addresses whose balances should be included."}},"required":["address"],"additionalProperties":false}},{"method":"POST","path":"/api/base/total-supply","price":"$0.005","description":"Get total supply for an ERC-20 token or ERC-721 NFT contract on Base.","tags":["base","token","supply","erc20","onchain"],"inputExample":{"token":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"},"inputSchema":{"properties":{"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-20 or token contract address on Base mainnet."}},"required":["token"],"additionalProperties":false}},{"method":"POST","path":"/api/base/contract-info","price":"$0.005","description":"Inspect a Base smart contract and get token metadata, bytecode size and common interface detection in one call.","tags":["base","contract","metadata","erc20","verification"],"inputExample":{"address":"0x4200000000000000000000000000000000000006"},"inputSchema":{"properties":{"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Wallet or account address on Base mainnet."}},"required":["address"],"additionalProperties":false}},{"method":"POST","path":"/api/base/erc20-transfers","price":"$0.005","description":"Find recent ERC-20 transfers on Base, optionally filtered to transfers from or to a specific wallet.","tags":["base","erc20","transfers","events","onchain"],"inputExample":{"token":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","from_block":35999000,"to_block":36000000},"inputSchema":{"properties":{"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"20-byte EVM address on Base."},"from_address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"20-byte EVM address on Base."},"to_address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Smart-contract address on Base mainnet."},"from_block":{"type":"integer","minimum":0,"description":"First Base block to include in the log query."},"to_block":{"type":"integer","minimum":0,"description":"Last Base block to include in the log query."}},"required":["token"],"additionalProperties":false}}]},"capabilities":[{"method":"GET","path":"/api/base/block-number","price":"$0.005","description":"Get the current Base mainnet block number (latest chain height) for an autonomous agent.","tags":["base","blockchain","block-height","onchain","rpc"]},{"method":"GET","path":"/api/base/gas-price","price":"$0.005","description":"Get the current gas price on Base mainnet in wei for transaction fee estimation.","tags":["base","gas","fees","onchain","rpc"]},{"method":"POST","path":"/api/base/wallet-balance","price":"$0.005","description":"Check the native ETH balance of a wallet or address on Base mainnet.","tags":["base","wallet","balance","onchain","rpc"],"inputExample":{"address":"0x0000000000000000000000000000000000000001"},"inputSchema":{"properties":{"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Wallet or account address on Base mainnet."}},"required":["address"]}},{"method":"POST","path":"/api/base/erc20-balance","price":"$0.005","description":"Check a USDC or other ERC-20 token balance for a wallet on Base mainnet.","tags":["base","erc20","token","balance","onchain"],"inputExample":{"token":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","address":"0x0000000000000000000000000000000000000001"},"inputSchema":{"properties":{"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-20 or token contract address on Base mainnet."},"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Wallet or account address on Base mainnet."}},"required":["token","address"]}},{"method":"POST","path":"/api/base/nonce","price":"$0.005","description":"Get the current transaction nonce for a Base wallet before broadcasting a transaction.","tags":["base","wallet","nonce","onchain","rpc"],"inputExample":{"address":"0x0000000000000000000000000000000000000001"},"inputSchema":{"properties":{"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Wallet or account address on Base mainnet."}},"required":["address"]}},{"method":"POST","path":"/api/base/contract-code","price":"$0.005","description":"Check whether an address is a smart contract or EOA on Base mainnet by reading deployed bytecode.","tags":["base","contract","bytecode","onchain","verification"],"inputExample":{"address":"0x4200000000000000000000000000000000000006"},"inputSchema":{"properties":{"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Wallet or account address on Base mainnet."}},"required":["address"]}},{"method":"POST","path":"/api/base/allowance","price":"$0.005","description":"Check an ERC-20 token allowance on Base for an owner and spender.","tags":["base","erc20","allowance","approvals","onchain"],"inputExample":{"token":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","owner":"0x0000000000000000000000000000000000000001","spender":"0x0000000000000000000000000000000000000002"},"inputSchema":{"properties":{"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-20 or token contract address on Base mainnet."},"owner":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-20 token owner address on Base mainnet."},"spender":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-20 spender address whose allowance is being checked."}},"required":["token","owner","spender"]}},{"method":"POST","path":"/api/base/receipt","price":"$0.005","description":"Check whether a Base transaction succeeded, get its receipt, and count current confirmations.","tags":["base","transaction","receipt","confirmations","onchain"],"inputExample":{"tx_hash":"0x0000000000000000000000000000000000000000000000000000000000000000"},"inputSchema":{"properties":{"tx_hash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$","description":"32-byte Base transaction hash."}},"required":["tx_hash"]}},{"method":"POST","path":"/api/base/transaction-context","price":"$0.008","description":"Verify an onchain payment or investigate a failed Base transaction in one call with transaction, receipt, success status, confirmations, gas and fee context.","tags":["base","transaction","payment","confirmations","debugging"],"inputExample":{"tx_hash":"0x0000000000000000000000000000000000000000000000000000000000000000"},"inputSchema":{"properties":{"tx_hash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$","description":"32-byte Base transaction hash."}},"required":["tx_hash"],"additionalProperties":false}},{"method":"POST","path":"/api/base/logs","price":"$0.005","description":"Query smart-contract event logs on Base by contract address, topics and bounded block range.","tags":["base","events","logs","contracts","onchain"],"inputExample":{"address":"0x4200000000000000000000000000000000000006","from_block":35999000,"to_block":36000000,"topics":[]},"inputSchema":{"properties":{"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Smart-contract address on Base mainnet."},"from_block":{"type":"integer","minimum":0,"description":"First Base block to include in the log query."},"to_block":{"type":"integer","minimum":0,"description":"Last Base block to include in the log query."},"topics":{"type":"array","maxItems":4,"items":{"type":["string","null"],"description":"Ethereum log topic or null wildcard."}}},"required":["address"]}},{"method":"POST","path":"/api/base/eth-call","price":"$0.005","description":"Make a read-only smart-contract call on Base with eth_call without sending a transaction.","tags":["base","contract","eth-call","onchain","rpc"],"inputExample":{"to":"0x4200000000000000000000000000000000000006","data":"0x","block":"latest"},"inputSchema":{"properties":{"to":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Smart-contract address on Base mainnet."},"data":{"type":"string","pattern":"^0x[0-9a-fA-F]*$","maxLength":32770,"description":"0x-prefixed ABI calldata for a read-only eth_call."},"block":{"anyOf":[{"type":"string"},{"type":"integer","minimum":0}],"description":"Base block selector: block number or tag such as latest, safe, finalized, pending or earliest."}},"required":["to","data"]}},{"method":"POST","path":"/api/base/transaction","price":"$0.008","description":"Get a full Base transaction by hash, including sender, recipient, value, calldata and live transaction details.","tags":["base","transaction","details","onchain","rpc"],"inputExample":{"tx_hash":"0x0000000000000000000000000000000000000000000000000000000000000000"},"inputSchema":{"properties":{"tx_hash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$","description":"32-byte Base transaction hash."}},"required":["tx_hash"]}},{"method":"POST","path":"/api/base/block","price":"$0.005","description":"Get a Base block by number or tag with its header and transaction hashes.","tags":["base","block","transactions","onchain","rpc"],"inputExample":{"block":"latest"},"inputSchema":{"properties":{"block":{"anyOf":[{"type":"string"},{"type":"integer","minimum":0}],"description":"Base block selector: block number or tag such as latest, safe, finalized, pending or earliest."}},"additionalProperties":false}},{"method":"POST","path":"/api/base/wallet-snapshot","price":"$0.005","description":"Take a Base wallet snapshot in one call: native ETH plus up to 10 supplied ERC-20 token balances.","tags":["base","wallet","balances","erc20","onchain"],"inputExample":{"address":"0x0000000000000000000000000000000000000001","tokens":["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"]},"inputSchema":{"properties":{"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Wallet or account address on Base mainnet."},"tokens":{"type":"array","maxItems":10,"items":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-20 or token contract address on Base mainnet."},"description":"Up to ten token contract addresses whose balances should be included."}},"required":["address"],"additionalProperties":false}},{"method":"POST","path":"/api/base/total-supply","price":"$0.005","description":"Get total supply for an ERC-20 token or ERC-721 NFT contract on Base.","tags":["base","token","supply","erc20","onchain"],"inputExample":{"token":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"},"inputSchema":{"properties":{"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"ERC-20 or token contract address on Base mainnet."}},"required":["token"],"additionalProperties":false}},{"method":"POST","path":"/api/base/contract-info","price":"$0.005","description":"Inspect a Base smart contract and get token metadata, bytecode size and common interface detection in one call.","tags":["base","contract","metadata","erc20","verification"],"inputExample":{"address":"0x4200000000000000000000000000000000000006"},"inputSchema":{"properties":{"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Wallet or account address on Base mainnet."}},"required":["address"],"additionalProperties":false}},{"method":"POST","path":"/api/base/erc20-transfers","price":"$0.005","description":"Find recent ERC-20 transfers on Base, optionally filtered to transfers from or to a specific wallet.","tags":["base","erc20","transfers","events","onchain"],"inputExample":{"token":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","from_block":35999000,"to_block":36000000},"inputSchema":{"properties":{"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"20-byte EVM address on Base."},"from_address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"20-byte EVM address on Base."},"to_address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Smart-contract address on Base mainnet."},"from_block":{"type":"integer","minimum":0,"description":"First Base block to include in the log query."},"to_block":{"type":"integer","minimum":0,"description":"Last Base block to include in the log query."}},"required":["token"],"additionalProperties":false}}],"trust":{"health":"https://api.mach.gallery/health","reliability":"https://api.mach.gallery/api/reliability","proof":"https://api.mach.gallery/proof.json","trust_profile":"https://api.mach.gallery/api/trust"},"rule":"Preflight never returns the paid onchain result; it returns only the information needed to decide whether to buy it."}