# Phantom API — Gas Estimation

> Phantom API — Gas Estimation is a paid API for AI agents from phantom-api-omega.vercel.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Estimates gas cost for an Ethereum-compatible transaction before it is submitted on-chain

## Facts

- Endpoint: POST https://phantom-api-omega.vercel.app/api/stable/gas/estimate
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/phantom-api-gas-estimation-91ba56a7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MKn8FUj2bIlkN5I0uyUVl

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 phantom-api-gas-estimation-91ba56a7 -d '<json body>'
```

Example prompt: Estimate the gas needed to call this contract — from address 0xAbC...123, to contract 0xDeF...456, with calldata 0xa9059cbb...000064, and no ETH value attached.

## When to prefer this

Use this endpoint when you need a fast, pay-per-call gas estimate for an Ethereum-compatible transaction without managing your own RPC node or subscribing to a full blockchain data provider. Ideal for agents that need lightweight, on-demand gas cost checks before submitting transactions, especially across 57+ supported networks.

## Known failure modes

- Invalid or malformed address in 'to' or 'from' fields returns a 400 error
- Malformed hex in 'data' field may cause estimation failure
- If the target contract would revert, the gas estimate may fail or return an error indicating the transaction would fail
- Network unavailability or RPC timeout results in a 5xx error
- Missing required fields may produce an incomplete estimation or error

## How this service works

Lightning-fast access to blockchain data, smart contract insights, and Web3 infrastructure across 57+ networks. Pay-per-call via x402.

## Output

Returns an estimated gas unit amount for the described transaction, reflecting how much computational work the EVM would need to execute it. This lets callers predict fees before broadcasting.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "to": {
   "type": "string"
  },
  "data": {
   "type": "string"
  },
  "from": {
   "type": "string"
  },
  "value": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/phantom-api-gas-estimation-91ba56a7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from phantom-api-omega.vercel.app](https://www.zero.xyz/host/phantom-api-omega.vercel.app/llms.txt)
