# onchain-tx-explain

> onchain-tx-explain is a paid API for AI agents from payai.agentstools.dev, paid per call via x402, $0.012/call, status unknown (last checked 2026-10-12).

Returns a plain-language explanation of an EVM transaction by hash, including net token movements, operation type, protocol labels, gas costs, and a human-readable summary across 12 networks.

## Facts

- Endpoint: GET https://payai.agentstools.dev/tx/explain?utm_source=zero.xyz
- Price: $0.012/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onchain-tx-explain-a2228e50
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-EpgMh-EcIq5JerhA8nwQ

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 onchain-tx-explain-a2228e50
```

Example prompt: Can you explain what happened in this Ethereum transaction — 0x4a3b2c1d...abcdef — in plain English? Tell me what tokens moved, what type of operation it was (swap, transfer, etc.), which protocol was involved, and how much gas was spent in USD.

## When to prefer this

Use this endpoint when you need a human-readable breakdown of any EVM transaction — especially for DeFi activity (swaps, mints, approvals) across Base, Ethereum, Arbitrum, Optimism, Polygon, BNB, Avalanche, Gnosis, Linea, Scroll, Celo, or Mantle. Prefer this over raw RPC calls or block explorers when the goal is natural-language explanation, token movement accounting per participant, or protocol identification without manual ABI decoding.

## Known failure modes

- Invalid transaction hash format returns validation error
- Transaction hash not found on specified network returns 404 or empty result
- Network not supported (outside the 12 supported chains) returns error
- Transaction still pending may not be decodable
- Complex MEV or novel protocol interactions may produce incomplete labels
- Network congestion or RPC issues may cause timeout

## How this service works

Plain-language explanation of an EVM transaction by hash across 12 networks: net token movements per participant (ERC-20, ERC-721, ERC-1155, native, WETH), the operation type (swap, transfer, approve, mint, deploy, wrap, and more), protocol labels, gas in native plus USD, and a readable summary.

## Output

Returns net token movements per participant (ERC-20, ERC-721, ERC-1155, native coin, WETH), the classified operation type (swap, transfer, approve, mint, deploy, wrap, etc.), protocol labels identifying involved contracts, gas used in native token and USD equivalent, and a human-readable narrative summary of what the transaction did.

## 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",
     "required": [
      "hash"
     ],
     "properties": {
      "hash": {
       "type": "string",
       "description": "Transaction hash (0x + 64 hex characters)"
      },
      "network": {
       "enum": [
        "base",
        "ethereum",
        "arbitrum",
        "optimism",
        "polygon",
        "bnb",
        "avalanche",
        "gnosis",
        "linea",
        "scroll",
        "celo",
        "mantle"
       ],
       "type": "string",
       "description": "EVM network to read from (default base)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onchain-tx-explain-a2228e50/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payai.agentstools.dev](https://www.zero.xyz/host/payai.agentstools.dev/llms.txt)
