{
  "openapi": "3.1.0",
  "info": {
    "title": "AiHoo! Public API",
    "version": "1.0.0",
    "description": "Public endpoints exposed by the AiHoo! GEO Performance Platform for AI agents and machine consumers.",
    "contact": { "name": "AiHoo!", "email": "contato@aihoo.app", "url": "https://aihoo.app/contato" },
    "license": { "name": "Proprietary", "url": "https://aihoo.app/termos" }
  },
  "servers": [
    { "url": "https://egkekjdzyiytrwjvhadi.supabase.co/functions/v1", "description": "Edge Functions" },
    { "url": "https://aihoo.app", "description": "Web origin" }
  ],
  "paths": {
    "/serve-llms": {
      "get": {
        "summary": "Get llms.txt content (summary or full)",
        "parameters": [{ "name": "format", "in": "query", "schema": { "type": "string", "enum": ["summary", "full"] } }],
        "responses": { "200": { "description": "OK", "content": { "text/plain": {} } } }
      }
    },
    "/widget": {
      "get": {
        "summary": "Embeddable AiHoo widget script",
        "responses": { "200": { "description": "JS bundle", "content": { "application/javascript": {} } } }
      }
    },
    "/geo-audit": {
      "post": {
        "summary": "Run a GEO audit on a URL",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["url"],
                "properties": {
                  "url": { "type": "string", "format": "uri" },
                  "lang": { "type": "string", "enum": ["pt", "en", "es"] }
                }
              }
            }
          }
        },
        "responses": { "200": { "description": "Audit result" } }
      }
    },
    "/x402-pay": {
      "get": {
        "summary": "x402 protected resource (returns 402 with payment requirements)",
        "responses": { "402": { "description": "Payment Required" }, "200": { "description": "Paid content" } }
      }
    }
  }
}
