{"uid":"cap_oXtbWczM0O5KGTqxFpNnr","slug":"agentutility-gas-price-api-1acb36c9","name":"AgentUtility Gas Price API","description":"Gas price API / EIP-1559 gas fee endpoint / blockchain transaction fee estimator. Same gas-price handler, discoverable for agents estimating base fee, priority fee tiers, maxFeePerGas, and USD transaction costs for Base, Ethereum, Optimism, and Arbitrum.","url":"https://x402.agentutility.ai/gas-price-api","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":{"properties":{"chain":{"enum":["base","ethereum","optimism","arbitrum","polygon"],"type":"string","description":"EVM L1/L2 to read gas from. Default 'base'."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"chain":{"type":"string"},"source":{"type":"string"},"standard":{"type":"object","properties":{"max_fee_gwei":{"type":"number"}}}}}}}}},"responseSchema":{"type":"json","example":{"chain":"base","source":"rpc","standard":{"max_fee_gwei":0.02}}},"example":{"request":{"sort":"relevance","type":"story","limit":10,"query":"artificial intelligence"},"response":{"chain":"base","rpc_url":"https://base.publicnode.com","chain_id":"8453","_provider":"agentutility.ai","_canonical":"https://x402.agentutility.ai/gas-price-api","block_number":"48045857","native_token":"ETH","base_fee_gwei":0.005,"cost_estimates":{"nft_mint":{"gas":100000,"usd_cost":null,"native_cost":6e-7},"erc20_approve":{"gas":50000,"usd_cost":null,"native_cost":3e-7},"usdc_transfer":{"gas":65000,"usd_cost":null,"native_cost":3.9e-7},"contract_deploy":{"gas":500000,"usd_cost":null,"native_cost":0.000003},"native_transfer":{"gas":21000,"usd_cost":null,"native_cost":1.26e-7},"uniswap_v2_swap":{"gas":120000,"usd_cost":null,"native_cost":7.2e-7},"uniswap_v3_swap":{"gas":150000,"usd_cost":null,"native_cost":9e-7}},"block_timestamp":1782881061,"block_age_seconds":1,"block_iso_timestamp":"2026-07-01T04:44:21.000Z","legacy_gas_price_gwei":0.006,"native_token_price_usd":null,"total_recommended_gwei":0.006,"priority_fee_suggestion_gwei":0.001}},"exampleRequest":{"sort":"relevance","type":"story","limit":10,"query":"artificial intelligence"},"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_UZgHF9cVO0iHGOWz2BMrE","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns real-time EIP-1559 gas fee estimates (base fee, priority fees, maxFeePerGas) and USD/ETH transaction cost breakdowns for Base, Ethereum, Optimism, and Arbitrum.","exampleAgentPrompt":"What's the current gas price on Base right now — give me the EIP-1559 base fee, the legacy gas price, and the ETH cost for a USDC transfer and a Uniswap v3 swap?","exampleUseCases":[{"title":"Pre-flight DeFi transaction cost check","prompt":"Before I submit this Uniswap v3 swap on Base, can you tell me the current base fee and how much it'll cost in ETH and USD?"},{"title":"Cross-chain gas fee comparison","prompt":"Compare current transaction fees across Base, Optimism, and Arbitrum — I want to see the base fee in gwei and the ETH cost of a native transfer on each."},{"title":"Smart contract deployment budgeting","prompt":"I'm about to deploy a smart contract on Ethereum — what's the current gas price and how much will the deployment cost in ETH right now?"}],"resultDescription":"Returns a JSON object with the current block number, block timestamp, chain ID, native token (ETH), base fee in gwei, legacy gas price in gwei, native token USD price, and per-operation cost estimates (in ETH and USD) for common transaction types: native transfer, USDC transfer, ERC-20 approve, NFT mint, contract deploy, Uniswap v2 swap, and Uniswap v3 swap.","failureModes":["RPC node unavailable for requested chain — returns error with chain details","Unsupported chain specified — returns validation error","USD price oracle unavailable — usd_cost fields return null","Stale block data if the upstream node is lagging — block_age_seconds will be elevated","Payment failure via x402 — 402 response if USDC balance is insufficient"],"whenToPreferThis":"Choose this endpoint when an AI agent needs real-time, EIP-1559-aware gas fee data across multiple EVM chains (Base, Ethereum, Optimism, Arbitrum) with pre-computed per-operation cost estimates in both ETH and USD. It is especially useful when you want structured cost breakdowns for common DeFi operations (swaps, transfers, deploys) without building your own RPC fee logic. It is x402/USDC-native, making it ideal for autonomous agents that already operate on-chain.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T07:09:55.490Z","isFirstParty":false}