# Ethereum Gas Estimate

> Ethereum Gas Estimate is a paid API for AI agents from agent-data-tools.revmesh2074.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-11-06).

Estimates the gas units and ETH cost a transaction would consume on Ethereum mainnet using eth_estimateGas, including current gas price in gwei.

## Facts

- Endpoint: GET https://agent-data-tools.revmesh2074.workers.dev/eth/estimate-gas?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-06
- Activations on Zero: 0
- Provider: agent-data-tools.revmesh2074.workers.dev
- Website: https://agent-data-tools.revmesh2074.workers.dev
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-data-tools-revmesh2074-workers-dev-ethereum-gas-estimate-020cea9b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XCXWy3sf4U0rg6YTyMK_S

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 agent-data-tools-revmesh2074-workers-dev-ethereum-gas-estimate-020cea9b
```

Example prompt: Before I send this contract call on Ethereum, can you estimate the gas it would use and what it'll cost in ETH? The contract is 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48, my wallet is 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045, and the calldata is 0xa9059cbb000000000000000000000000ab5801a7d398351b8be11c439e05c5b3259aec9b0000000000000000000000000000000000000000000000000de0b6b3a7640000.

## When to prefer this

Use this endpoint when you need to know both the gas units AND the ETH cost of a specific Ethereum transaction before broadcasting it, especially for contract calls with calldata. It is preferred over a raw gas price endpoint (eth_gas) when you want an end-to-end cost estimate tied to a real transaction. It is also useful for catching reverts before they hit the network, saving gas on failed transactions. Choose this over on-chain simulation tools when you need a simple HTTP call with no wallet or node setup.

## Known failure modes

- 422 Unprocessable Entity — transaction would revert on-chain, includes revert reason string; not charged
- Invalid or malformed 'to' address returns a 400 bad request
- Missing required 'to' parameter returns a 400 error
- Invalid calldata encoding causes a revert or 400 error
- Network congestion or RPC timeout may cause a 503 or delayed response
- Insufficient ETH value for payable function triggers a 422 revert

## How this service works

Estimate gas, Ethereum. Estimate the gas a transaction would use on Ethereum (eth_estimateGas) and what it would cost at the current gas price, in gas units, gwei and ETH. Give to, plus value in ETH and calldata for a contract call, and the sender when the call depends on it. Use before sending a transaction or to price a batch; for the gas price alone use eth_gas. A transaction that would revert is 422 with the reason, uncharged.

## Output

Returns a JSON object with: gas (estimated gas units as a string), cost (total cost in ETH as a string), gasPriceGwei (current gas price in gwei), from (sender address used), to (recipient address), value (ETH value), block (block number at estimation time), chain (network name), chainId (numeric chain ID), and symbol (ETH). If the transaction would revert, returns HTTP 422 with the revert reason — and you are not charged.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "to"
     ],
     "properties": {
      "to": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "examples": [
        "0x000000000000000000000000000000000000dEaD"
       ],
       "description": "0x recipient or contract address"
      },
      "data": {
       "type": "string",
       "examples": [
        "0x"
       ],
       "description": "Optional 0x calldata for a contract call"
      },
      "from": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "examples": [
        "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
       ],
       "description": "0x sender address (default: an empty address)"
      },
      "value": {
       "type": "string",
       "examples": [
        "0"
       ],
       "description": "Amount of ETH to send, in ETH (default 0)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "to": {
       "type": "string"
      },
      "gas": {
       "type": "string"
      },
      "cost": {
       "type": "string"
      },
      "from": {
       "type": "string"
      },
      "block": {
       "type": "number"
      },
      "chain": {
       "type": "string"
      },
      "value": {
       "type": "string"
      },
      "symbol": {
       "type": "string"
      },
      "chainId": {
       "type": "number"
      },
      "gasPriceGwei": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "to": "0x000000000000000000000000000000000000dEaD",
  "gas": "21000",
  "cost": "0.000000252",
  "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
  "block": 123456789,
  "chain": "Ethereum",
  "value": "0",
  "symbol": "ETH",
  "chainId": 1,
  "gasPriceGwei": "0.012"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-data-tools-revmesh2074-workers-dev-ethereum-gas-estimate-020cea9b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-data-tools.revmesh2074.workers.dev](https://www.zero.xyz/host/agent-data-tools.revmesh2074.workers.dev/llms.txt)
