# BRAINIAC Gas Estimation API

> BRAINIAC Gas Estimation API is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-17).

Estimates the gas cost for an Ethereum/EVM transaction given transaction parameters like to, from, data, and value

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/chain-data/gas/estimate?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-gas-estimation-api-d46dd3eb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_U8QaCA4okFgbedPNTu3ld

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 brainiac-gas-estimation-api-d46dd3eb -d '<json body>'
```

Example prompt: Can you estimate the gas needed for a transaction from 0xAbC1234...5678 to 0xDef9876...1234 with no calldata and a value of 0x0 on the EVM?

## When to prefer this

Use this endpoint when you need a quick, pay-per-call gas estimate for an EVM transaction without setting up an account or managing API keys. Ideal for AI agents that need on-demand gas cost information as part of a broader transaction planning workflow. Prefer this over self-hosted RPC calls when you want zero infrastructure overhead and are already operating in an x402 micropayment context on Base.

## Known failure modes

- Invalid Ethereum address format for 'to' or 'from' — returns validation error
- Malformed or non-hex 'data' or 'value' fields — returns schema error
- Transaction would revert on-chain — estimation may fail or return an error indicating revert
- Network congestion or RPC backend unavailability — may return 503 or timeout
- Payment not received or insufficient USDC — returns 402 Payment Required before processing

## How this service works

Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.

## Output

A JSON response containing the estimated gas units required to execute the given EVM transaction. This allows callers to plan transaction fees, set gas limits, and avoid failed transactions due to under-estimation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "to": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]{40}$"
  },
  "data": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]*$"
  },
  "from": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]{40}$"
  },
  "value": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]+$"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "source": {
   "url": "https://mainnet.base.org",
   "status": "OK"
  },
  "chainId": 8453,
  "estimate": 21000,
  "retrievedAt": "2026-11-07T12:08:59.407Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-gas-estimation-api-d46dd3eb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.brainiac.software](https://www.zero.xyz/host/www.brainiac.software/llms.txt)
