DEV Community

Om Prakash
Om Prakash

Posted on • Originally published at pixelapi.dev

Vastu Compliance API v2 — drop your floor plan, get a corrected design and a photoreal walkthrough

Vastu Compliance API v2 — drop your floor plan, get a corrected design and a photoreal walkthrough

I wrote about the first version of this API a day ago. The first version was honest — it took a structured JSON description of a floor plan, ran twenty-one Vastu Shastra rules over it, and returned a per-rule report plus an AutoCAD-openable DXF. It worked, the maths was correct, and the test suite was green.

It also missed the part of the workflow architects actually live in.

The conversation with three of the architects I sent the v1 to went, almost word for word, like this: "the JSON shape is fine, but I have a CAD file. I am not going to type out my floor plan as a list of rectangles. Can it read the DXF?" And later: "the report is useful, but the client doesn't read DXFs — they want to see what the corrected version actually looks like."

So we shipped v2. Same rules engine, same scoring, same DXF export. Now with four upgrades that close that loop.

1. Upload the file you already have

POST /v1/vastu/analyze-file accepts what the architect actually has on disk:

  • PDF — the printed plan exported from any CAD tool, or scanned from a printout.
  • PNG / JPG — a photograph of a hand-drawn plan, or a screenshot from any plan-drawing app.
  • DXF / DWG — the native AutoCAD/BricsCAD/DraftSight formats.
  • IFC — the BIM format from Revit, ArchiCAD, Allplan, and the rest of the BIM-native tools.

You send the raw file. We parse it down to the same (plot, rooms, entrance, features) structured shape v1 used, then run the engine on that.

curl -X POST https://api.pixelapi.dev/v1/vastu/analyze-file \
  -H "Authorization: Bearer $PIXELAPI_KEY" \
  -F "file=@floor-plan.dxf" \
  -F "facing=north"
Enter fullscreen mode Exit fullscreen mode

Response is the same {score, bucket, summary, rule_counts, findings, parsed_plan} shape. The parsed_plan field is the JSON we extracted from your file — if our parser misread anything you can correct it and call /v1/vastu/analyze directly with the cleaned version. We've tried very hard to make this round-trip honest. There's a DXF parser visual sample on the site so you can see what the structured extraction looks like next to the source drawing. The rooms are auto-detected, labelled, and zone-tagged, with the 3×3 Vastu grid overlaid. No tool on the Indian market currently does this end-to-end.

I'll be honest about parser quality. DXF and IFC are deterministic — those work cleanly because the geometry and labels are right there in the file. PDF is mostly fine when the CAD tool exported with text labels intact. Phone photos of hand-drawn plans are the hardest case; the OCR + segmentation gets the room rectangles right roughly four out of five times, and gets the labels right in maybe seventy percent of cases. If a label is missed, the room defaults to the centroid-zone-only check, which still works for the structural rules. We're improving this as we collect more in-the-wild examples.

2. The corrected DXF — actually edits the plan, not just colour-codes it

In v1, the DXF export was a visual compliance report. Same room layout you submitted, with the failing rooms outlined in red. Useful for a meeting, not useful for the next step in the workflow.

POST /v1/vastu/correct-dxf is different. It takes the same input shape, runs the rules engine, and re-positions the rooms that violated critical or high-severity rules. The kitchen ends up in the southeast, the pooja room in the northeast, the master bedroom in the southwest, and so on — all using the same room dimensions you supplied, snapped to a one-foot grid so wall lengths stay clean.

The response is a fresh DXF that opens in AutoCAD with the same R2010 format and the same layer structure as v1's read-only export, but the ROOMS_PASS / ROOMS_WARN / ROOMS_FAIL layers now contain the corrected layout. There's also a CHANGES layer with arrows and notes showing what was moved and why, so the architect can present the diff to the client without re-drawing anything.

Tested round-trip: open in AutoCAD 2020, BricsCAD V24, and DraftSight 2024 — all three render the layers correctly and let you edit. We assert in the test suite that every output room polyline closes, every label sits inside its room, and the score of the corrected layout is at least 85 (out of 100) for the standard residential rule set.

This is the part of the API that does not exist anywhere else. Sailyajit and Anant Vastu both do good work at the human-architect level, but they are services — you send them a plan, you wait days, you get a redrawn plan back. We are doing the redraw on the same call, in seconds.

3. Photoreal Indian-residential renders, per Vastu zone

Once the rules engine has decided where each room should be, the next question every client asks is what does it look like. We've shipped a render endpoint that produces photoreal images of each room in the corrected plan, in an Indian-residential aesthetic — wood furniture, warm lighting, traditional accents where the rule set calls for them (a brass diya in the pooja room, for instance).

