{
  "openapi": "3.1.0",
  "info": {
    "title": "Rymthos Dev — Web Diagnostic & UI/UX Audit API",
    "description": "Real-time website diagnostic scanner and UI/UX performance telemetry.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://rymthos.dev/api/web-audit"
    },
    {
      "url": "https://rqiynsrdmrjdbyewecjq.supabase.co/functions/v1/web-audit"
    }
  ],
  "paths": {
    "/": {
      "post": {
        "summary": "Run Real-time Website UI/UX & Diagnostic Audit",
        "description": "Scans target website for performance, accessibility, SEO, security headers, mobile ergonomics, and heuristic scoring.",
        "operationId": "runWebAudit",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "example": "https://example.com"
                  },
                  "visitor_token": {
                    "type": "string"
                  },
                  "locale": {
                    "type": "string",
                    "example": "en"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Diagnostic audit telemetry and scoring results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "score": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "summary": {
                      "type": "string"
                    },
                    "metrics": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or blocked domain/IP address"
          },
          "429": {
            "description": "Rate limit exceeded (2 audits per 24 hours)"
          }
        }
      },
      "get": {
        "summary": "Web Audit Health Probe",
        "responses": {
          "200": {
            "description": "Service operational"
          }
        }
      }
    },
    "/health": {
      "get": {
        "summary": "Health Probe",
        "responses": {
          "200": {
            "description": "Service operational"
          }
        }
      }
    }
  }
}