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.
- plot: the boundary as an array of
{x, y}vertices, at least 3. Clockwise or counter-clockwise both work. You can repeat the first vertex at the end or leave it off; the engine closes the polygon either way. - rooms: optional named polygons,
{name, polygon}, in the same coordinate space as the plot. - entrance: optional
{bearing_deg}, the direction the main door faces, 0–360 clockwise. - north_angle: the True North bearing of your drawing's +Y (plan-up) axis, clockwise, default 0. If the top of your drawing faces due East, pass 90. The engine converts every bearing with true bearing = bearing + north_angle and rotates the polygons into a True North frame before computing anything.
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.
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"
}'{
"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:
| Field | What it means |
|---|---|
outcome | positive, negative or informational for this layout. |
severity | How much the tradition weighs it, e.g. major or minor. |
source_type / source_text | classical (with a named text such as Manasara) or consensus (modern practice, no single text). |
source_verification_status | e.g. tradition_dependent or consensus_only, so you can show how firm the citation is. |
interpretive_confidence | high or moderate. |
trigger | The 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
| Endpoint | Use it when |
|---|---|
/vastu/direction | You only need to classify a bearing into 4, 8 and 16 directions. |
/vastu/entrance | You only have the main door bearing (optionally with the plot). |
/vastu/zones | You want the 8 zone polygons with area and area_pct. |
/vastu/brahmasthan | You want the centre cell and a room obstruction check. |
/vastu/mandala | You want all 81 padas, each clipped to the plot. |
/vastu/room-placement | You want room zones and room rules only. |
/vastu/plot-analysis | You have an older integration (plan/analyze supersedes it). |
/vastu/findings | You already know the zones and want to run the rule engine on them (what-if tests, CAD data). |
/vastu/muhurta | You need griha pravesh timing for a date and place. |
/vastu/methodology, /vastu/versions | You 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
- It does not inspect a site. It has no idea about slope, soil, drainage, structure, setbacks or building codes.
- The
interpretationfield is null in this phase. You get structured findings, not a written reading. - The Mandala returns geometry for each pada. Classical deity assignments for the 81 padas are not included yet.
- Natal-chart Vastu is not available yet:
astro_vastu_rules_versionis 0.0.0. - Only
griha_praveshis implemented for muhurta. The other ceremony types return HTTP 501.
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
All 12 Vastu endpoints are open on every plan, including the Free trial.