{
  "openapi": "3.0.3",
  "info": {
    "title": "TinyOps Automation Integration Preflight - Direct Access",
    "version": "1.1.0",
    "description": "Inspect a public page for deterministic automation and integration-readiness evidence."
  },
  "servers": [
    {
      "url": "https://preflight.tinyopsstudio.com"
    }
  ],
  "paths": {
    "/direct/analyze": {
      "post": {
        "operationId": "analyzeIntegrationReadiness",
        "summary": "Analyze a public page",
        "security": [
          {
            "TinyOpsApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2048
                  }
                }
              },
              "example": {
                "url": "https://example.com"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bounded integration-preflight evidence. Quota totals are returned in X-TinyOps-Quota-Limit and X-TinyOps-Quota-Remaining headers."
          },
          "400": {
            "description": "Invalid or prohibited target URL"
          },
          "401": {
            "description": "Missing, invalid, or inactive API key"
          },
          "403": {
            "description": "Expired API key or target excluded by robots policy"
          },
          "413": {
            "description": "Request or target response exceeds a bounded size limit"
          },
          "415": {
            "description": "Target is not an HTML page"
          },
          "422": {
            "description": "Target could not be resolved or fetched safely"
          },
          "429": {
            "description": "API-key quota or service rate limit exceeded"
          }
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Check service health",
        "responses": {
          "200": {
            "description": "Service health"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "TinyOpsApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-TinyOps-API-Key",
        "description": "Use the Gumroad license key shown in the purchase receipt and download page, or a key issued directly by TinyOps Studio."
      }
    }
  }
}
