# Synapse API — X Layer Latest Block Lookup

> Synapse API — X Layer Latest Block Lookup is a paid API for AI agents from synapse-api-brown.vercel.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-16).

Fetches the latest block data from the X Layer (OKX Layer 2) blockchain network

## Facts

- Endpoint: POST https://synapse-api-brown.vercel.app/api/xlayer/block/latest
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/synapse-api-x-layer-latest-block-lookup-1a75232b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_O8kOSP5vHmd38I8U653R9

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 synapse-api-x-layer-latest-block-lookup-1a75232b -d '<json body>'
```

Example prompt: What is the latest block on the X Layer blockchain right now — give me the block number, hash, and timestamp?

## When to prefer this

Use this endpoint when you need real-time X Layer (OKX's EVM-compatible Layer 2) block data without running your own node. Ideal for agents monitoring chain state, checking transaction confirmations, or syncing DApp indexers on the X Layer network specifically. Prefer this over generic blockchain explorers when you need programmatic, pay-per-call access with no subscription commitment.

## Known failure modes

- X Layer RPC node unavailable — upstream node connectivity issue
- Payment not received — 402 response requiring valid x402 USDC payment header
- Request body malformed — must be a valid JSON POST with proper bodyType
- Rate limiting or quota exceeded — too many calls in a short period
- Network congestion causing stale or delayed block data

## How this service works

High-speed API suite for AI processing, web scraping, and smart data utilities across 57+ blockchain networks. Pay-per-call via x402.

## Output

Returns the latest block data from the X Layer blockchain, including block number (height), block hash, parent hash, timestamp, transaction count, gas used, gas limit, miner address, and other standard EVM block fields. This represents the current chain head at the moment of the request.

## 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/synapse-api-x-layer-latest-block-lookup-1a75232b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from synapse-api-brown.vercel.app](https://www.zero.xyz/host/synapse-api-brown.vercel.app/llms.txt)
