Vastu Shastra API

Deterministic Vastu Analysis
via REST Endpoints

Submit polygon coordinates. Receive zone boundaries, Brahmasthan cell geometry, 81-pada Mandala overlay, entrance direction classification and traditional rule findings — computed by a deterministic geometry and rule engine (the griha pravesh muhurta endpoint also uses Swiss Ephemeris). No LLM required. Available on all plans.

What the API computes

The Vastu engine is geometry-first and deterministic. All results derive from the polygon coordinates and bearing values you submit — not from a database lookup or an LLM. Each call returns structured JSON you can render in any frontend.

🧭
8-Zone Analysis
Plot polygon clipped into 8 directional zones (N, NE, E, SE, S, SW, W, NW) with the area and percentage of each.
🔵
Brahmasthan
Centre cell of a 9×9 grid over the plot bounding box (1/9 of its area); a room covering more than 5% of it counts as an obstruction.
🔲
Vastu Purusha Mandala
9×9 grid of 81 padas over the plot, each with pada_id (R1C1 is the south-west corner), zone, Brahmasthan flag, clipped polygon and area.
🚪
Entrance Direction
Bearing classified into 4/8/16-direction system with deity, labels (en/hi/sa) and rule findings.
🛏️
Room Placement
Zone assigned to each named room centroid; relevant rules applied.
📋
Rule Findings
23 traditional rules evaluated (10 high-confidence, 13 moderate). Rules engine accessible without polygon geometry via /vastu/findings.
🕐
Griha Pravesh Muhurta
Auspicious windows for a housewarming date and location, computed via Swiss Ephemeris. Other ceremony types: HTTP 501.
📐
Geometry Utilities
Direction, zone, and Mandala computations accessible individually for lightweight integration.

Authentication

All endpoints require an active API key. For POST endpoints, pass the key via the X-API-Key header. The ?api_key= query parameter and the api_key JSON body field are also accepted. For GET endpoints (/methodology and /versions), use the header or query parameter only.

All plans: Vastu endpoints carry no plan gate — they are available on the Free 7-day trial and every paid plan. You still need a valid API key; calls count against your quota and rate limit.
Example — header auth (POST)
curl -X POST https://vedintelastroapi.com/api/v1/vastu/direction \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"bearing_deg": 45}'
Example — query-param auth (GET)
curl "https://vedintelastroapi.com/api/v1/vastu/methodology?api_key=YOUR_API_KEY"

Coordinate system

Polygon coordinates are Cartesian {"x": number, "y": number} in any consistent unit — metres, feet, or dimensionless grid units. The engine uses ratios, so the absolute unit does not affect computed fractions or classifications.

  • Vertices must be listed in order (clockwise or counter-clockwise). Minimum 3, maximum 1,000.
  • A closing vertex (last == first) is accepted and silently stripped before processing.
  • No repeated intermediate vertices. Zero-area polygons are rejected with a 400 error.
  • north_angle (degrees, default 0): the True North bearing of your plan's +Y (plan-up) axis, measured clockwise. 0 means +Y already points True North; 90 means plan-up faces East. Every bearing you send is converted with true bearing = bearing + north_angle, and the plot is rotated into a True North frame before zones, Mandala and rules are computed. Valid range −360 to +360.
  • Because of that, an entrance bearing sent with a non-zero north_angle is read relative to your plan, not the compass. If you measured the door with a compass, send compass bearing − north_angle, or draw the plan north-up and keep north_angle at 0.
Practical note: The API treats +Y as plan-up and +X as plan-right. With north_angle 0, +Y is True North and +X is East. Otherwise the plot is rotated into a True North frame first, so coordinates in the response are in that rotated frame.

All 12 Vastu endpoints

PathMethodDescription
/api/v1/vastu/methodologyGETEngine overview, coordinate conventions, rule corpus summary (23 rules)
/api/v1/vastu/versionsGETEngine and rules version identifiers
/api/v1/vastu/directionPOSTClassify a bearing into 4/8/16-direction system with deity and labels
/api/v1/vastu/entrancePOSTEntrance direction analysis and applicable rule findings
/api/v1/vastu/zonesPOST8-zone areas and percentages clipped to the plot polygon
/api/v1/vastu/brahmasthanPOSTBrahmasthan centre, cell boundary, and room-obstruction check
/api/v1/vastu/mandalaPOST81-pada Vastu Purusha Mandala grid over the plot boundary
/api/v1/vastu/room-placementPOSTZone assignment for each named room, plus applicable rules
/api/v1/vastu/plot-analysisPOSTFull geometry pass: zones, Brahmasthan, rooms and entrance in one call
/api/v1/vastu/plan/analyzePOSTFull geometry plus zone breakdown and Mandala grid — recommended combined endpoint
/api/v1/vastu/findingsPOSTRule engine only — accepts direction/room/obstruction fields without polygon geometry
/api/v1/vastu/muhurtaPOSTAuspicious ceremony timing. griha_pravesh live. bhoomi_puja, griha_arambha, vastu_puja, griha_pravesh_renovation → HTTP 501 not yet implemented.Partial — see note

Shared request parameters

