# Phantom API — Optimism Latest Block

> Phantom API — Optimism Latest Block 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).

Fetches the most recent block data from the Optimism (OP Mainnet) blockchain in real time.

## Facts

- Endpoint: POST https://phantom-api-omega.vercel.app/api/optimism/block/latest
- 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-optimism-latest-block-2fcff021
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Oqc77LW-u7gB_ufU3oWzB

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-optimism-latest-block-2fcff021 -d '<json body>'
```

Example prompt: What's the latest block on Optimism right now — give me the block number, hash, and timestamp?

## When to prefer this

Choose this endpoint when you need real-time Optimism (OP Mainnet) block data via a pay-per-call model with no subscription required, especially useful for agents that need on-demand chain-head checks without committing to a node provider plan. Prefer over generic RPC providers when operating in an x402 micropayment context at $0.01 per call.

## Known failure modes

- Network or RPC node downtime causing 503 or timeout
- Payment failure via x402 protocol returning 402 if USDC balance is insufficient
- Invalid request body format returning 400 bad request
- Rate limiting or quota exceeded returning 429
- Temporary Optimism node sync lag causing slightly stale block data

## 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 on-chain metadata for the most recently confirmed block on Optimism, including block number, hash, parent hash, timestamp, gas used, and the list of transactions included in that block.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "properties": {},
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/phantom-api-optimism-latest-block-2fcff021/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)
