# AgentSpendGuard Transaction Explain & Calldata Risk API

> AgentSpendGuard Transaction Explain & Calldata Risk API is a paid API for AI agents from api-production-2800.up.railway.app, paid per call via x402, $0.010000/call, status unknown (last checked 2026-09-15).

Analyzes EVM transaction calldata before signing, returning a human-readable intent explanation, risk score, reason codes, and recommended action for AI wallet agents.

## Facts

- Endpoint: POST https://api-production-2800.up.railway.app/v1/tx-explain
- Price: $0.010000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-production-2800-up-railway-app-069c4485
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BlavZQ9wIBd3SeApxOc-3

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 api-production-2800-up-railway-app-069c4485 -d '<json body>'
```

Example prompt: Before I sign this transaction, explain what it does and tell me if it's safe — the calldata is 0xa9059cbb000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff on contract 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Base mainnet.

## When to prefer this

Use this endpoint when an AI wallet agent or autonomous DeFi agent needs a pre-signing safety check on raw EVM calldata, especially for detecting unlimited token approvals, phishing contract interactions, or unexpected fund transfers. Prefer this over generic contract explorers when you need a structured JSON verdict with risk scores and reason codes that an agent can act on programmatically.

## Known failure modes

- Invalid or unparseable calldata returns an error response
- Unsupported chain ID returns a 400 or unknown-chain error
- Missing required fields in POST body returns 422 validation error
- Payment not included or invalid x402 payment header returns 402 Payment Required
- Contract not found on specified chain returns partial analysis with low confidence
- Rate limiting or service unavailability returns 503

## How this service works

Transaction explain and calldata risk API by AgentSpendGuard for AI wallet agents before signing EVM transactions. Search keywords: transaction explain, calldata explain, approval risk detector, unlimited allowance, EVM signing guardrail, wallet agent safety, agent spend guard. Returns strict JSON intent, risk score, reason codes, and recommended action.

## Output

A strict JSON object containing a plain-language intent description of what the transaction does, a numeric risk score (0-100), one or more reason codes (e.g. UNLIMITED_ALLOWANCE, UNKNOWN_CONTRACT, PHISHING_PATTERN), and a recommended action (allow, caution, or block) for the agent to act on before signing.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "data"
 ],
 "properties": {
  "to": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$"
  },
  "data": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]*$"
  },
  "from": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$"
  },
  "chainId": {
   "enum": [
    1,
    8453,
    84532,
    10,
    42161,
    137
   ],
   "type": "integer",
   "default": 8453
  },
  "valueWei": {
   "type": "string",
   "default": "0",
   "pattern": "^\\d+$"
  },
  "knownSpenders": {
   "type": "array",
   "items": {
    "type": "string",
    "pattern": "^0x[a-fA-F0-9]{40}$"
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-production-2800-up-railway-app-069c4485/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api-production-2800.up.railway.app](https://www.zero.xyz/host/api-production-2800.up.railway.app/llms.txt)