FieldTypeRequirementDescription
plotPoint[]variesArray of {x, y} polygon vertices. Required by most endpoints; optional or absent for /direction, /entrance, /findings, /muhurta.
roomsRoom[]optionalArray of {name: string, polygon: Point[]} room definitions. Required by /room-placement.
entranceobjectoptional/required{bearing_deg: number}, 0–360 clockwise from plan-up (True North when north_angle is 0) — required by /entrance, optional on /plot-analysis and /plan/analyze.
bearing_degnumberrequired/direction only: bearing in degrees clockwise from plan-up (True North when north_angle is 0); any value, normalised to 0–360.
north_anglenumberoptionalDegrees; default 0. True North bearing of your plan +Y (plan-up) axis, clockwise; true bearing = bearing + north_angle. Range −360 to +360.
langstringoptionalLanguage code; default "en". 23 languages supported (hi, ta, te, sa, …).
api_keystringoptional in bodyAPI key. Prefer X-API-Key header. Accepted in body for POST endpoints.

Quick example — plan/analyze

The /vastu/plan/analyze endpoint runs the full geometry pass in one call: zones, Brahmasthan, Mandala, room placement and entrance analysis. This is the recommended starting point.

Synthetic teaching example. This is the standard fixture used in the API's own test suite — a 20×10 rectangle with a bedroom in the NW quadrant and a NE entrance bearing. It demonstrates request structure only; it does not represent a real property or produce a validated assessment result.
Request JSON — SYNTHETIC teaching fixture
POST /api/v1/vastu/plan/analyze
X-API-Key: YOUR_API_KEY
Content-Type: application/json

{
  "plot": [
    {"x": 0,  "y": 0},
    {"x": 20, "y": 0},
    {"x": 20, "y": 10},
    {"x": 0,  "y": 10}
  ],
  "rooms": [
    {
      "name": "Master Bedroom",
      "polygon": [
        {"x": 0, "y": 5},
        {"x": 8, "y": 5},
        {"x": 8, "y": 10},
        {"x": 0, "y": 10}
      ]
    }
  ],
  "entrance": {"bearing_deg": 45},
  "north_angle": 0,
  "lang": "en"
}
Response fields — SCHEMA EXPLANATION (field names as returned by the live API; values abbreviated)
{
  "status": 200,
  "response": {
    "calculation": {
      "plot": {
        "area": <number>,             // polygon area in input units²
        "aspect_ratio": <number>,     // bounding-box width / height
        "centroid": {"x":..,"y":..},
        "bounding_box": {"minX":..,"maxX":..,"minY":..,"maxY":..,"width":..,"height":..}
      },
      "brahmasthan": {
        "polygon": [...],             // centre cell of the 9×9 grid
        "area": <number>,
        "plot_fraction": <0–1>,
        "is_obstructed": <boolean>,   // a room covers more than 5% of the cell
        "room_obstructions": [{"room_name":"..","overlap_pct":..,"is_obstruction":..}],
        "is_fully_in_plot": <boolean>,
        "centre_point": {"x":..,"y":..}
      },
      "zones": [                      // 8 directional zones
        {"direction_8":"NE","label_en":"North-East","deity":"Ishana (Shiva)",
         "area":<number>,"area_pct":<0–100>}, ...
      ],
      "mandala_summary": {"grid_size":"9x9","total_padas":81,"padas_in_plot":<number>, ...},
      "rooms": [
        {"name":"Master Bedroom","zone_8":"NW","centroid":{"x":..,"y":..},
         "bearing_from_plot_centre_deg":<number>}
      ],
      "entrance": {"direction_8":"NE","direction_4":"E","bearing_deg":45,
                   "deity":"Ishana (Shiva)","label_en":"North-East",
                   "label_hi":"Ishan","label_sa":"Ishana"}
    },
    "rule_evaluation": {
      "findings": [                   // only the rules that fired
        {"rule_id":"entrance-ne-positive","subject":"main-entrance",
         "category":"entrance","outcome":"positive","severity":"minor",
         "source_type":"consensus","source_verification_status":"consensus_only",
         "interpretive_confidence":"moderate","description":"..",
         "trigger":"Main entrance faces NE"}, ...
      ],
      "positive_count": <n>, "negative_count": <n>,
      "critical_count": <n>, "informational_count": <n>,
      "rules_version": "1.0.0"
    },
    "interpretation": null,
    "metadata": {"geometry_engine_version":"1.0.0","vastu_rules_version":"1.0.0",
                 "north_angle_applied_deg":0, ...}
  },
  "remaining_api_calls": <number>
}

Current limitations

Narrative interpretation layer: Phase 1 is geometry and rule evaluation only. The AI narrative interpretation layer is null — the API returns structured findings, not human-readable explanations of their significance.
Muhurta coverage: Only griha_pravesh is implemented. bhoomi_puja, griha_arambha, vastu_puja and griha_pravesh_renovation return HTTP 501 NOT_YET_IMPLEMENTED.
Mandala deity assignments: The 81-pada grid returns geometric data (pada_id, row, col, zone, Brahmasthan flag, clipped polygon, area). Full deity and planet assignments for all 81 padas are not yet included.
Astronomical Vastu overlay: astro_vastu_rules_version: "0.0.0" — natal-chart based Vastu analysis (linking birth planets to spatial zones) is a planned Phase 2 feature, not currently available.
Physical inspection: The API computes from coordinate data you provide. It does not perform site inspection, soil assessment, neighbourhood evaluation, elevation measurement, or compliance with local building codes. Practitioner judgement is always required.

Consultation guides

The following guides walk through how practitioners can use the Vastu API endpoints in a real consultation workflow: