{"uid":"cap_oKFYpTJ1bV6n-CBdCIEjt","slug":"agent402-chain-info-b1116457","name":"Agent402 Chain Info","description":"One-call chain state snapshot: chain id, latest block number, and current gas price (wei + gwei) for Ethereum, Base, Polygon, Arbitrum, or Optimism. Keyless multi-endpoint failover. ?network=base","url":"https://agent402.tools/api/chain-info","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":{"network":{"type":"string","description":"ethereum / base / polygon / arbitrum / optimism (default base)."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["network","chainId","latestBlock","gasPriceWei","gasPriceGwei"],"properties":{"chainId":{"type":"integer"},"network":{"type":"string"},"gasPriceWei":{"type":"string"},"latestBlock":{"type":"integer"},"gasPriceGwei":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"chainId":8453,"network":"base","gasPriceWei":"5000000","latestBlock":27000000,"gasPriceGwei":"0.005"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_KnJfD3WvVurMIlj9nMdhO","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns current blockchain network stats (chain ID, gas price, latest block) for a specified EVM-compatible network, defaulting to Base.","exampleAgentPrompt":"What's the current gas price and latest block number on Base right now?","exampleUseCases":[{"title":"Pre-transaction gas check on Base","prompt":"Before I submit this transaction, can you check what the current gas price is on Base so I know if it's a good time to send?"},{"title":"Monitor Ethereum block height","prompt":"What's the latest block number on Ethereum mainnet right now, and what's the gas price in Gwei?"},{"title":"Compare chain IDs across networks","prompt":"I need the chain ID and current gas price for both Arbitrum and Optimism — can you pull those network stats for me?"}],"resultDescription":"A JSON object containing the numeric chain ID, human-readable network name, gas price in Wei, gas price in Gwei, and the latest block number for the requested EVM network.","failureModes":["Unsupported network name returns an error or defaults to Base","Network congestion or RPC issues may cause stale block data","Invalid 'network' query parameter value results in a 400 or default fallback","Payment failure (insufficient USDC/proof-of-work) results in a 402 response"],"whenToPreferThis":"Choose this endpoint when you need real-time, on-chain network stats (gas price, block height, chain ID) for Base or other major EVM networks in a pay-per-call model with no API key or signup required. Prefer over alternatives when operating in a wallet-native or x402 payment context, or when you need lightweight lookups without a full Web3 provider setup.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:59:12.736Z","isFirstParty":false}