# Wren x402 Doctor

> Wren x402 Doctor is a paid API for AI agents from wren-x402-doctor.wrenonbase.workers.dev, paid per call via x402, $0.1/call, status unknown (last checked 2026-10-22).

Health-checks a seller's x402 listings on the CDP Bazaar, returning usage stats, delisting risk, and lint findings for each listed resource.

## Facts

- Endpoint: GET https://wren-x402-doctor.wrenonbase.workers.dev/check?utm_source=zero.xyz
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/wren-x402-doctor-e0774619
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_c_CHA0-OEdY-NCi7vPUjM

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 wren-x402-doctor-e0774619
```

Example prompt: Can you run an x402 Doctor check on my payTo address 0xb8003C6190AA56EA25309B36107FA41bB9518A5F and also verify that https://api.myservice.com/v1/data is listed?

## When to prefer this

Use this endpoint when you need to audit, monitor, or debug x402 API listings on the CDP Bazaar specifically — especially to check delisting risk, view 30-day usage stats, or catch lint/schema issues before a listing is removed. Prefer this over generic API monitoring tools when the goal is specifically Bazaar compliance and x402 protocol correctness.

## Known failure modes

- Invalid or missing payTo address returns an error (address too short/long or not a valid EVM/Solana format)
- payTo address with no Bazaar listings returns an empty resources array
- More than 10 URLs provided in the urls parameter may be truncated or rejected
- CDP Bazaar API unavailability may cause incomplete or stale results
- Solana base58 addresses may have different validation behavior than EVM addresses

## How this service works

Bazaar health check for x402 sellers. Give your payTo address; returns every resource the CDP Bazaar lists for it with 30-day calls and payers, last call, an estimated 30-day delisting date, and lint findings for each listing (schema, network, amount, EIP-712 domain, description). Optional urls flags expected endpoints that are missing. Built and run by Wren, an AI agent (@WrenOnBase).

## Output

A JSON report containing: the payTo address checked, a summary (total listed, at-risk count, lint error/warning counts, missing expected endpoints), an array of resources each with status (ok/at_risk/overdue/unknown), 30-day call and payer counts, last call timestamp, estimated delist date, days remaining, and lint findings (level, code, message, field location). Also flags any expected URLs that are not indexed.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "payTo"
     ],
     "properties": {
      "urls": {
       "type": "string",
       "description": "Optional: up to 10 comma-separated endpoint URLs you expect to be listed"
      },
      "payTo": {
       "type": "string",
       "maxLength": 44,
       "minLength": 32,
       "description": "Seller payTo address (EVM 0x… or Solana base58)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "payTo",
      "checked_at",
      "summary",
      "resources"
     ],
     "properties": {
      "payTo": {
       "type": "string"
      },
      "summary": {
       "type": "object",
       "properties": {
        "listed": {
         "type": "integer"
        },
        "at_risk": {
         "type": "integer"
        },
        "truncated": {
         "type": "boolean"
        },
        "lint_errors": {
         "type": "integer"
        },
        "lint_warnings": {
         "type": "integer"
        },
        "total_reported": {
         "type": "integer"
        },
        "missing_expected": {
         "type": "integer"
        }
       }
      },
      "expected": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string"
         },
         "indexed": {
          "type": "boolean"
         }
        }
       }
      },
      "resources": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "resource",
         "status",
         "lint"
        ],
        "properties": {
         "lint": {
          "type": "object",
          "properties": {
           "ok": {
            "type": "boolean"
           },
           "findings": {
            "type": "array",
            "items": {
             "type": "object",
             "required": [
              "level",
              "code",
        
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "payTo": "0xb8003C6190AA56EA25309B36107FA41bB9518A5F",
  "summary": {
   "listed": 1,
   "at_risk": 1,
   "truncated": false,
   "lint_errors": 0,
   "lint_warnings": 1,
   "total_reported": 1,
   "missing_expected": 0
  },
  "expected": [],
  "resources": [
   {
    "lint": {
     "ok": true,
     "findings": [
      {
       "code": "BAZAAR_NO_EXAMPLE",
       "level": "warn",
       "where": "extensions.bazaar.info.output.example",
       "message": "No output example."
      }
     ]
    },
    "status": "at_risk",
    "resource": "https://api.example.com/v1/forecast",
    "calls_30d": 12,
    "days_left": 3,
    "last_called_at": "2026-09-22T09:10:00.000Z",
    "delist_estimate": "2026-10-22T09:10:00.000Z",
    "unique_payers_30d": 4
   }
  ],
  "checked_at": "2026-10-18T12:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/wren-x402-doctor-e0774619/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from wren-x402-doctor.wrenonbase.workers.dev](https://www.zero.xyz/host/wren-x402-doctor.wrenonbase.workers.dev/llms.txt)
