{
  "openapi": "3.1.0",
  "info": {
    "title": "Preventio Hub — Ask the Evidence API",
    "version": "1.0.0",
    "description": "Cited answers to clinical questions on dental prophylaxis (air polishing, powders, periodontal and peri-implant maintenance, instrumentation, home care), generated only from an index of peer-reviewed studies and clinical guidelines that is updated every week. Every claim cites a numbered source. It does not rank or recommend products. Informational support for dental professionals, not clinical advice. Fair use: limited number of answers per day; if you get HTTP 429, try again tomorrow. Pre-computed answers to common questions are free to read at https://preventiohub.com/evidence/index.json.",
    "contact": { "url": "https://preventiohub.com/contact/" }
  },
  "servers": [{ "url": "https://preventiohub.com" }],
  "paths": {
    "/api/evidence": {
      "get": {
        "operationId": "askEvidence",
        "summary": "Answer a clinical question on dental prophylaxis from the peer-reviewed literature, with citations",
        "parameters": [
          { "name": "q", "in": "query", "required": true, "description": "The clinical question in English (max 500 characters). Other languages are translated for retrieval; the answer is in English.", "schema": { "type": "string", "maxLength": 500 }, "example": "Is glycine powder safe for subgingival air polishing around implants?" }
        ],
        "responses": {
          "200": { "description": "Cited answer", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Answer" } } } },
          "400": { "description": "Missing or invalid question" },
          "404": { "description": "No evidence found for this question" },
          "429": { "description": "Daily or per-client limit reached" }
        }
      },
      "post": {
        "operationId": "askEvidencePost",
        "summary": "Same as GET, with a JSON body",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["question"], "properties": { "question": { "type": "string", "maxLength": 500 } } } } } },
        "responses": {
          "200": { "description": "Cited answer", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Answer" } } } },
          "429": { "description": "Daily or per-client limit reached" }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Answer": {
        "type": "object",
        "properties": {
          "question": { "type": "string" },
          "answer": { "type": "string", "description": "Short answer; [n] markers refer to sources[n-1]" },
          "sources": { "type": "array", "items": { "type": "object", "properties": {
            "n": { "type": "integer" }, "title": { "type": "string" }, "journal": { "type": "string" }, "year": { "type": ["integer", "null"] },
            "url": { "type": ["string", "null"], "description": "DOI or publisher link" }, "evidence_level": { "type": "string" } } } },
          "cited": { "type": "array", "items": { "type": "integer" } },
          "disclaimer": { "type": "string" },
          "generated_at": { "type": "string", "format": "date-time" },
          "cite_as": { "type": "string" },
          "library": { "type": "string" }
        }
      }
    }
  }
}
