# x402 Transaction Safety Guardrail

> x402 Transaction Safety Guardrail is a paid API for AI agents from x402-services-production.up.railway.app, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-14).

Pre-signing safety check that decodes a pending EVM transaction and returns SAFE/CAUTION/DANGER with reasons, detecting sanctioned addresses, drainer patterns, unlimited approvals, and revert risk

## Facts

- Endpoint: POST https://x402-services-production.up.railway.app/api/safety/guardrail
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-transaction-safety-guardrail-c44e9e17
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_t2D1tGMO7o_M45OqK5fxO

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 x402-transaction-safety-guardrail-c44e9e17 -d '<json body>'
```

Example prompt: Before I sign this transaction, check if it's safe — it's on Base, sending to 0xAbC123...def456 with calldata 0xa9059cbb...0001 from my wallet 0x1234...5678 with 0 value.

## When to prefer this

Use this endpoint as the mandatory pre-signing guard for any AI agent or wallet that executes on-chain transactions — especially when interacting with unfamiliar contracts, token approvals, or DeFi protocols. Prefer it over generic on-chain data lookups when you specifically need a combined safety verdict that covers sanctions screening, drainer detection, and revert simulation in a single call.

## Known failure modes

- Missing required 'to' field returns validation error
- Invalid hex address format causes parse error
- Unknown or unsupported chain identifier may default to Base or return error
- Simulation failure when 'from' is not provided may reduce accuracy
- Contract not verified on chain may limit calldata decoding
- RPC node unavailability on target chain causes timeout

## How this service works

Pre-sign safety verdict: one call decodes a pending transaction and checks sanctioned counterparties, unlimited-approval/drainer patterns, contract-vs-EOA, and whether it would revert — returning SAFE / CAUTION / DANGER with reasons. Send { chain, to, data, from?, value? }. The must-have guard every signing agent needs.

## Output

A JSON object containing a verdict of SAFE, CAUTION, or DANGER, accompanied by an array of human-readable reasons explaining the assessment — covering sanction hits, drainer or unlimited-approval patterns, EOA vs contract status, and whether the transaction would revert on simulation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "to"
 ],
 "properties": {
  "to": {
   "type": "string",
   "description": "0x target address"
  },
  "data": {
   "type": "string",
   "description": "0x calldata (default 0x)"
  },
  "from": {
   "type": "string",
   "description": "0x sender (improves simulation)"
  },
  "chain": {
   "type": "string",
   "description": "Chain, default base"
  },
  "value": {
   "type": "string",
   "description": "Native value in wei"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-transaction-safety-guardrail-c44e9e17/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-services-production.up.railway.app](https://www.zero.xyz/host/x402-services-production.up.railway.app/llms.txt)
