# Gas Estimate

> Gas Estimate is a paid API for AI agents from bess-x402.onrender.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-30).

Estimates gas usage and cost for an EVM transaction (eth_estimateGas) with a 20% safety buffer, and fails clearly if the call would revert.

## Facts

- Endpoint: GET https://bess-x402.onrender.com/v1/evm/estimate-gas?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gas-estimate-49d5f633
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_oY1YXRmF1yBC3zp3Iab0V

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 gas-estimate-49d5f633
```

Example prompt: Before I sign, estimate the gas and total cost for sending 0.5 ETH to 0xAbC123... on Base — include the 20% buffer so I know the safe limit to set.

## When to prefer this

Use this endpoint when you need a quick, safe gas estimate before signing any EVM transaction — especially when sending ETH, invoking a contract, or passing calldata — across Ethereum, Base, Arbitrum, Optimism, or Polygon. The built-in 20% buffer and revert detection make it superior to raw eth_estimateGas calls for agent workflows that need to avoid failed transactions or out-of-gas errors.

## Known failure modes

- Transaction would revert: endpoint returns a clear revert reason instead of a gas estimate
- Invalid or unsupported chain name: request fails with a validation error
- Malformed calldata or invalid address: returns an error describing the bad input
- Network timeout or RPC node unavailability: returns a service error
- Missing required 'to' parameter: returns a schema validation error

## How this service works

Estimate the gas a transaction will use (eth_estimateGas) and its cost at the current gas price, with a 20% buffer; fails clearly when the call would revert. Use before signing.

## Output

Returns the estimated gas units the transaction will consume, the current gas price, the total cost with a 20% buffer applied, and — if the transaction would revert — a clear error with the revert reason rather than a misleading gas figure.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "to"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "Recipient or contract"
      },
      "data": {
       "type": "string",
       "description": "0x calldata (optional)"
      },
      "chain": {
       "type": "string",
       "description": "ethereum, base, arbitrum, optimism or polygon"
      },
      "value_eth": {
       "type": "number",
       "description": "Native amount to send"
      },
      "from_address": {
       "type": "string",
       "description": "Sender (optional)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gas-estimate-49d5f633/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from bess-x402.onrender.com](https://www.zero.xyz/host/bess-x402.onrender.com/llms.txt)
