Vastu Plan Geometry Check
POSTAvailable
https://api.96astroapi.com/v1/vastu/vastu-validate-geometryEvery geometry fault of a plan in one answer: a boundary, room, structure or courtyard that crosses itself or has no area, courtyards outside the outline or overlapping, rooms that overlap (a warning from 10% of the smaller room, an error from 60%), a room outside the outline, rooms that add up to more than the plot, and a unit or scale that makes the plot implausible. Also states the plan's centre convention and what it means on an L- or U-shaped plot.
- Credits
- 1 credit
- Input
- Specific input
- Output
- JSON
- Delivery
- Direct response
- Languages
- 26 languages; translated term names with
labels
| Header | Value and description |
|---|---|
AuthorizationRequired | Bearer YOUR_API_KEYYour sandbox (sk_test_...) or live (sk_live_...) key. X-API-Key: <key> is accepted instead. |
Content-TypeRequired | application/jsonThe body is JSON. |
Idempotency-KeyOptional | <unique string>Makes retries safe: a repeated key with the same body replays the stored response and is never charged twice. (1 to 200 characters) |
| Field | Description |
|---|---|
boundaryarray of [number, number]Required | The property outline in order round the shape. Limits: 1 to 500 items |
roomsarray of objectsOptional | Limits: at most 80 items |
rooms[].namestringOptional | Default: Limits: at most 120 characters Example: |
rooms[].typestring | nullOptional | Default: Limits: at most 40 characters Example: |
rooms[].polygonarray of [number, number]Optional | Any number of points: a shape that is too small or crosses itself is reported, not refused. Limits: at most 200 items |
structuresarray of objectsOptional | Limits: at most 80 items |
structures[].namestringOptional | Default: Limits: at most 120 characters |
structures[].typestring | nullOptional | Default: Limits: at most 40 characters |
structures[].polygonarray of [number, number]Optional | Any number of points: a shape that is too small or crosses itself is reported, not refused. Limits: at most 200 items |
holesarray of objectsOptional | Open courtyards and cut-outs. Limits: at most 20 items |
holes[].namestringOptional | Default: Limits: at most 120 characters |
holes[].typestring | nullOptional | Default: Limits: at most 40 characters |
holes[].polygonarray of [number, number]Optional | Any number of points: a shape that is too small or crosses itself is reported, not refused. Limits: at most 200 items |
unitsstring | nullOptional | The unit the coordinates are in, if they are real lengths. Checked for plausibility. Default: Allowed values: mcmmmftinyd Example: |
scaleobject | nullOptional | For a drawing in pixels: a length on the plan and its real length. Checked for plausibility. Default: |
scale.plan_lengthnumberRequired | A length measured on the plan, in plan coordinates. Limits: greater than 0, maximum 2000000 |
scale.real_lengthnumberRequired | What that length is in reality. Limits: greater than 0, maximum 100000 |
scale.unitstringRequired | Allowed values: mcmmmftinyd |
centre[number, number] | nullOptional | A centre you choose; its position and the conventions are reported. Default: Limits: exactly 2 items |
centre_methodstring | nullOptional | How the centre is found when `centre` is not given: bounding_box (default) or polygon_centroid. Default: Allowed values: bounding_boxpolygon_centroid |
labelsstringOptional | Optional. Adds `meta.labels`: translated display names for the identifiers in the answer. `data` is unchanged. Free. Any other code is refused with 422 unsupported_language. Allowed values: asbndeesfrguhiitjaknkomlmrnenlorpaplptrusitatetrur |
Response · fields in data
Inferred from the example response: a guide to the shape, not a contract.
valid· booleanstatus· stringerror_count· numberwarning_count· numberissues· array of objectcentre· objectscale· objectthresholds· objectbasis· string
Example request
curl -X POST https://api.96astroapi.com/v1/vastu/vastu-validate-geometry \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"units": "m",
"boundary": [
[
0,
0
],
[
12,
0
],
[
12,
9
],
[
0,
9
]
],
"rooms": [
{
"name": "Kitchen",
"type": "kitchen",
"polygon": [
[
9,
6
],
[
12,
6
],
[
12,
9
],
[
9,
9
]
]
},
{
"name": "Bedroom",
"type": "master_bedroom",
"polygon": [
[
8,
5
],
[
12,
5
],
[
12,
9
],
[
8,
9
]
]
}
]
}'Example response
{
"data": {
"valid": false,
"status": "fail",
"error_count": 1,
"warning_count": 0,
"issues": [
{
"severity": "error",
"code": "rooms_overlap",
"subject": "Kitchen / Bedroom",
"message": "Rooms 'Kitchen' and 'Bedroom' overlap by 100% of the smaller one; one is drawn over the other.",
"overlap_pct": 100
}
],
"centre": {
"method": "bounding_box",
"convention": "the centre of the outline's bounding box (the API default)",
"point": [
6,
…Captured from the live engine with a sandbox key (so credits_used is 0) and trimmed: long arrays keep their first items.
Error responses
- 400invalid_request
- 401invalid_key, expired_key
- 402payment_required
- 403account_suspended, plan_upgrade_required, plan_family_not_included, key_scope_denied, ip_not_allowed, origin_not_allowed, publishable_key_not_allowed
- 404not_found
- 409idempotency_conflict
- 413payload_too_large
- 422invalid_request, unsupported_language
- 429rate_limited, quota_exhausted, spend_cap_reached, project_budget_exceeded
- 500computation_failed
- 502unavailable
- 503unavailable, maintenance, temporarily_unavailable
- 504deadline_exceeded
Errors are never charged. What each status means and what to do: errors.

