# Phantom API — Sonic Gas Estimator

> Phantom API — Sonic 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-15).

Estimates gas costs for a transaction on the Sonic blockchain network before submission

## Facts

- Endpoint: POST https://phantom-api-omega.vercel.app/api/sonic/gas/estimate
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/phantom-api-sonic-gas-estimator-45f7895d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_y0cuySEHRkbokxppeaPdm

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-sonic-gas-estimator-45f7895d -d '<json body>'
```

Example prompt: Estimate the gas cost for a Sonic network transaction from 0xAbC...123 to 0xDeF...456 with calldata 0xa9059cbb... and a value of 0 ETH before I submit it.

## When to prefer this

Use this endpoint when you need to estimate gas costs specifically on the Sonic blockchain network before submitting a transaction. Prefer it over generic gas APIs when working with Sonic-native DeFi protocols, smart contracts, or token transfers on that chain. It is appropriate for pre-flight checks, wallet UX, or cost-budgeting in automated agents operating on Sonic.

## Known failure modes

- Invalid or malformed address in 'to' or 'from' fields returns a 400 error
- Malformed calldata in the 'data' field causes estimation failure
- Sonic network node unavailability leads to timeout or 503 error
- Payment not included or insufficient triggers a 402 Payment Required response
- Transaction that would revert on-chain may return an error or zero estimate

## 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) for the specified transaction on the Sonic network, enabling the caller to assess transaction cost and feasibility 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-sonic-gas-estimator-45f7895d/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)
