{"uid":"cap_C2S5IIxWDjrVAFqNu180O","slug":"httpay-l2-gas-costs-api-391d1ff8","name":"HTTPay L2 Gas Costs API","description":"Real-time gas costs across 7 L2s in USD","url":"https://httpay.xyz/api/l2-costs","method":"POST","headers":{},"bodySchema":null,"responseSchema":{"type":"json","example":{"description":"Real-time gas costs across 7 L2s in USD"}},"example":{"request":{},"response":{"meta":{"x402":true,"poweredBy":"Alfred Zhang 🫡"},"chains":[{"ok":false,"name":"Ethereum","costs":{"swap":"$0.000000","nftMint":"$0.000000","ethTransfer":"$0.000000","erc20Transfer":"$0.000000"},"chainId":1,"gasPriceGwei":"0.0000"},{"ok":true,"name":"Base","costs":{"swap":"$0.002012","nftMint":"$0.001509","ethTransfer":"$0.000211","erc20Transfer":"$0.000503"},"chainId":8453,"gasPriceGwei":"0.0060"},{"ok":true,"name":"Optimism","costs":{"swap":"$0.000335","nftMint":"$0.000252","ethTransfer":"$0.000035","erc20Transfer":"$0.000084"},"chainId":10,"gasPriceGwei":"0.0010"},{"ok":true,"name":"Arbitrum One","costs":{"swap":"$0.006707","nftMint":"$0.005030","ethTransfer":"$0.000704","erc20Transfer":"$0.001677"},"chainId":42161,"gasPriceGwei":"0.0200"},{"ok":true,"name":"zkSync Era","costs":{"swap":"$0.015175","nftMint":"$0.011381","ethTransfer":"$0.001593","erc20Transfer":"$0.003794"},"chainId":324,"gasPriceGwei":"0.0452"},{"ok":true,"name":"Linea","costs":{"swap":"$0.014053","nftMint":"$0.010540","ethTransfer":"$0.001476","erc20Transfer":"$0.003513"},"chainId":59144,"gasPriceGwei":"0.0419"},{"ok":true,"name":"Polygon zkEVM","costs":{"swap":"$0.003354","nftMint":"$0.002515","ethTransfer":"$0.000352","erc20Transfer":"$0.000838"},"chainId":1101,"gasPriceGwei":"0.0100"}],"ethUsd":1676.83,"updatedAt":"2026-06-12T04:38:05.256Z"}},"exampleRequest":{},"tags":["x402"],"displayCostAmount":"0.05","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_MH0bA9SJp6PaXPaJUOJwg","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns real-time gas costs in USD across 7 Layer 2 blockchain networks","exampleAgentPrompt":"What are the current gas fees in USD across all 7 Layer 2 networks right now — I want to know which L2 is cheapest before I submit my transaction?","exampleUseCases":null,"resultDescription":"A JSON object containing real-time gas costs denominated in USD for 7 different L2 blockchain networks, allowing comparison of transaction fees across chains at the moment of the request.","failureModes":["Payment required (402) if USDC micropayment not included","Network timeout if L2 RPC nodes are slow to respond","Stale data if upstream gas oracles are lagging","Empty or partial results if some L2 networks are temporarily unreachable"],"whenToPreferThis":"Use this endpoint when you need a quick, up-to-date snapshot of transaction costs across multiple L2 networks in a single call, especially when deciding which chain to use for a DeFi operation or cross-chain transfer. Ideal for agents that need to optimize gas spend without subscribing to a dedicated gas oracle service — pay only $0.05 per call with no API key required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:44:27.052Z","isFirstParty":false}