{
  "openapi": "3.1.0",
  "info": {
    "title": "ABTIDE Wellness Agent API",
    "version": "1.0.0",
    "description": "Public, agent-callable endpoints for ABTIDE Wellness (https://abtidewellness.com). Education and citation helpers only — not medical advice.",
    "contact": {
      "name": "ABTIDE Wellness",
      "url": "https://abtidewellness.com",
      "email": "support@abtidewellness.com"
    }
  },
  "servers": [
    {
      "url": "https://abtidewellness.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/v1": {
      "get": {
        "operationId": "listApiIndex",
        "summary": "API index",
        "responses": {
          "200": {
            "description": "Endpoint catalog"
          }
        }
      }
    },
    "/api/v1/protein-target": {
      "get": {
        "operationId": "getProteinTarget",
        "summary": "Protein target calculator v2",
        "description": "Returns weight-based and lean-mass-based daily protein targets with editorial boundaries. Structure/function education only.",
        "parameters": [
          {
            "name": "weight_kg",
            "in": "query",
            "required": true,
            "schema": { "type": "number", "minimum": 30, "maximum": 250 }
          },
          {
            "name": "body_fat_pct",
            "in": "query",
            "required": false,
            "schema": { "type": "number", "minimum": 5, "maximum": 60 }
          },
          {
            "name": "age",
            "in": "query",
            "required": false,
            "schema": { "type": "integer", "minimum": 12, "maximum": 120 }
          }
        ],
        "responses": {
          "200": { "description": "Protein target payload" },
          "400": { "description": "Invalid input" }
        }
      },
      "post": {
        "operationId": "postProteinTarget",
        "summary": "Protein target calculator v2 (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["weight_kg"],
                "properties": {
                  "weight_kg": { "type": "number" },
                  "body_fat_pct": { "type": "number" },
                  "age": { "type": "integer" }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Protein target payload" }
        }
      }
    },
    "/api/v1/brand": {
      "get": {
        "operationId": "getBrandFacts",
        "summary": "Canonical brand facts for citation",
        "responses": {
          "200": { "description": "Brand entity + agent entrypoints" }
        }
      }
    },
    "/api/v1/topics": {
      "get": {
        "operationId": "listCiteTopics",
        "summary": "Curated citeable pages",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": { "description": "Topic list" }
        }
      }
    },
    "/api/mcp": {
      "get": {
        "operationId": "mcpInfo",
        "summary": "MCP endpoint info",
        "responses": {
          "200": { "description": "How to call MCP JSON-RPC" }
        }
      },
      "post": {
        "operationId": "mcpJsonRpc",
        "summary": "MCP JSON-RPC (initialize, tools/list, tools/call, ping)",
        "responses": {
          "200": { "description": "JSON-RPC response" }
        }
      }
    }
  },
  "externalDocs": {
    "description": "llms.txt + full-text corpus",
    "url": "https://abtidewellness.com/llms.txt"
  }
}
