# Base Mainnet Gas Estimation

> Base Mainnet Gas Estimation is a paid API for AI agents from apiacre.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-14).

Estimates gas for a single Base mainnet transaction at a resolved block, applies a caller-bounded buffer, and returns RPC rejection evidence without signing or broadcasting.

## Facts

- Endpoint: POST https://apiacre.com/v1/crypto/base-gas-estimate
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-mainnet-gas-estimation-7c66230b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7nBQugmoS0ZfOSZpWxxC4

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 base-mainnet-gas-estimation-7c66230b -d '<json body>'
```

Example prompt: Before I send this contract call on Base mainnet, estimate the gas it will need — use my address 0xAbC...123 calling contract 0xDEF...456 with this calldata 0xa9059cbb..., and add a 20% buffer so I don't run out.

## When to prefer this

Choose this endpoint when you need a safe, read-only gas estimate for a Base mainnet transaction before signing or broadcasting — especially when you want to apply a caller-controlled buffer to avoid out-of-gas failures and capture RPC rejection evidence for debugging. It is specifically scoped to Base mainnet (not Ethereum mainnet or other EVM chains) and is ideal for agents that need programmatic gas limit selection without running a full node.

## Known failure modes

- Transaction would revert — RPC rejection evidence returned with revert reason
- Invalid or unresolvable block reference — returns error with block context
- Malformed calldata or address — validation error returned
- Buffer percentage out of allowed bounds — rejection with allowable range
- Base RPC unavailable or rate-limited — upstream error propagated
- Missing required fields (from/to address or calldata) — schema validation error

## How this service works

Estimate gas for one Base mainnet transaction context at a resolved block, add a bounded caller-selected buffer, and preserve RPC rejection evidence without signing or broadcasting.

## Output

Returns the estimated gas units for the transaction at the resolved block, a buffered gas limit incorporating the caller-specified safety margin, the resolved block number, base fee and gas price data, and any RPC rejection evidence captured during the dry-run — all without signing or submitting the transaction.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "to": {
   "type": "string"
  },
  "block_tag": {
   "enum": [
    "latest",
    "safe",
    "finalized"
   ],
   "type": "string"
  },
  "call_data": {
   "type": "string"
  },
  "value_wei": {
   "type": "string"
  },
  "from_address": {
   "type": "string"
  },
  "buffer_percent": {
   "type": "integer"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "block": {
    "hash": "0x1111111111111111111111111111111111111111111111111111111111111111",
    "number": 34567890,
    "gasLimit": 120000000,
    "timestamp": "2026-08-10T16:00:00+00:00",
    "requestedTag": "safe"
   },
   "source": "https://docs.base.org/base-chain/api-reference/ethereum-json-rpc-api/eth_esti...",
   "status": "estimated",
   "network": "eip155:8453",
   "estimate": {
    "gas": 24640,
    "gasHex": "0x6040",
    "bufferPercent": 20,
    "suggestedGasLimit": 29568,
    "suggestedGasLimitHex": "0x7380"
   },
   "readOnly": true,
   "rpcError": null,
   "warnings": [],
   "disclaimer": "Read-only Base mainnet gas estimation only. No transaction is created, signed...",
   "limitations": [
    "The estimate is state-dependent and does not guarantee later execution.",
    "Base-fee components exclude priority fees, L1 data fees, and other fee compon...",
    "Only one existing destination is estimated; contract deployment is not suppor..."
   ],
   "transaction": {
    "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "from": "0x1111111111111111111111111111111111111111",
    "valueWei": "0",
    "dataBytes": 36,
    "dataSha256": "2da90680426443e99a57371fef89ebdb0cba7f941eda4e27491a3bd2069ef775"
   },
   "rpcCallsMade": 2,
   "estimationAccepted": true,
   "networkRequestsMade": 2,
   "transactionBroadcast": false
  },
  "meta": {
   "cached": false,
   "sources": [],
   "warnings": [],
   "duration_ms": 42,
   "next_actions": []
  },
  "service": "crypto.base-gas-estimate",
  "version": "1",
  "request_id": "018f1f54-7f38-7ba2-8dc3-5f90272d9f1a"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-mainnet-gas-estimation-7c66230b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from apiacre.com](https://www.zero.xyz/host/apiacre.com/llms.txt)
