# Phantom API — Pharos Gas Estimator

> Phantom API — Pharos Gas Estimator 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 a transaction on the Pharos network given transaction parameters such as sender, recipient, data, and value.

## Facts

- Endpoint: POST https://phantom-api-omega.vercel.app/api/pharos/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-pharos-gas-estimator-59a9f13b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0y9RVGH3KI3GgfTsxixyD

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-pharos-gas-estimator-59a9f13b -d '<json body>'
```

Example prompt: Estimate the gas needed to call a contract at 0xAbCd1234... on Pharos, sending from 0x1111aaaa... with calldata 0xa9059cbb... and no ETH value attached.

## When to prefer this

Choose this endpoint when you need a fast, pay-per-call gas estimate on the Pharos network without managing your own RPC node or API key. It is ideal for agents that need to sanity-check transaction costs before execution, or for DeFi workflows where fee budgeting is critical. Prefer this over running your own eth_estimateGas calls if you don't have Pharos RPC access.

## Known failure modes

- Invalid or malformed address in 'to' or 'from' fields — returns error or null estimate
- Invalid calldata hex string in 'data' field — parsing error
- Transaction simulation reverts on-chain — may return revert reason or error
- Network unavailable or RPC node unresponsive — timeout or 503 error
- Payment not attached or insufficient USDC — x402 payment required 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 amount (in gas units) required to execute the specified transaction on the Pharos network. This lets callers predict transaction fees before broadcasting, avoiding failed transactions due to gas under-estimation.

## 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-pharos-gas-estimator-59a9f13b/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)
