TutorialNovember 20268 min read

Vastu Shastra API: How to Automate Vastu Analysis from a Floor Plan

A hand-done Vastu assessment is mostly geometry: draw the plan, find the centre, split it into directions, see which room falls where, then compare against the rules. The geometry part is deterministic, so a program can do it the same way every time. The VedIntel™ Vastu API does that geometry and applies a documented rule set. The judgement, the conversation with the client and the remedies stay with the practitioner.

What you send

Every geometry endpoint takes the same building blocks. Coordinates are plain Cartesian points in any consistent unit (metres, feet or grid units). +X is East and +Y is North once north_angle has been applied.

One call: plan/analyze

POST /api/v1/vastu/plan/analyze is the combined endpoint: plot geometry, the 8 zones, a Mandala summary, the Brahmasthan, room zones, the entrance and rule evaluation in one response. The example below is the synthetic 20 × 10 fixture used in the API's own tests, with a kitchen in one corner and a north-east entrance. It is a teaching example, not a real property.

Request
curl -X POST https://vedintelastroapi.com/api/v1/vastu/plan/analyze \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "plot": [{"x":0,"y":0},{"x":20,"y":0},{"x":20,"y":10},{"x":0,"y":10}],
    "rooms": [{"name":"Kitchen","polygon":[{"x":15,"y":0},{"x":20,"y":0},{"x":20,"y":3},{"x":15,"y":3}]}],
    "entrance": {"bearing_deg": 45},
    "north_angle": 0,
    "lang": "en"
  }'
Response (live output, trimmed with …)
{
  "status": 200,
  "response": {
    "calculation": {
      "plot": { "area": 200, "aspect_ratio": 2, "centroid": {"x": 10, "y": 5},
                "bounding_box": {"minX": 0, "maxX": 20, "minY": 0, "maxY": 10, "width": 20, "height": 10} },
      "brahmasthan": { "area": 22.22, "plot_fraction": 0.1111, "is_obstructed": false,
                       "is_fully_in_plot": true, "plot_regularity": "regular", ... },
      "zones": [ { "direction_8": "N", "label_en": "North", "deity": "Kubera", "area": 10.36, "area_pct": 5.18 }, ... ],
      "mandala_summary": { "grid_size": "9x9", "total_padas": 81, "padas_in_plot": 81, ... },
      "rooms": [ { "name": "Kitchen", "zone_8": "SE", "centroid": {"x": 17.5, "y": 1.5},
                   "bearing_from_plot_centre_deg": 115.02 } ],
      "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": [
        { "rule_id": "kitchen-se-positive", "outcome": "positive", "severity": "major",
          "source_type": "classical", "source_text": "Manasara",
          "source_verification_status": "tradition_dependent", "interpretive_confidence": "high",
          "trigger": "Kitchen is in the SE zone", ... },
        { "rule_id": "brahmasthan-clear-positive", ... },
        { "rule_id": "entrance-ne-positive", ... },
        { "rule_id": "plot-aspect-ratio-positive", ... }
      ],
      "positive_count": 4, "negative_count": 0, "critical_count": 0, "informational_count": 0,
      "rules_version": "1.0.0"
    },
    "interpretation": null,
    "metadata": { "geometry_engine_version": "1.0.0", "vastu_rules_version": "1.0.0",
                  "coordinate_system": "cartesian_true_north", "north_angle_applied_deg": 0, ... }
  },
  "remaining_api_calls": ...,
  "confidence": { "level": "HIGH", "warnings": [] }
}

Reading the response

calculation is pure geometry. The kitchen's centroid sits at (17.5, 1.5), 115° from the plot centre, so it lands in the SE zone. The entrance bearing of 45° classifies as NE in the 8-direction system, and E in the coarse 4-direction system. The Brahmasthan is the central cell of the 9 × 9 grid, one ninth of the bounding box, and nothing overlaps it.

rule_evaluation lists only the rules that fired, not the whole rule set. Each finding tells you where the rule comes from and how much weight to give it:

FieldWhat it means
outcomepositive, negative or informational for this layout.
severityHow much the tradition weighs it, e.g. major or minor.
source_type / source_textclassical (with a named text such as Manasara) or consensus (modern practice, no single text).
source_verification_statuse.g. tradition_dependent or consensus_only, so you can show how firm the citation is.
interpretive_confidencehigh or moderate.
triggerThe plain-language reason it fired, e.g. "Kitchen is in the SE zone".

According to GET /api/v1/vastu/methodology, rules version 1.0.0 has 23 rules: 10 high-confidence and 13 moderate. Show the confidence and source next to each finding in your UI, so a reader can tell a classical prescription from a modern convention.

The other 11 endpoints

EndpointUse it when
/vastu/directionYou only need to classify a bearing into 4, 8 and 16 directions.
/vastu/entranceYou only have the main door bearing (optionally with the plot).
/vastu/zonesYou want the 8 zone polygons with area and area_pct.
/vastu/brahmasthanYou want the centre cell and a room obstruction check.
/vastu/mandalaYou want all 81 padas, each clipped to the plot.
/vastu/room-placementYou want room zones and room rules only.
/vastu/plot-analysisYou have an older integration (plan/analyze supersedes it).
/vastu/findingsYou already know the zones and want to run the rule engine on them (what-if tests, CAD data).
/vastu/muhurtaYou need griha pravesh timing for a date and place.
/vastu/methodology, /vastu/versionsYou need the conventions in full, or version strings for cache keys.

Deterministic, so cache it

The same input always gives the same output for a given geometry_engine_version and vastu_rules_version. Both come back in every response's metadata and from GET /api/v1/vastu/versions. A cache key of the request body plus those two versions is safe, and you only need to refresh it when a version changes.

What the API does not do

Findings describe what traditional Vastu texts and common practice say about a layout. They are not predictions about health, money or relationships, and they are no substitute for an architect, engineer or qualified practitioner.

Access

All 12 Vastu endpoints are open on every plan, including the Free trial. They need a valid API key, which you can send as the X-API-Key header, ?api_key= or the JSON body api_key, and each call counts against your quota. The Vastu API reference lists every field, and the floor-plan checker guide has full JavaScript and Python code.

Related

Build a Vastu floor-plan checkerStep-by-step code: coordinates, north_angle, rendering findings.Vastu directions and zones explainedExact sector boundaries, deities and the zone wedges.Vastu consultation workflowIntake-to-report sequence for practitioners.

All 12 Vastu endpoints are open on every plan, including the Free trial.

Get a free API keyVastu API reference