# Vastu Analysis API

> Vastu analysis of a space - per-zone readings, detected doshas + remedies, and a 0-100 alignment score. No birth chart required.

Source: https://astronode.dev/capabilities/vastu/vastu-analyze

`POST /v1/vastu/analyze` · part of the [Vastu Shastra API](https://astronode.dev/capabilities/vastu)

## Example request

```bash
curl -X POST 'https://api.astronode.dev/v1/vastu/analyze' \
  -H 'Authorization: Bearer aie_test_REPLACE_WITH_YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "facing": "E",
  "kind": "home",
  "doorPosition": 4,
  "zones": {
    "NE": [
      "pooja",
      "open_space"
    ],
    "SE": [
      "kitchen"
    ],
    "SW": [
      "master_bedroom"
    ],
    "NW": [
      "bedroom",
      "toilet"
    ],
    "N": [
      "living"
    ],
    "E": [
      "entrance"
    ]
  }
}'
```

## Request fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `facing` | enum | yes | N \| NE \| E \| SE \| S \| SW \| W \| NW |
| `kind` | enum | yes | home \| apartment \| plot \| office \| shop |
| `zones` | object | no | default {} |
| `zones.N` | enum[] | no |  |
| `zones.NE` | enum[] | no |  |
| `zones.E` | enum[] | no |  |
| `zones.SE` | enum[] | no |  |
| `zones.S` | enum[] | no |  |
| `zones.SW` | enum[] | no |  |
| `zones.W` | enum[] | no |  |
| `zones.NW` | enum[] | no |  |
| `zones.center` | enum[] | no |  |
| `doorPosition` | integer | no | 1..8 |

## Response fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `facing` | string | no |  |
| `kind` | string | no |  |
| `zones` | object[] | no |  |
| `zones[].zone` | string | no |  |
| `zones[].element` | string | no |  |
| `zones[].devatas` | string[] | no |  |
| `zones[].classicalUse` | null \| string | no |  |
| `zones[].placed` | string[] | no |  |
| `zones[].status` | string | no |  |
| `zones[].note` | string | no |  |
| `summary` | object[] | no |  |
| `summary[].zone` | string | no |  |
| `summary[].padaCount` | integer | no |  |
| `summary[].devatas` | string[] | no |  |
| `summary[].element` | string | no |  |
| `summary[].isBrahmasthan` | boolean | no |  |
| `doshas` | unknown[] | no |  |
| `remedies` | unknown[] | no |  |
| `alignment` | object | no |  |
| `alignment.score` | integer | no |  |
| `alignment.factors` | object[] | no |  |
| `alignment.factors[].zone` | string | no |  |
| `alignment.factors[].status` | string | no |  |
| `alignment.factors[].reason` | string | no |  |
| `meta` | object | no |  |
| `meta.tradition` | string | no |  |
| `meta.is_traditional` | boolean | no |  |
| `meta.disclaimer` | string | no |  |
| `meta.vastu_version` | string | no |  |
| `vastu_version` | string | no |  |

## Recorded response

Recorded from a real call with the request above (abridged).

```json
{
  "facing": "E",
  "kind": "home",
  "zones": [
    {
      "zone": "N",
      "element": "water",
      "devatas": [
        "Diti",
        "Aditi",
        "Bhujaga"
      ],
      "classicalUse": null,
      "placed": [
        "living"
      ],
      "status": "neutral",
      "note": "No classical placement signal for what's here."
    },
    {
      "zone": "NE",
      "element": "water",
      "devatas": [
        "Agni",
        "Āpa",
        "Apavatsa"
      ],
      "classicalUse": "Deva apartment / pooja",
      "placed": [
        "pooja",
        "open_space"
      ],
      "status": "aligned",
      "note": "pooja in NE matches BS v.118."
    },
    {
      "zone": "E",
      "element": "air",
      "devatas": [
        "Parjanya",
  …
```

Response codes: 200, 400, 401, 409, 429, 500

## In practice

Available on every plan, including Free.

- [Real estate & interiors (Vastu)](https://astronode.dev/use-cases/vastu-property) - Describe the space. Per-zone readings, detected doshas with their traditional remedies and sources, and a 0-100 alignment score with the factors behind it.
- [Real estate & interiors (Vastu)](https://astronode.dev/use-cases/vastu-property) - Show the result. Re-run with a changed layout to show the effect of moving a room.

**Recipes:** [A Vastu floor-plan check: from a listing's layout to a score](https://astronode.dev/recipes/vastu-floor-plan-check)

## Questions

**Which plan includes the Vastu Analysis API?**

All plans, including Free.

**What does POST /v1/vastu/analyze need in the request?**

Required: `facing` and `kind`. Optional: `zones` and `doorPosition`.

**What does POST /v1/vastu/analyze return?**

`facing`, `kind`, `zones`, `summary`, `doshas`, `remedies`, `alignment`, `meta` and `vastu_version`, inside `data`.

**What is the Vastu Analysis API used for?**

Products such as real estate & interiors (vastu). In the real estate & interiors (vastu) build, at the "Describe the space" stage: Per-zone readings, detected doshas with their traditional remedies and sources, and a 0-100 alignment score with the factors behind it.
