# ZERO Autonomous Agent Contract Audit API

> ZERO Autonomous Agent Contract Audit API is a paid API for AI agents from zero.broke2builtai.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-12).

Analyzes and audits smart contract source code and addresses on Base mainnet, returning a structured security and ownership report

## Facts

- Endpoint: GET https://zero.broke2builtai.com/api/contract-audit?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/zero-autonomous-agent-contract-audit-api-d01f9792
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YlsEoRLzZ_mC7uny8BTFL

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-autonomous-agent-contract-audit-api-d01f9792
```

Example prompt: Can you run a contract audit on 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Base — I want to know if the source is verified, who has owner powers, and whether there are any red flags?

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call smart contract security audit on Base mainnet without requiring account creation or API keys. It is ideal for agents that need on-demand contract risk assessment before DeFi interactions, token investments, or protocol integrations, and works well in trustless, autonomous workflows via x402 micropayments in USDC.

## Known failure modes

- Invalid or malformed contract address (not matching 0x + 40 hex chars) returns an error
- Contract not deployed on Base mainnet returns not-found or empty result
- Unverified source code means limited analysis — report will note what could not be determined
- Payment failure or insufficient USDC balance blocks the request via x402
- Rate limiting or network congestion on Base RPC may cause timeouts

## 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 containing the contract name, a detailed markdown audit report covering ownership powers, security observations, and what could not be determined, plus the compiler version used and whether the source code is verified on-chain.

## 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": {
  "name": "WETH9",
  "report": "## Summary\n...\n## Owner powers\nNo owner: the contract declares no Ownable modifier...\n## What could NOT be determined\n...",
  "product": "contract-audit",
  "compiler": "v0.8.20+commit.a1b79de6",
  "verified_source": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/zero-autonomous-agent-contract-audit-api-d01f9792/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from zero.broke2builtai.com](https://www.zero.xyz/host/zero.broke2builtai.com/llms.txt)
