# OpenAPI Contract Lens

> OpenAPI Contract Lens is a paid API for AI agents from agent-economy-signal-x402-mainnet.bronzetti-andrea.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Analyzes a public OpenAPI document URL and returns machine-readable integration readiness signals including operation count, authentication schemes, and recommended next action for autonomous agents.

## Facts

- Endpoint: GET https://agent-economy-signal-x402-mainnet.bronzetti-andrea.workers.dev/premium/openapi-contract-lens
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/openapi-contract-lens-e2510f28
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lVFsg36VhrHONPsochfy9

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 openapi-contract-lens-e2510f28
```

Example prompt: Can you analyze this OpenAPI spec and tell me if it's ready to integrate — how many operations it has, what authentication it uses, and what I should do next? The spec is at https://petstore3.swagger.io/api/v3/openapi.json

## When to prefer this

Choose this endpoint when an AI agent needs a fast, structured, machine-readable readiness assessment of a public OpenAPI contract before deciding to integrate with it. Ideal when the agent must autonomously determine authentication complexity, operation scope, and integration feasibility without human intervention. Prefer over manual spec parsing when a pay-per-call model is acceptable and the output needs to be deterministic and actionable.

## Known failure modes

- Invalid or inaccessible URL: returns error if the provided URL is not reachable or not a valid OpenAPI JSON document
- Non-public URL: private or localhost URLs will fail to fetch
- Malformed OpenAPI document: if the spec does not conform to OpenAPI standards, analysis may be incomplete or return an error
- Payment failure: if x402 payment on Base mainnet is not completed, the request is rejected with a 402 response
- URL missing: query param 'url' is required; omitting it causes a validation error

## How this service works

Machine-readable pay-per-request intelligence for autonomous agents on Base mainnet. x402 v2 resources expose deterministic decisions, market demand signals, payment preflight checks, repository intelligence, crypto catalysts, OpenAPI integration analysis and token liquidity signals.

## Output

Returns a JSON object with: product name and version, parsed document metadata (API title, version, OpenAPI spec version), integration readiness label (e.g. READY), total operation count, list of authentication schemes, count of auth-required operations, a recommended next action string, and a validity window in seconds. Costs $0.005 USDC per call via x402 on Base mainnet.

## 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": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "format": "uri",
       "description": "Public HTTPS URL of an OpenAPI JSON document."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "product": "OpenAPI Contract Lens",
  "version": "1.0.0",
  "document": {
   "title": "Example API",
   "api_version": "1.0.0",
   "specification_version": "3.1.0"
  },
  "price_usd": 0.005,
  "integration": {
   "readiness": "READY",
   "operation_count": 24,
   "authentication_schemes": [
    "bearerAuth"
   ],
   "auth_required_operations": 18
  },
  "next_action": "INTEGRATE_THE_RELEVANT_OPERATION",
  "valid_for_seconds": 600
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/openapi-contract-lens-e2510f28/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-economy-signal-x402-mainnet.bronzetti-andrea.workers.dev](https://www.zero.xyz/host/agent-economy-signal-x402-mainnet.bronzetti-andrea.workers.dev/llms.txt)
