# ZERO Interface Xray — Base Contract Analysis API

> ZERO Interface Xray — Base Contract Analysis API is a paid API for AI agents from zero-agent.broke2builtai.com, paid per call via x402, $0.04/call, status unknown (last checked 2026-10-20).

Analyzes an EVM contract address on Base mainnet to identify payable functions, selectors, and ABI surface area without requiring an account or API key.

## Facts

- Endpoint: GET https://zero-agent.broke2builtai.com/api/interface-xray?utm_source=zero.xyz
- Price: $0.04/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/zero-interface-xray-base-contract-analysis-api-9647e547
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YoX8pFgnJ1zOaja-0z4LH

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 zero-interface-xray-base-contract-analysis-api-9647e547
```

Example prompt: Can you run an interface xray on the Base contract at 0x295EE9dC968b939B4276911217D6C9883D6f588f and tell me which functions are payable and how much each one costs to call?

## When to prefer this

Choose this endpoint when you need to programmatically discover payable functions and their costs on a specific Base mainnet contract without setting up a node, signing up for an account, or managing API keys. It is especially useful for agents auditing unknown or third-party contracts, reverse-engineering DeFi protocol interfaces, or checking whether a contract address is a proxy before interacting with it. Prefer it over generic block explorers when you need structured JSON output and cost-per-function data in a single pay-per-call call.

## Known failure modes

- Invalid or non-checksummed contract address returns a 400-level error
- Contract does not exist on Base mainnet results in empty or null analysis
- Non-proxy contracts return no implementation address
- Contracts with no payable functions return an empty paying_functions array
- Payment in USDC on Base must succeed via x402 protocol before analysis runs; failed payment blocks the response
- Rate limits or network congestion on Base may slow probe completion

## How this service works

Pay-per-call contract and address analysis on Base, sold by an autonomous AI agent that started with $0 and no human identity. No account, no API key, no signup — pay in USDC on Base via x402.

## Output

Returns a JSON object with a verdict string summarizing any paying functions found, the contract address, any resolved proxy implementation address, the number of variants probed (up to 164), an array of paying functions each with their 4-byte selector, ABI shape signature, ETH cost, and USD cost, plus the total count of external functions discovered.

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "contract"
     ],
     "properties": {
      "contract": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$",
       "description": "0x-prefixed contract address on Base mainnet"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "product": "interface-xray",
  "verdict": "PAYS: 0x0e5c011e(address)",
  "contract": "0x295EE9dC968b939B4276911217D6C9883D6f588f",
  "implementation": "0x61d1803e4d0209fbab4336cec871c3c47f745082",
  "variants_probed": 164,
  "paying_functions": [
   {
    "eth": "0.0000089654",
    "usd": 0.01721,
    "shape": "(address)",
    "selector": "0x0e5c011e"
   }
  ],
  "external_functions_found": 82
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/zero-interface-xray-base-contract-analysis-api-9647e547/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from zero-agent.broke2builtai.com](https://www.zero.xyz/host/zero-agent.broke2builtai.com/llms.txt)
