{
  "openapi": "3.1.0",
  "info": {"title":"NULTRA API","version":"1.0.0","description":"Advisory privacy inspection. One credit per POST request."},
  "servers": [{"url":"/"}],
  "components": {
    "securitySchemes": {"ApiKey":{"type":"http","scheme":"bearer","bearerFormat":"nu_live_ API key"}},
    "schemas": {
      "Content":{"type":"object","required":["content"],"properties":{"content":{"type":"string","minLength":1,"maxLength":50000},"policy":{"type":"string","enum":["default","strict"]}}},
      "Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}
    }
  },
  "security":[{"ApiKey":[]}],
  "paths": {
    "/api/v1/scan":{"post":{"summary":"Detect sensitive patterns","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}}},"responses":{"200":{"description":"Rule-based findings and summary"},"401":{"description":"Invalid key"},"402":{"description":"Insufficient credits"},"429":{"description":"Rate limited"}}}},
    "/api/v1/redact":{"post":{"summary":"Detect and redact","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}}},"responses":{"200":{"description":"Findings and sanitized_content"}}}},
    "/api/v1/firewall/evaluate":{"post":{"summary":"Advisory firewall decision","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}}},"responses":{"200":{"description":"Advisory decision and sanitized_content"}}}},
    "/api/v1/usage":{"get":{"summary":"Get credit balance and request count","responses":{"200":{"description":"Usage summary"}}}},
    "/api/v1/events":{"get":{"summary":"List privacy-safe event metadata","parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Paginated events"}}}}
  }
}
