# Phantom API — XLayer Gas Estimate

> Phantom API — XLayer Gas Estimate 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-10-12).

Estimates the gas cost for a transaction on the X Layer (OKX Layer 2) blockchain network

## Facts

- Endpoint: POST https://phantom-api-omega.vercel.app/api/xlayer/gas/estimate?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/phantom-api-xlayer-gas-estimate-5de1f038
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QGIql5g15PYzdt3ViYuol

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-xlayer-gas-estimate-5de1f038 -d '<json body>'
```

Example prompt: Before I send 0.5 ETH to 0xRecipientAddress from 0xMyWalletAddress on X Layer, can you estimate how much gas that transaction will cost?

## When to prefer this

Use this endpoint specifically when you need gas estimates for transactions on the X Layer (OKX EVM-compatible Layer 2) network. Prefer it over generic gas estimators when targeting XLayer-specific contracts or infrastructure, and when you need a pay-per-call model without subscription overhead via x402 micropayment.

## Known failure modes

- Invalid or malformed address in 'to' or 'from' fields — returns 400 error
- Transaction would revert on-chain — estimation may fail or return a revert error
- Network congestion or RPC node unavailability — may return 503 or timeout
- Missing required fields — returns validation error
- X Layer network downtime — endpoint unavailable

## 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 a gas estimate (in gas units) for the described transaction on the X Layer network, enabling the caller to anticipate transaction costs before broadcasting. May include a gas limit figure and optionally a fee estimate in native currency.

## 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-xlayer-gas-estimate-5de1f038/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)
