{"uid":"cap_tMvVdiaYdCwp0I6stJ1Zn","slug":"phantom-api-gas-estimation-7b671cb0","name":"Phantom API — Gas Estimation","description":"Lightning-fast access to blockchain data, smart contract insights, and Web3 infrastructure across 57+ networks. Pay-per-call via x402.","url":"https://phantom-api-omega.vercel.app/api/adi/gas/estimate","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"to":{"type":"string"},"data":{"type":"string"},"from":{"type":"string"},"value":{"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_NxeTxVdDQS3aBKNgjXbFr","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":"Estimates the gas required to execute a given Ethereum-compatible transaction before it is submitted on-chain.","exampleAgentPrompt":"Before I send this transaction, estimate how much gas it will need — I'm sending from 0xAbC...123 to the Uniswap router at 0xDef...456 with this calldata: 0xa9059cbb... and a value of 0 ETH.","exampleUseCases":[{"title":"Pre-flight DeFi swap gas check","prompt":"Before I execute this Uniswap swap, can you estimate the gas it'll use? Sender is 0x1234...abcd, recipient is the Uniswap V3 router at 0xE592...B3a8, calldata is 0x414bf389..., and value is 0."},{"title":"Smart contract deployment cost preview","prompt":"I want to know how much gas deploying this smart contract will consume — the from address is 0xDEAD...BEEF, there's no 'to' address since it's a deployment, and here's the bytecode data: 0x6080604052..."},{"title":"Token transfer gas estimate","prompt":"Can you estimate the gas needed to transfer 500 USDC from my wallet 0xAABB...CCDD to 0x9988...7766? The calldata for the ERC-20 transfer is 0xa9059cbb... and value is 0."}],"resultDescription":"Returns an estimated gas units figure for the described transaction, indicating how much computational work the EVM would need to process it. Helps callers set appropriate gas limits before broadcasting a transaction on-chain.","failureModes":["Invalid or malformed Ethereum addresses return an error response","Malformed or non-hex calldata causes a parsing error","Reverted simulation — if the transaction would revert on-chain, the estimate may fail or return an error","Missing required fields may result in a 400-level error","Network congestion or upstream RPC failures may cause timeouts or 500-level errors","Payment not included or insufficient USDC results in 402 Payment Required"],"whenToPreferThis":"Use this endpoint when you need a fast, pay-per-call gas estimate without managing your own RPC node or signing up for a long-term subscription. Ideal for agents that need pre-flight cost checks before submitting Ethereum-compatible transactions, especially in multi-chain environments where Phantom API's 57+ network coverage matters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:48:52.024Z","isFirstParty":false}