# AgentUtility Gas Fees API

> AgentUtility Gas Fees API is a paid API for AI agents from x402.agentutility.ai, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Returns real-time EIP-1559 gas fee estimates (base fee, priority tiers, maxFeePerGas) and USD cost estimates for Ethereum, Base, Optimism, and Arbitrum transactions.

## Facts

- Endpoint: POST https://x402.agentutility.ai/gas-fees
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentutility-gas-fees-api-a4698ee8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hmzq8qv9P4sVHHNqApB7V

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agentutility-gas-fees-api-a4698ee8 -d '<json body>'
```

Example prompt: What are the current gas fees on Base right now — give me the base fee, slow/standard/fast priority tiers, and the USD cost estimate for a standard ETH transfer.

## When to prefer this

Choose this endpoint when an AI agent needs current, multi-tier EIP-1559 gas estimates with USD cost translation for Ethereum mainnet or major L2 networks (Base, Optimism, Arbitrum). Ideal for pre-transaction cost checks, gas budgeting, or deciding which network to use based on current fees. Prefer over generic blockchain RPC calls when you need structured priority tiers and USD estimates in one call.

## Known failure modes

- Invalid or unsupported network name returns an error
- Payment failure via x402 protocol results in 402 response and no data returned
- Network RPC unavailability may cause stale or failed response
- Highly volatile gas conditions may cause estimates to be outdated by the time a transaction is submitted

## How this service works

Gas fees API / EIP-1559 transaction fee estimator / Base Ethereum Optimism Arbitrum gas tracker. Returns base fee, priority-fee tiers, maxFeePerGas, and USD cost estimates for common transactions.

## Output

Returns the current EIP-1559 gas parameters for the requested network, including the base fee (in Gwei), priority fee suggestions across slow/standard/fast tiers, maxFeePerGas values for each tier, and estimated USD costs for common transaction types such as ETH transfers and ERC-20 swaps.

## Request schema (JSON Schema)

```json
{
 "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"
      },
      "cost_usd": {
       "type": "object",
       "properties": {
        "nft_mint": {
         "type": "number"
        },
        "transfer": {
         "type": "number"
        },
        "uniswap_swap": {
         "type": "number"
        },
        "erc20_transfer": {
         "type": "number"
        }
       }
      },
      "timestamp": {
       "type": "string"
      },
      "block_number": {
       "type": "integer"
      },
      "base_fee_gwei": {
       "type": "number"
      },
      "eth_price_usd": {
       "type": "integer"
      },
      "priority_fee_gwei": {
       "type": "object",
       "properties": {
        "fast": {
         "type": "number"
        },
        "safe_low": {
         "type": "number"
        },
        "standard": {
         "type": "number"
        }
       }
      },
      "total_recommended_gwei": {
       "type": "number"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chain": "base",
  "cost_usd": {
   "nft_mint": 0.006,
   "transfer": 0.0008,
   "uniswap_swap": 0.004,
   "erc20_transfer": 0.0012
  },
  "timestamp": "2026-05-06T22:00:00Z",
  "block_number": 27500000,
  "base_fee_gwei": 0.005,
  "eth_price_usd": 3500,
  "priority_fee_gwei": {
   "fast": 0.002,
   "safe_low": 0.001,
   "standard": 0.001
  },
  "total_recommended_gwei": 0.006
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentutility-gas-fees-api-a4698ee8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentutility.ai](https://www.zero.xyz/host/x402.agentutility.ai/llms.txt)
