$ man gas-api
/gas-api
PRICE / CALL
$0.02
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
edgemarketCATEGORY
uncategorized
STATUS
● live
NAME
gas-api — gas api / blockchain gas fee estimator / eip-1559 fee tiers
synonym alias of gas-now-base — reuses the canonical handler.
SYNOPSIS
POST https://x402.agentutility.ai/gas-api
Content-Type: application/json
X-PAYMENT: <signed-transferWithAuthorization>
{ ... }↳ first call →
402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.DESCRIPTION
Gas API / blockchain gas fee estimator / EIP-1559 fee tiers. Returns base fee, safe-low, standard, and fast priority/max fees, plus USD tx-cost estimates for Base, Ethereum, Optimism, and Arbitrum.
INPUT — request schema
| property | type | description | req? |
|---|---|---|---|
| chain | string | EVM L1/L2 to read gas from. Default 'base'. enum: base · ethereum · optimism · arbitrum · polygon | optional |
OUTPUT — response shape
| field | type | description |
|---|---|---|
| chain | string | — |
| base_fee_gwei | string | — |
| priority_fee_gwei | string | — |
| total_recommended_gwei | string | — |
| block_number | string | — |
| eth_price_usd | string | — |
| cost_usd | string | — |
| timestamp | string | — |
EXAMPLES — two ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.agentutility.ai/gas-api \
-H 'Content-Type: application/json' \
-d '{ }'first response =
402 Payment Required with payment requirements; sign + retry with X-PAYMENT.EXAMPLE 2 · mcp
# Install the MCP package for this endpoint's cluster npx -y @agentutility/mcp-<cluster> # Required: EVM private key with USDC on Base export X402_PRIVATE_KEY=0x... # Then call the gas-api tool from your MCP-aware agent.
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
- tags
- edge-marketgasapigas-api
- methods
- POST
- cluster
- edgemarket
- price
- $0.02 USDC per call
ADJACENT — other endpoints in edgemarket
| endpoint | description | price |
|---|---|---|
| coin-price | Coin price API / crypto spot price / BTC ETH SOL quote lookup. | $0.02 |
| crypto-price | Crypto price lookup / coin price API / BTC ETH SOL price / on-chain token spot price. | $0.02 |
| defi-llama | DefiLlama API / DeFi TVL protocol lookup. | $0.02 |
| defi-llama-protocol | DefiLlama protocol lookup / DeFi TVL fetcher / total value locked / chain-breakdown of TVL / Aave + Lido + Uniswap + MakerDAO TVL / proto… | $0.02 |
| defi-tvl | DeFi TVL API / total value locked by protocol. | $0.02 |
| defillama | DefiLlama protocol TVL lookup / DeFi protocol metadata. | $0.02 |
| gas-fees | Gas fees API / EIP-1559 transaction fee estimator / Base Ethereum Optimism Arbitrum gas tracker. | $0.02 |
| gas-now-base | Gas oracle / gas price API / EIP-1559 fee estimator / Base + Ethereum + Optimism + Arbitrum + Polygon gas tracker / etherscan-gas alterna… | $0.02 |
SEE ALSO