# Phoenix Zero Safe Check

> Phoenix Zero Safe Check is a paid API for AI agents from rtt.phoenix-ai.work, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Pre-flight boolean safety check for L2 transactions, returning safe/unsafe status with a reason code and sequencer health metrics.

## Facts

- Endpoint: GET https://rtt.phoenix-ai.work/api/v1/safe
- 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/phoenix-zero-safe-check-b845fb1b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Mw9Nrjtm-x417nHyQuIca

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 phoenix-zero-safe-check-b845fb1b
```

Example prompt: Before I submit this GET transaction to the L2 network, do a Phoenix Zero safe check to make sure conditions are good — I need to know if it's safe to proceed or if the sequencer is stalling.

## When to prefer this

Choose this endpoint when your agent needs a fast, cheap ($0.01 USDC), high-frequency pre-flight gate before submitting any L2 blockchain transaction. It is purpose-built for agent automation loops where you want to avoid wasted gas from revert-prone or stalled sequencer conditions. Prefer this over full L2 health oracles when you only need a binary go/no-go decision with a machine-readable reason code rather than full multi-chain sequencer metrics.

## Known failure modes

- Data stale: reason code 'data_stale' returned when backend health data is too old to be reliable
- Sequencer stall detected: safe=false with reason 'sequencer_stall' indicating the L2 sequencer is not processing transactions
- High revert conditions: safe=false with reason 'high_revert' when revert ratio is critically elevated
- Elevated revert: safe=false with reason 'elevated_revert' for moderately high revert rates
- Payment failure: 402 response if USDC payment is not properly attached
- Network timeout: endpoint may be temporarily unreachable under extreme L2 stress conditions

## How this service works

Boolean pre-flight check for L2 transaction safety across all 12 chains (?chain= param, default: base). Returns safe=true/false with reason code. Optimized for high-frequency agent calls before submitting transactions.

## Output

Returns a JSON object with: a boolean 'safe' field (true if safe to execute the L2 transaction now), a 'reason' enum ('ok', 'elevated_revert', 'high_revert', 'sequencer_stall', or 'data_stale') explaining the safety status, a 'base_p99_ms' number representing the Base sequencer P99 round-trip time in milliseconds, and a 'revert_ratio' number (0.0–1.0) indicating the current transaction revert rate.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "safe": {
       "type": "boolean",
       "description": "true = safe to execute L2 transaction now"
      },
      "chain": {
       "type": "string",
       "description": "Chain checked (default: base, supports all 12)"
      },
      "p99_ms": {
       "type": "number",
       "description": "Sequencer P99 RTT in milliseconds"
      },
      "reason": {
       "enum": [
        "ok",
        "elevated_revert",
        "high_revert",
        "sequencer_stall",
        "data_stale"
       ],
       "type": "string"
      },
      "revert_ratio": {
       "type": "number",
       "description": "Base revert ratio (0.0-1.0)"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/phoenix-zero-safe-check-b845fb1b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from rtt.phoenix-ai.work](https://www.zero.xyz/host/rtt.phoenix-ai.work/llms.txt)