POST /v1/vastu/render-photoreal takes the parsed-plan JSON and returns a job ID. The job runs an AI image generation pipeline per room, room-aware (kitchen scenes for the kitchen, master-bedroom scenes for the bedroom), zone-aware (NE rooms get more daylight, SW rooms get warmer late-afternoon tones). The output is a set of eight 1024×1024 images plus a 4×2 grid mosaic plus a stitched preview reel.

Sample 4×2 grid output from a real job — the same job's stitched preview reel.

Render time is roughly forty seconds per room on our hosted GPU pool, run in parallel — so a full 8-room set lands in about a minute. You poll /v1/vastu/render-photoreal/{job_id} for the job status; the response carries individual room URLs the moment each one finishes, so you can stream them into a UI without waiting for the full set.

This is the tier the photographer-and-stylist-on-retainer studios charge ₹15,000 to ₹40,000 for, per project.

4. 3D walkthrough preview — beta tier, ₹599

The walkthrough is the new, less-finished tier. We are calling it preview because that's what it is — it's a 3D Eevee-rendered walkthrough at roughly forty seconds, generated automatically from the same parsed plan, with simple wall meshes, generic furniture, and stock lighting. Sample walkthrough MP4 — also a Cycles-rendered hero frame so you can see the upper end of what the same pipeline produces with more compute.

The preview tier renders in Eevee for speed and costs ₹599 per walkthrough. The premium tier (Cycles, full ray-traced, 1080p, branded title cards) costs ₹1,999 and is part of the photoreal bundle.

The walkthrough is honestly more useful as a sales tool than a design tool. The geometry is correct (the rules engine guarantees that), but the textures and furniture are generic. If your customer needs to see the corrected plan to sign off, this works. If your customer needs the walkthrough to feel like a real interior render, use the photoreal grid plus your own walkthrough tool. Lumion, Twinmotion, D5 — all of those still beat us on textured walkthroughs and probably will for a while. We are not chasing them.

Pricing

Tier What you get Price
Vastu validation Per-rule report + score on uploaded file ₹599 per check
Validation + corrected DXF Above, plus the auto-corrected AutoCAD file ₹1,499 per check
3D walkthrough preview Eevee 40s walkthrough of corrected plan ₹599 per walkthrough
Photoreal render set 8 photoreal room images + grid + stitched reel ₹1,999 per set
Architect bundle Unlimited validations + 50 corrected DXFs/mo + 50 photoreal sets/mo ₹2,999/mo
Consumer bundle 5 validations/mo + 2 photoreal sets/mo ₹999/mo

How this compares to the alternatives

Service What they offer Cost Turnaround
PixelAPI Vastu API v2 File upload, rules engine, corrected DXF, photoreal renders ₹599 — ₹2,999/mo seconds
Anant Vastu (consultation) Human Vastu consultant report ~₹10,000 per project 5–7 days
Sailyajit (consultation) Human consultant + redrawn plan ₹15–25 per sq.ft. 10–15 days
AppliedVastu (online) Rule-based scoring, human-backed corrections ~₹1,200 per check hours to days
Lumion / Twinmotion (render) 3D walkthrough authoring tool ₹50,000+ per year (license) self-driven

We are the only end-to-end API on the list. Lumion is a desktop authoring tool — beautiful renders, but you draw the plan yourself. The three Vastu services are human-backed, which means quality is high but turnaround is days. We are seconds-to-minutes, fully automated, and priced for both per-call use (architects who only need one or two checks) and monthly bundles (architects who need a steady stream).

What the API does not do, honestly

A few things are deliberately out of scope, or in beta:

  • Multi-floor plans — the engine handles a single floor. Stairs are tagged but not routed across floors. Fix coming.
  • Plot orientations beyond N/E/S/W — the rules engine handles the four cardinal facings cleanly. NE/SE/SW/NW facings are accepted but the reports use approximations. A more rigorous treatment is in the rule set we are reviewing with our consulting Vastu acharya.
  • Non-residential — commercial Vastu has a partially-different rule set (cash drawer in the north, owner's seat facing east, etc.). We have those as a separate rule pack, not yet exposed through the API. Drop a note to support if you want early access.
  • Walkthrough textures — preview-tier only right now. Premium textured walkthroughs are coming with the Q3 milestone.

Everything in this list is actively worked on, with a target ship date in the dashboard roadmap.

Try it

If you have a floor plan as a DXF, IFC, PDF, or even a phone photo, go to pixelapi.dev/app and drop the file into the Vastu tool. The free-during-beta tier covers the validation report; the corrected DXF and photoreal renders are credit-paid but cheap enough to try.

Full API reference: pixelapi.dev/docs/vastu.html. Step-by-step tutorial with curl/Python/JS: pixelapi.dev/tutorials/vastu-compliance.html.

If your firm already has a stack of past plans you want bulk-checked, email support@pixelapi.dev and we will run them through and send back a CSV of scores. No charge for the first 25 — we are still hungry for feedback on parser failure modes.

Top comments (0)