{"uid":"cap_fntN0kAibWYnn_aACAyIK","slug":"gas-estimate-fee-quote-api-multi-chain-evm-8b3d156b","name":"Gas Estimate & Fee Quote API (Multi-Chain EVM)","description":"Pay-per-call utilities for AI agents over x402, USDC on Base.","url":"https://agents.crowdspark.me/v1/chain/gas?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":[],"properties":{"to":{"type":"string","description":"Optional. Target address; omit for a plain native transfer quote"},"data":{"type":"string","description":"Optional. 0x calldata"},"from":{"type":"string","description":"Optional. Sender address"},"chain":{"enum":["base","ethereum","optimism","arbitrum","polygon"],"type":"string","description":"Chain, default base"},"value":{"type":"string","description":"Optional. Value in wei"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"fees":[{"tier":"slow","est_cost_usd":0.000541,"est_cost_native":"0.000000232928187839","max_fee_per_gas_gwei":"0.01011","max_priority_fee_gwei":"0.00011"},{"tier":"standard","est_cost_usd":0.00065},{"tier":"fast","est_cost_usd":0.00211}],"block":53115830,"chain":"base","method":"eth_estimateGas","native":"ETH","chain_id":8453,"reverted":false,"gas_units":"45415","native_usd":2320.97,"base_fee_gwei":"0.005","l1_data_fee_native":"0.000000000857537839"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_puKfVMqBHFO1_ZfwtjxuV","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Estimates gas units and returns slow/standard/fast fee tiers with USD cost for a transaction on Base, Ethereum, Optimism, Arbitrum, or Polygon — including L1 data fees for OP-stack chains and revert detection.","exampleAgentPrompt":"Before I sign this transaction, estimate the gas cost on Base — I'm calling contract 0xAbC...123 from 0xDef...456 with this calldata 0xa9059cbb... and value 0 — give me the slow, standard, and fast fee options in ETH and USD.","exampleUseCases":[{"title":"Smart contract call cost check","prompt":"I want to call a swap function on Uniswap on Ethereum — the contract is 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45, my wallet is 0xYourAddress, calldata is 0x... — what will it cost me in gas at slow, standard, and fast speeds right now?"},{"title":"Agent transaction budget planning","prompt":"My agent is about to submit a batch of 10 transactions on Polygon. Can you estimate the gas for a single native transfer and tell me the USD cost at the standard tier so I can budget the total?"},{"title":"Revert check before signing","prompt":"Check if this transaction would revert before I sign it — it's on Optimism, from 0xSender to 0xContract, with this calldata 0xdeadbeef... and 0 value. Also tell me the L1 data fee and the total cost at standard speed."}],"resultDescription":"A JSON object containing: estimated gas units, current base fee in gwei, an array of fee tiers (slow/standard/fast) each with max_fee_per_gas_gwei, max_priority_fee_gwei, est_cost_native, and est_cost_usd; plus chain metadata (chain, chain_id, native token symbol), current ETH/USD price from Chainlink, L1 data fee (for OP-stack chains), block number, and a reverted boolean flag indicating whether the simulated transaction would revert.","failureModes":["Invalid or unsupported chain name returns an error (valid values: base, ethereum, optimism, arbitrum, polygon)","Malformed calldata or address may return a revert simulation result with reverted: true rather than an HTTP error","Missing required parameters defaults to plain native transfer estimate on Base, which may not reflect actual transaction complexity","Network RPC unavailability for the requested chain may cause timeout or upstream error","Value expressed in non-wei units (e.g. ETH instead of wei) will produce incorrect gas estimates","Chainlink price feed outage may affect USD cost calculations"],"whenToPreferThis":"Use this endpoint when you need a pre-flight gas estimate before signing or broadcasting any EVM transaction, especially when you want slow/standard/fast tier breakdown in both native coin and USD. It is particularly valuable for OP-stack chains (Optimism, Base) where L1 data fees add non-trivial cost. Prefer this over raw RPC calls when you need revert detection combined with fee estimation in a single call, or when budgeting agent-driven on-chain operations across multiple EVM chains.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:40:12.130Z","isFirstParty":false,"canonicalSlug":"gas-estimate-fee-quote-api-multi-chain-evm-8b3d156b"}