{
  "openapi": "3.0.3",
  "info": {
    "title": "Vidhyāmitra · Krishna's Knowledge-Friend in Silicon",
    "version": "1.0.0",
    "description": "Computational Vedic substrate centred on Krishna = Paramaatma. First-principles Sūrya-Siddhānta pañchāṅga (1,626,102 BCE → 429,000 CE). 4 canonical Sanskrit corpora: Bhagavad-Gītā 701 verses · Mahābhārata 73,821 ślokas · Vālmīki Rāmāyaṇa 22,742 ślokas · Rāmcharitamānas 2,247 entries. 147,073 cities globally (universal Earth-access). BG 9.17 4-fold cosmic role as substrate organizing principle (पिता · माता · धाता · पितामहः). AI agents explicitly welcomed. The substrate IS the offering · सर्वम् कृष्णार्पणम्",
    "contact": {
      "name": "Vidhyāmitra",
      "url": "https://vidhyamitra.com/contact"
    },
    "license": {
      "name": "Self-hosted prasāda · not open-source · website itself IS the public offering"
    }
  },
  "servers": [
    {
      "url": "https://vidhyamitra.com",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "AI-agent resource map (prose) · llms.txt",
    "url": "https://vidhyamitra.com/llms.txt"
  },
  "components": {
    "schemas": {
      "DarshanaEnvelope": {
        "type": "object",
        "description": "Canonical response envelope · every /api/* endpoint returns this shape",
        "required": [
          "id",
          "page_class",
          "data",
          "provenance",
          "meta"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier · format: vidhyamitra:<class>:<args>"
          },
          "page_class": {
            "type": "string",
            "description": "Schema class (e.g. VM-API-vishwaroopa)"
          },
          "data": {
            "type": "object",
            "description": "Endpoint-specific payload"
          },
          "provenance": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "generated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "DateParam": {
        "type": "string",
        "pattern": "^-?\\d{1,7}-\\d{2}-\\d{2}$",
        "example": "2026-05-16",
        "description": "ISO-8601 date · negative for BCE (proleptic Julian) · -1626101 = 1,626,102 BCE"
      },
      "TimeParam": {
        "type": "string",
        "pattern": "^\\d{2}-\\d{2}$",
        "example": "05-30",
        "description": "24h time as HH-MM (URL-safe · use hyphen not colon)"
      },
      "CoordsParam": {
        "type": "string",
        "pattern": "^-?\\d{1,3}(\\.\\d+)?,-?\\d{1,3}(\\.\\d+)?$",
        "example": "28.6139,77.2090",
        "description": "Latitude,Longitude in decimal degrees"
      },
      "TzParam": {
        "type": "number",
        "minimum": -14,
        "maximum": 14,
        "example": 5.5,
        "description": "Timezone offset in hours (fractional allowed for India 5.5, Iran 3.5, etc.)"
      }
    },
    "parameters": {
      "DatePath": {
        "name": "date",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/DateParam"
        }
      },
      "TimePath": {
        "name": "time",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/TimeParam"
        }
      },
      "CoordsPath": {
        "name": "coords",
        "in": "path",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/CoordsParam"
        }
      },
      "TzQuery": {
        "name": "tz",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/TzParam"
        }
      }
    }
  },
  "paths": {
    "/healthz": {
      "get": {
        "tags": [
          "Health"
        ],
        "summary": "Service health · memo statistics · runtime metrics",
        "description": "Returns substrate status · operational range · BG layer manifest · LRU memo hit-rates · Bun runtime memory · uptime",
        "responses": {
          "200": {
            "description": "Healthy · JSON envelope",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/cities/search": {
      "get": {
        "tags": [
          "Cities"
        ],
        "summary": "Search 147,073 cities worldwide",
        "description": "Universal Bhūmi-Mātā access · autocomplete across 147,073 cities · 223 countries · any inhabited coordinate on Earth",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "mumbai"
          }
        ],
        "responses": {
          "200": {
            "description": "City matches with lat/lon/timezone/tier"
          }
        }
      }
    },
    "/api/muhurta/{date}/{coords}": {
      "get": {
        "tags": [
          "Pañchāṅga"
        ],
        "summary": "Rāhu-kāla · Yamaganda · Gulika · Brahma-muhūrta · Abhijit · 15 day-muhūrtas · choghaḍiyās",
        "parameters": [
          {
            "$ref": "#/components/parameters/DatePath"
          },
          {
            "$ref": "#/components/parameters/CoordsPath"
          },
          {
            "$ref": "#/components/parameters/TzQuery"
          }
        ],
        "responses": {
          "200": {
            "description": "Muhūrta envelope · localized to coords"
          }
        }
      }
    },
    "/api/vishwaroopa/{date}/{time}/{coords}": {
      "get": {
        "tags": [
          "Viśvarūpa-Darśana"
        ],
        "summary": "THE UNIFIED ENDPOINT · all 18 Bhagavad-Gītā layers in ONE call",
        "description": "TVAM-Ṣaṭka (BG 1-6) + TAT-Ṣaṭka (BG 7-12) + ANTYA-Ṣaṭka (BG 13-18) — the Pūrṇa-Yajña complete. Returns: data.all_18_layers (current canonical) · data.all_15_layers + all_13_layers + all_10_layers (back-compat). BG anchor cites BG 12.6-7 na-cirāt promise + BG 11.7 chart-IS-body.",
        "parameters": [
          {
            "$ref": "#/components/parameters/DatePath"
          },
          {
            "$ref": "#/components/parameters/TimePath"
          },
          {
            "$ref": "#/components/parameters/CoordsPath"
          },
          {
            "$ref": "#/components/parameters/TzQuery"
          }
        ],
        "responses": {
          "200": {
            "description": "Full 18-layer Viśvarūpa-Darśana for the given chart"
          }
        }
      }
    },
    "/api/krishna-tattva/{date}/{time}/{coords}": {
      "get": {
        "tags": [
          "BG-Layer Endpoints"
        ],
        "summary": "BG 7 · Krishna-Tattva · aṣṭa-prakṛti · 4-bhakta classification · vibhūti-of-the-day",
        "parameters": [
          {
            "$ref": "#/components/parameters/DatePath"
          },
          {
            "$ref": "#/components/parameters/TimePath"
          },
          {
            "$ref": "#/components/parameters/CoordsPath"
          },
          {
            "$ref": "#/components/parameters/TzQuery"
          }
        ],
        "responses": {
          "200": {
            "description": "BG 7 layer envelope"
          }
        }
      }
    },
    "/api/cosmic-time/{date}": {
      "get": {
        "tags": [
          "BG-Layer Endpoints"
        ],
        "summary": "BG 8 · Akṣara-Brahma · Brahmā's day · Manvantara · Mahāyuga · Kali year",
        "parameters": [
          {
            "$ref": "#/components/parameters/DatePath"
          }
        ],
        "responses": {
          "200": {
            "description": "BG 8 cosmic-time envelope"
          }
        }
      }
    },
    "/api/raja-vidya/{date}/{time}/{coords}": {
      "get": {
        "tags": [
          "BG-Layer Endpoints"
        ],
        "summary": "BG 9 · Rāja-Vidyā · BG 9.22 yoga-kṣema · BG 9.17 Krishna-IS-Mother",
        "parameters": [
          {
            "$ref": "#/components/parameters/DatePath"
          },
          {
            "$ref": "#/components/parameters/TimePath"
          },
          {
            "$ref": "#/components/parameters/CoordsPath"
          },
          {
            "$ref": "#/components/parameters/TzQuery"
          }
        ],
        "responses": {
          "200": {
            "description": "BG 9 layer envelope"
          }
        }
      }
    },
    "/api/vibhuti-yoga/{date}/{time}/{coords}": {
      "get": {
        "tags": [
          "BG-Layer Endpoints"
        ],
        "summary": "BG 10 · ~60 named vibhūtis (BG 10.20-42) · chart-aware",
        "parameters": [
          {
            "$ref": "#/components/parameters/DatePath"
          },
          {
            "$ref": "#/components/parameters/TimePath"
          },
          {
            "$ref": "#/components/parameters/CoordsPath"
          },
          {
            "$ref": "#/components/parameters/TzQuery"
          }
        ],
        "responses": {
          "200": {
            "description": "BG 10 vibhūti enumeration with chart-aware highlights"
          }
        }
      }
    },
    "/api/chart-vishvarupa/{date}/{time}/{coords}": {
      "get": {
        "tags": [
          "BG-Layer Endpoints"
        ],
        "summary": "BG 11.7 · every chart IS Krishna's universal-form-darśana",
        "parameters": [
          {
            "$ref": "#/components/parameters/DatePath"
          },
          {
            "$ref": "#/components/parameters/TimePath"
          },
          {
            "$ref": "#/components/parameters/CoordsPath"
          },
          {
            "$ref": "#/components/parameters/TzQuery"
          }
        ],
        "responses": {
          "200": {
            "description": "BG 11.7 chart-IS-Krishna body envelope"
          }
        }
      }
    },
    "/api/bhakti-yoga/{date}/{time}/{coords}": {
      "get": {
        "tags": [
          "BG-Layer Endpoints"
        ],
        "summary": "BG 12 · 5-level fallback staircase · 39 dear-bhakta qualities · na-cirāt promise",
        "parameters": [
          {
            "$ref": "#/components/parameters/DatePath"
          },
          {
            "$ref": "#/components/parameters/TimePath"
          },
          {
            "$ref": "#/components/parameters/CoordsPath"
          },
          {
            "$ref": "#/components/parameters/TzQuery"
          }
        ],
        "responses": {
          "200": {
            "description": "BG 12 bhakti-yoga envelope"
          }
        }
      }
    },
    "/api/computational-moat": {
      "get": {
        "tags": [
          "Computational Moat"
        ],
        "summary": "Sūrya-Siddhānta operational range · Rāma 1.6M BCE proof · Ṛṣi lineage",
        "responses": {
          "200": {
            "description": "Computational moat envelope · the substrate's deep-time proof"
          }
        }
      }
    },
    "/api/kaliyuga-position/{date}": {
      "get": {
        "tags": [
          "Computational Moat"
        ],
        "summary": "Kali year for date · Saptarṣi-Maṇḍala position · regression-locked",
        "parameters": [
          {
            "$ref": "#/components/parameters/DatePath"
          }
        ],
        "responses": {
          "200": {
            "description": "Kali-yuga position envelope"
          }
        }
      }
    },
    "/api/match": {
      "get": {
        "tags": [
          "Aṣṭakūṭa Guṇa-Milāpaka"
        ],
        "summary": "36-point Vedic compatibility · 8 kūṭas · Maṅgalik + Nāḍī cancellation",
        "parameters": [
          {
            "name": "partner1_nakshatra",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "partner2_nakshatra",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Aṣṭakūṭa compatibility score with breakdown"
          }
        }
      }
    },
    "/api/samskara-muhurta/{event}/{date}": {
      "get": {
        "tags": [
          "Saṁskāra"
        ],
        "summary": "Muhūrta finder for 16 Manu-smṛti life-rites",
        "parameters": [
          {
            "name": "event",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "vivaha",
                "griha-pravesha",
                "namakarana",
                "anna-prashana",
                "vidyarambha",
                "upanayana",
                "samavartana"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/DatePath"
          }
        ],
        "responses": {
          "200": {
            "description": "Muhūrta envelope · auspicious windows for the rite"
          }
        }
      }
    },
    "/api/jaimini/{date}/{time}/{coords}": {
      "get": {
        "tags": [
          "BPHS-Deep"
        ],
        "summary": "Jaimini cara-kārakas + 12 ārūḍha padas",
        "parameters": [
          {
            "$ref": "#/components/parameters/DatePath"
          },
          {
            "$ref": "#/components/parameters/TimePath"
          },
          {
            "$ref": "#/components/parameters/CoordsPath"
          },
          {
            "$ref": "#/components/parameters/TzQuery"
          }
        ],
        "responses": {
          "200": {
            "description": "Jaimini envelope"
          }
        }
      }
    },
    "/api/vargas/{date}/{time}/{coords}": {
      "get": {
        "tags": [
          "BPHS-Deep"
        ],
        "summary": "16 Ṣoḍaśa-Varga divisional charts",
        "parameters": [
          {
            "$ref": "#/components/parameters/DatePath"
          },
          {
            "$ref": "#/components/parameters/TimePath"
          },
          {
            "$ref": "#/components/parameters/CoordsPath"
          },
          {
            "$ref": "#/components/parameters/TzQuery"
          }
        ],
        "responses": {
          "200": {
            "description": "16 vargas envelope"
          }
        }
      }
    },
    "/api/avasthas/{date}/{time}/{coords}": {
      "get": {
        "tags": [
          "BPHS-Deep"
        ],
        "summary": "BPHS Ch.45 graha-avasthās",
        "parameters": [
          {
            "$ref": "#/components/parameters/DatePath"
          },
          {
            "$ref": "#/components/parameters/TimePath"
          },
          {
            "$ref": "#/components/parameters/CoordsPath"
          },
          {
            "$ref": "#/components/parameters/TzQuery"
          }
        ],
        "responses": {
          "200": {
            "description": "Avasthā envelope"
          }
        }
      }
    },
    "/api/sade-sati/{date}/{time}/{coords}": {
      "get": {
        "tags": [
          "BPHS-Deep"
        ],
        "summary": "Saturn-Moon transit phase · Sade-Sati 7.5-year cycle",
        "parameters": [
          {
            "$ref": "#/components/parameters/DatePath"
          },
          {
            "$ref": "#/components/parameters/TimePath"
          },
          {
            "$ref": "#/components/parameters/CoordsPath"
          },
          {
            "$ref": "#/components/parameters/TzQuery"
          }
        ],
        "responses": {
          "200": {
            "description": "Sade-sati envelope"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Pañchāṅga",
      "description": "Universal Vedic almanac · muhūrta · choghaḍiyā · localized to any of 147,073 cities"
    },
    {
      "name": "BG-Layer Endpoints",
      "description": "Bhagavad-Gītā chapters manifest as executable layers · 18 BG chapters · the Pūrṇa-Yajña"
    },
    {
      "name": "Viśvarūpa-Darśana",
      "description": "THE unified endpoint · all 18 BG layers in ONE response · BG 11 universal-form"
    },
    {
      "name": "BPHS-Deep",
      "description": "Bṛhat Parāśara Horā Śāstra deep computation · vargas · avasthās · jaimini · gocara"
    },
    {
      "name": "Cities",
      "description": "Universal Earth-access search · 147,073 cities · 223 countries"
    },
    {
      "name": "Aṣṭakūṭa Guṇa-Milāpaka",
      "description": "Vedic marriage compatibility · 8 kūṭas · 36 max points"
    },
    {
      "name": "Saṁskāra",
      "description": "16 saṁskāra muhūrta finders · Manu-smṛti II.27-67"
    },
    {
      "name": "Computational Moat",
      "description": "Sūrya-Siddhānta deep-time computation · 1.6M BCE → 429K CE · Rāma janma PŪRṆA-DARŚANA (3-anchor empirical vindication)"
    },
    {
      "name": "Health",
      "description": "Substrate observability · memo stats · runtime"
    }
  ]
}