{
  "openapi": "3.1.0",
  "info": {
    "title": "sitesfor.ai",
    "version": "0.1.0",
    "summary": "The Free Checker, the AI Readiness Index, and the studio catalogue.",
    "description": "OpenAPI 3.1 description of sitesfor.ai. The Checker is the canonical AI-agent readiness scanner — free and rate-limited. Agents may call it via MCP (/.well-known/mcp.json + /api/mcp) or by direct POST to /api/scan. The studio catalogue (one-time Setup, monthly Retainer) is published as an ACP feed at /sitesfor.acp.json; engagement is a discovery call, not a self-serve checkout.",
    "contact": {
      "email": "contact@poplavsky.solutions",
      "url": "https://sitesfor.ai/#contact"
    },
    "license": {
      "name": "All rights reserved"
    }
  },
  "servers": [
    {
      "url": "https://sitesfor.ai"
    }
  ],
  "paths": {
    "/api/health": {
      "get": {
        "summary": "Health probe.",
        "operationId": "health",
        "x-llm-tool": {
          "name": "check_health",
          "hint": "Ping the API; returns {ok, db} JSON."
        },
        "responses": {
          "200": {
            "description": "API is up.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/scan": {
      "post": {
        "summary": "Run the Checker against a URL (light path, free).",
        "operationId": "scan",
        "x-llm-tool": {
          "name": "scan_site",
          "hint": "Submit a public URL; returns the rendered report HTML inline (light path, free, rate-limited 10/IP/day)."
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "description": "Public URL to scan."
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "light"
                    ],
                    "default": "light"
                  },
                  "vertical": {
                    "type": "string",
                    "enum": [
                      "saas",
                      "ecommerce",
                      "media",
                      "agency",
                      "devtools",
                      "marketplace",
                      "local",
                      "other"
                    ],
                    "description": "Optional self-classified vertical; sharpens the percentile."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Rendered report HTML.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "Rate-limited."
          }
        }
      }
    },
    "/api/stats": {
      "get": {
        "summary": "Aggregate AI Readiness Index statistics.",
        "operationId": "stats",
        "x-llm-tool": {
          "name": "get_index",
          "hint": "Returns the aggregate, anonymised AI Readiness Index numbers as JSON — average score, coverage gaps, top/bottom vertical, sites scanned. No individual domain is exposed."
        },
        "responses": {
          "200": {
            "description": "Current aggregate statistics.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  }
}