# EVM Gas Estimator

> EVM Gas Estimator is a paid API for AI agents from flat-rate-llm.kikoribera03.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Estimates the gas units and cost for an EVM transaction before signing, detecting reverts without broadcasting.

## Facts

- Endpoint: POST https://flat-rate-llm.kikoribera03.workers.dev/v1/evm/estimate-gas
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/evm-gas-estimator-d95e1bf3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NoGqVzoElk696-f4DyMc9

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 evm-gas-estimator-d95e1bf3 -d '<json body>'
```

Example prompt: Before I sign anything, can you estimate how much gas and ether it would cost to call this contract on Base — sending to 0xAbCd...1234 with calldata 0xa9059cbb...0000 from 0x1111...2222?

## When to prefer this

Choose this endpoint when you need to pre-flight an EVM transaction on Base, Ethereum, Polygon, Arbitrum, or Optimism without broadcasting it. It is ideal for cost estimation before signing, detecting reverts cheaply, and building gas budgets for automated agent workflows. Prefer it over on-chain simulation tools when you want a simple, flat-rate API call with no wallet SDK dependency.

## Known failure modes

- Invalid or malformed 'to' address returns an error
- Unknown or unsupported chain name causes rejection
- Calldata that references non-existent contract functions may cause wouldRevert=true
- Network congestion may cause gas price to drift between estimate and actual submission
- Missing required 'to' field returns a 400-level error

## How this service works

60 paid endpoints with no metering, no API key and no account. Each endpoint has one flat price per call, whatever the size of the request: LLM completions with automatic failover across several large models, read-only EVM tooling over Base, Ethereum, Polygon, Arbitrum and Optimism, and pure crypto utilities that touch no network.

## Output

Returns the estimated gas units needed, the current gas price in wei, and the total cost denominated in ether. Also returns a wouldRevert boolean flag indicating whether the call would fail if broadcast, making it the cheapest way to detect reverts before committing.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "to"
 ],
 "properties": {
  "to": {
   "type": "string",
   "description": "Destination address."
  },
  "data": {
   "type": "string",
   "description": "Optional 0x calldata."
  },
  "from": {
   "type": "string",
   "description": "Sender address."
  },
  "chain": {
   "type": "string",
   "description": "base | ethereum | polygon | arbitrum | optimism."
  },
  "value": {
   "type": "string",
   "description": "Optional value in wei, as a decimal string."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "gas": {
   "type": "number"
  },
  "costEther": {
   "type": "number"
  },
  "gasPriceWei": {
   "type": "string"
  },
  "wouldRevert": {
   "type": "boolean"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/evm-gas-estimator-d95e1bf3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from flat-rate-llm.kikoribera03.workers.dev](https://www.zero.xyz/host/flat-rate-llm.kikoribera03.workers.dev/llms.txt)
