# Phantom API — zkSync Gas Estimator

> Phantom API — zkSync 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 fees for transactions on the zkSync Layer 2 network given transaction parameters

## Facts

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

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-zksync-gas-estimator-e4309d4a -d '<json body>'
```

Example prompt: Estimate the gas cost for a zkSync transaction from 0xAbCd...1234 to 0x5678...EfGh with calldata 0xa9059cbb...000064 and a value of 0.01 ETH.

## When to prefer this

Use this endpoint when you need gas estimation specifically on the zkSync Layer 2 network (Era or Lite). It is distinct from Ethereum mainnet gas estimation and other L2s. Prefer this over generic EVM gas estimators when your transaction is destined for zkSync, as zkSync has unique fee mechanics (L1 security fee + L2 execution fee) that generic estimators don't capture correctly.

## Known failure modes

- Invalid address format for 'to' or 'from' fields returns a validation error
- Malformed or non-hex calldata string causes a parse error
- zkSync RPC node unavailable or rate-limited returns a 503 or timeout
- Transactions that would revert on-chain may return an execution revert error rather than a gas estimate
- Missing required fields returns a 400 bad request
- Value field not formatted as a hex or decimal string may cause parsing failures

## 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) and likely fee details for the described zkSync transaction, without actually broadcasting the transaction to the network.

## 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-zksync-gas-estimator-e4309d4a/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)
