# Phantom API — StarkNet Gas Estimate

> Phantom API — StarkNet 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-18).

Estimates gas fees for a transaction on the StarkNet network before submission

## Facts

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

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-starknet-gas-estimate-d9d1ee2c -d '<json body>'
```

Example prompt: Estimate the gas cost for a StarkNet transaction from my wallet 0xAbCd...1234 to contract 0x1111...aaaa with calldata 0x00dead and value 0 before I submit it.

## When to prefer this

Use this endpoint when you need a fast, pay-per-call gas estimate for a StarkNet transaction without running your own node. Ideal for agents that need to preflight transaction costs before committing, or for comparing fees across different contract interactions on StarkNet specifically.

## Known failure modes

- Invalid or malformed 'to' address returns an error
- Invalid calldata format causes a simulation failure
- Unreachable StarkNet node results in a timeout or 503
- Missing required fields returns a 400 bad request
- Estimated gas may differ from actual gas if network conditions change between estimate and submission

## 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 fee (in StarkNet native units) for the specified transaction parameters, allowing the caller to assess cost before 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-starknet-gas-estimate-d9d1ee2c/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)
