{
  "openapi": "3.1.0",
  "info": {
    "title": "RX7 Agent Market",
    "version": "1.2.0",
    "description": "Machine-payable web intelligence APIs for autonomous agents using x402.",
    "contact": {
      "name": "RX7 Agent Market",
      "url": "https://rx7-x402.vercel.app/"
    }
  },
  "servers": [
    {"url": "https://rx7-x402.vercel.app"}
  ],
  "tags": [
    {"name": "web-intelligence", "description": "Machine-readable website and HTTP analysis"}
  ],
  "paths": {
    "/api/http-check": {
      "get": {
        "tags": ["web-intelligence"],
        "summary": "HTTP Inspector",
        "description": "Fast public URL health check returning HTTP status, redirect chain, latency and selected response headers.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Public HTTP or HTTPS URL to inspect",
            "schema": {"type": "string", "format": "uri"},
            "example": "https://example.com"
          }
        ],
        "x-payment-info": {
          "protocols": ["x402"],
          "price": {"mode": "fixed", "currency": "USD", "amount": "0.02"},
          "networks": ["eip155:8453", "eip155:84532"]
        },
        "responses": {
          "200": {"description": "Paid HTTP inspection result"},
          "400": {"description": "Invalid or private target URL"},
          "402": {"description": "x402 payment required"},
          "502": {"description": "Target request failed"}
        }
      }
    },
    "/api/site-intelligence": {
      "get": {
        "tags": ["web-intelligence"],
        "summary": "Website Intelligence",
        "description": "Premium website intelligence report covering HTTP, DNS, security headers, SEO metadata, technology detection, robots.txt, sitemap.xml, a technical score and recommendations.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Public website URL to analyze",
            "schema": {"type": "string", "format": "uri"},
            "example": "https://example.com"
          }
        ],
        "x-payment-info": {
          "protocols": ["x402"],
          "price": {"mode": "fixed", "currency": "USD", "amount": "0.99"},
          "networks": ["eip155:8453", "eip155:84532"]
        },
        "responses": {
          "200": {"description": "Paid website intelligence report"},
          "400": {"description": "Invalid or private target URL"},
          "402": {"description": "x402 payment required"},
          "502": {"description": "Website analysis failed"}
        }
      }
    }
  },
  "x-discovery": {
    "instructions": "Use x402 payment requirements returned by the live endpoint. Runtime 402 requirements are authoritative for network-specific pricing."
  }
}
