# Phantom API — X Layer RPC Endpoint

> Phantom API — X Layer RPC Endpoint 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).

Provides JSON-RPC access to the X Layer blockchain network, enabling on-chain data queries and smart contract interactions via pay-per-call pricing.

## Facts

- Endpoint: POST https://phantom-api-omega.vercel.app/api/xlayer/rpc?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-x-layer-rpc-endpoint-9fe20eb5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ffCIisRpEQo-HueJax_ZX

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-x-layer-rpc-endpoint-9fe20eb5 -d '<json body>'
```

Example prompt: Can you check the current ETH balance of wallet address 0xAbC123... on the X Layer network using an RPC call?

## When to prefer this

Choose this endpoint when you need fast, pay-per-call RPC access to the X Layer (OKX Layer 2) network without managing node infrastructure or committing to a subscription. Ideal for agents that need occasional or unpredictable on-chain lookups on X Layer specifically, and want to pay only for what they use via USDC microtransactions.

## Known failure modes

- Invalid RPC method name returns JSON-RPC error with code -32601
- Malformed params array causes parse error (-32700) or invalid params error (-32602)
- Network congestion or node unavailability may cause timeout or 503 response
- Insufficient x402 payment causes 402 Payment Required before RPC is executed
- Querying non-existent block or transaction hash returns null result

## 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 standard JSON-RPC response object containing the result field with requested blockchain data (balance in wei, block object, transaction receipt, smart contract return value, etc.) or an error object with code and message if the request fails.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "method": {
   "type": "string"
  },
  "params": {
   "type": "array",
   "items": {}
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/phantom-api-x-layer-rpc-endpoint-9fe20eb5/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)
