{"openapi":"3.1.0","info":{"title":"Vastu Shastra API","version":"2.0.0","description":"Vastu Shastra API for directional home and plot analysis: entrance padas with the classical effect of each of the 32 perimeter positions, the Vastu Purusha Mandala projected over a real plot on the 81 pada or the 64 pada grid, room placement checks over a closed room enum, Ayadi shadvarga across three text families, plot shape and ground level under two schools that genuinely disagree, and griha pravesh dates composed over a verified panchang. Every verdict carries the chapter and verse it rests on as a typed field, or says plainly that it is convention. Directional design from Indian architecture, sitting beside our feng shui endpoints on one key, with Remote MCP and typed SDKs.\n\n# RoxyAPI: AI-Native Insight Infrastructure\n\n> **Base URL:** `https://roxyapi.com/api/v2`\n> All endpoint paths below are relative to this base URL.\n\nThe only multi-domain spiritual intelligence API. 18 domains (Astrology, Vedic Astrology, Forecast, Human Design, Chinese Astrology, Feng Shui, Mesoamerican Astrology, Vastu Shastra, Numerology, Kabbalah, Tarot Reading, Biorhythm, Ayurveda, I-Ching Oracle, Crystals and Healing Stones, Dream Interpretation, Angel Numbers, Location and Timezone), 258+ endpoints, one API key, instant activation. Remote MCP server per domain plus AGENTS.md for AI coding agents.\n\n## Who uses RoxyAPI\n\n- **Developers** building astrology apps, tarot platforms, numerology calculators, or dream journals\n- **AI agent builders** connecting Claude, GPT, or Gemini to real calculation engines via MCP\n- **Vibe coders** shipping insight apps with Cursor, Bolt, or Replit using zero domain knowledge\n- **Founders and brands** launching branded spiritual experiences for their audience\n\n## Quick start (60 seconds)\n\n**1. Get your API key** at [roxyapi.com/pricing](https://roxyapi.com/pricing). Instant delivery, no account required.\n\n**2. Make your first call:**\n```bash\ncurl -H \"X-API-Key: YOUR_KEY\" https://roxyapi.com/api/v2/tarot/draw -X POST -H \"Content-Type: application/json\" -d '{\"count\": 3}'\n```\n\n**3. Monitor usage:**\n```bash\ncurl -H \"X-API-Key: YOUR_KEY\" https://roxyapi.com/api/v2/usage\n```\n\n## AI agent integration (Remote MCP)\n\nRoxyAPI ships a Remote MCP server per product over Streamable HTTP, with no local setup and no Docker. Your AI agent auto-discovers all 258+ endpoints as callable tools with zero configuration:\n- **Claude Desktop, Cursor, Windsurf**: Add MCP server URL in settings\n- **OpenAI Agents, Gemini ADK**: Connect via Streamable HTTP transport\n- **Custom agents**: Use the MCP Python/TypeScript SDK\n\nMCP endpoints: `https://roxyapi.com/mcp/{domain}` (e.g., `/mcp/astrology`, `/mcp/tarot`)\n\nSetup guide: [roxyapi.com/docs/mcp](https://roxyapi.com/docs/mcp)\n\n## Authentication\n\nAll endpoints require an API key via header or query param:\n- **Header (recommended):** `X-API-Key: YOUR_KEY`\n- **Query param (testing):** `?api_key=YOUR_KEY`\n\n## Response format\n\nClean JSON, no wrapper objects. Errors return `{ \"error\": \"message\", \"code\": \"error_code\" }`. The `error` field is human-readable (may change wording). The `code` field is machine-readable and stable, so it is the one safe to switch on programmatically.\n\nRate limit headers on every response: `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Used`, `X-RateLimit-Reset` (Unix timestamp, seconds). Quotas reset on the 1st of every calendar month at 12:00 AM UTC, not on your renewal date.\n\n## Errors\n\nAll errors return `{ \"error\": \"message\", \"code\": \"error_code\" }`:\n\n| Status | Code | When |\n|--------|------|------|\n| 400 | `validation_error` | Missing or invalid parameters. Response includes `issues[]` with per-field `path`, `message`, `code`, `expected`, `minimum`, `maximum`, `format`, `pattern`. |\n| 401 | `api_key_required` | No API key provided |\n| 401 | `invalid_api_key` | Key format invalid or tampered |\n| 401 | `subscription_not_found` | Key references non-existent subscription |\n| 401 | `subscription_inactive` | Subscription cancelled, expired, or suspended |\n| 404 | `not_found` | Resource not found. Response may include a ranked `suggestions[]` array (each with `endpoint`, `hint`, and a `docs` deep link) for typo recovery. |\n| 405 | `method_not_allowed` | Path exists for a different HTTP method. Response includes `allow[]` and the `Allow` header lists valid methods. |\n| 429 | `rate_limit_exceeded` | Monthly quota reached |\n| 500 | `internal_error` | Server error |\n\n## Pricing\n\nFlat per-request pricing. Every call counts the same, whether a planet position or a full birth chart with aspects. No credit systems, no variable costs. Plans from $39 per month for 50K requests, up to 3M requests, with custom volume above that.\n\nSee [roxyapi.com/pricing](https://roxyapi.com/pricing)\n\n## Resources\n\n- [Quickstart guide](https://roxyapi.com/docs/quickstart): first API call in 60 seconds\n- [Documentation](https://roxyapi.com/docs): guides, tutorials, domain reference\n- [MCP setup](https://roxyapi.com/docs/mcp): connect AI agents\n- [Open source templates](https://roxyapi.com/starters): clone and deploy in 30 minutes\n- [FAQ](https://roxyapi.com/faq): common questions\n- [Contact](https://roxyapi.com/contact): support and API key recovery\n","contact":{"name":"RoxyAPI Support","url":"https://roxyapi.com/contact"},"license":{"name":"Proprietary","url":"https://roxyapi.com/policy/terms"}},"externalDocs":{"description":"Complete API Documentation with Examples","url":"https://roxyapi.com/docs"},"servers":[{"url":"/api/v2","description":"Production API v2"}],"security":[{"apiKey":[]}],"tags":[{"name":"Vastu","description":"Vastu Shastra API for directional home and plot analysis: entrance padas with the classical effect of each of the 32 perimeter positions, the Vastu Purusha Mandala projected over a real plot on the 81 pada or the 64 pada grid, room placement checks over a closed room enum, Ayadi shadvarga across three text families, plot shape and ground level under two schools that genuinely disagree, and griha pravesh dates composed over a verified panchang. Every verdict carries the chapter and verse it rests on as a typed field, or says plainly that it is convention. Directional design from Indian architecture, sitting beside our feng shui endpoints on one key, with Remote MCP and typed SDKs."}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Your API key for accessing RoxyAPI. Alternatively, you can pass the API key as a query parameter \"api_key\"."}},"schemas":{},"parameters":{}},"paths":{"/entrance":{"post":{"operationId":"calculateEntrancePada","tags":["Vastu"],"summary":"Calculate entrance pada - Vastu main door direction API","description":"Vastu entrance analysis for a main door: send the plot and where the door sits, and the API returns which of the 32 perimeter padas it falls on, the devata of that square, the effect the classical chapter gives that pada, and the favourable padas on the same side to move toward. Every verdict carries the chapter and verse it comes from as a typed field, and the reading holds on either the 81 pada or the 64 pada division. Built for property and interior design tools, practitioner reports, and any product that has to say whether a front door is well placed.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["en","tr","de","es","hi","pt","fr","ru","zh-Hans","zh-Hant"],"default":"en","example":"en","description":"Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English."},"required":false,"description":"Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.","name":"lang","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"plot":{"type":"object","properties":{"width":{"type":"number","exclusiveMinimum":0,"example":30,"description":"East-west extent of a rectangular plot, in the unit given. Send this with depth for a rectangle, or send polygon instead."},"depth":{"type":"number","exclusiveMinimum":0,"example":40,"description":"North-south extent of a rectangular plot, in the unit given. Send this with width for a rectangle, or send polygon instead."},"polygon":{"type":"array","items":{"type":"object","properties":{"x":{"type":"number","example":15,"description":"Distance east of the plot origin, in the same unit as the plot. The x axis runs east."},"y":{"type":"number","example":0,"description":"Distance north of the plot origin, in the same unit as the plot. The y axis runs north."}},"required":["x","y"]},"minItems":3,"maxItems":16,"example":[{"x":0,"y":0},{"x":30,"y":0},{"x":30,"y":40},{"x":0,"y":40}],"description":"The plot outline as 3 to 16 vertices in plot coordinates, x east and y north, in either winding order. Use this instead of width and depth for a plot with a cut corner, an extension or an irregular boundary."},"unit":{"type":"string","enum":["feet","metres"],"default":"feet","example":"feet","description":"Unit the plot dimensions are given in. Every distance the response returns is in this same unit. The mandala projection is scale free, so this affects the areas and the marma size and nothing else."}},"description":"The ground the mandala is projected over. Send width and depth for a compass-aligned rectangle, or polygon for anything else. The x axis runs east and the y axis north, and the mandala is aligned to the compass rather than to the building."},"facing":{"type":"string","enum":["North","Northeast","East","Southeast","South","Southwest","West","Northwest"],"example":"North","description":"Direction the front of the house looks out toward, one of the eight compass sectors. Case and punctuation are folded, so north-east, northeast and NorthEast all resolve. Send this or facingDegrees, never both."},"facingDegrees":{"type":"number","minimum":0,"maximum":360,"example":15,"description":"Direction the front of the house looks out toward, as a compass bearing in degrees clockwise from true north, measured looking OUT from the building. The same convention the feng shui facing endpoints use, so a bearing works unchanged across the two domains. Send this or facing, never both."},"door":{"type":"object","properties":{"x":{"type":"number","example":15,"description":"Distance east of the plot origin, in the same unit as the plot. The x axis runs east."},"y":{"type":"number","example":0,"description":"Distance north of the plot origin, in the same unit as the plot. The y axis runs north."}},"required":["x","y"],"description":"Where the main door sits, in plot coordinates. The point is snapped to the nearest boundary of the plot, so a coordinate read off a drawing that lands slightly inside or outside still resolves. Send this or doorPosition, never both."},"doorPosition":{"type":"number","minimum":0,"maximum":1,"example":0.4,"description":"Where the main door sits along the facing side, as a fraction from 0 to 1 measured from the corner the chapter starts that side at: the north-east for an east facing, the south-east for a south facing, the south-west for a west facing and the north-west for a north facing. Requires a cardinal facing, since an intercardinal facing names no single side. Send this or door, never both."},"grid":{"type":"string","enum":["81-pada","64-pada"],"default":"81-pada","example":"81-pada","description":"Which division of the ground to read: 81-pada is the Paramasayika of Brihat Samhita 53.42, the grid the chapter numbers and names every devata on, and 64-pada is the Manduka of 53.55, for which the chapter gives structure only and no devata names. Defaults to 81-pada."}},"required":["plot"]}}}},"responses":{"200":{"description":"Entrance pada, its devata, the classical effect and the favourable padas","content":{"application/json":{"schema":{"type":"object","properties":{"pada":{"type":"number","example":3,"description":"Which of the 32 perimeter padas the main door falls on, numbered 1 to 32. Padas 1 to 8 run down the east side from the north-east corner, 9 to 16 along the south from the south-east, 17 to 24 up the west from the south-west and 25 to 32 along the north from the north-west. This index is the identifier every entrance verdict keys on."},"side":{"type":"string","example":"East","description":"Which of the four sides the pada belongs to. A corner square belongs to exactly one side, decided by the verses rather than by geometry, so the south-east corner reads South even though it sits at the end of the east edge."},"startCorner":{"type":"string","example":"Northeast","description":"The corner the chapter counts this side from. The four start corners are stated in the verses themselves, which is what makes the effect to pada alignment a reading rather than an inference."},"ordinalOnSide":{"type":"number","example":3,"description":"Position of the pada along its own side, 1 to 8, counting from the start corner. Useful for drawing a door strip without recomputing the global index."},"square":{"type":"number","example":3,"description":"The square of the 81 pada grid the door falls in, 1 to 81. It is always the 81 pada square, whichever grid you ask for, because that is the division the chapter numbers and the one the 32 padas are enumerated on. Squares run row-major over the printed plate, so the corners are 1 north-east, 9 south-east, 73 north-west and 81 south-west."},"cell":{"type":"object","properties":{"rowFromNorth":{"type":"number","example":3,"description":"Row of the grid the square sits in, 1 at the northern edge."},"columnFromWest":{"type":"number","example":9,"description":"Column of the grid the square sits in, 1 at the western edge."}},"required":["rowFromNorth","columnFromWest"],"description":"The square as a row and column, which is what you draw with. Row 1 is the northern edge and column 1 the western one."},"devata":{"type":"object","properties":{"id":{"type":"string","example":"jayanta","description":"Identifier of the devata holding that square. Always English transliteration, safe to compare against and to look up on the devatas endpoint."},"name":{"type":"string","example":"Jayanta","description":"Display name of the devata, with the diacritics the transliteration carries."},"padaCount":{"type":"number","example":2,"description":"How many of the 81 squares this devata holds: one for a padika, two for a dvipada, three for a tripada and nine for Brahma."}},"required":["id","name","padaCount"],"description":"The devata holding the entrance square. Present only on the 81 pada grid, because 53.55 to 56 gives the 64 pada division its structure and names no devata on it. The effects themselves apply to either division, which is why the pada and the effect are returned in both cases."},"effect":{"type":"string","example":"Great wealth.","description":"What the chapter says follows from a main entrance on this pada. Original prose composed from the verse, translated in place when lang is set."},"auspiciousness":{"type":"string","example":"inauspicious","description":"How the stated effect reads: auspicious for a gain, inauspicious for a harm, mixed where the text names a gain and a loss together. A RoxyAPI classification of the verse effect rather than a word in the text, and always English so it is safe to key styling on."},"reading":{"type":"string","example":"The main entrance falls on pada 3 of the East side, counted from the Northeast corner. That pada is the square of Jayanta. Great wealth.","description":"The verdict as a sentence, for a report or a chat answer. Composed from the pada, its side and its effect, and translated in place when lang is set."},"recommendedPadas":{"type":"array","items":{"type":"number"},"example":[3,4],"description":"The padas on this same side whose stated effect is a gain, so a door can be moved to the nearest favourable position without re-reading the whole table. Empty on a side where the chapter names no gain at all, which is true of the south."},"source":{"type":"object","properties":{"text":{"type":"string","example":"Brihat Samhita","description":"The primary text this verdict rests on, or the literal value convention where no verse states the rule. Always English, safe to compare against."},"chapter":{"type":"number","example":53,"description":"Chapter of the primary text. Absent on a convention, which has no chapter to cite."},"verse":{"type":"string","example":"118","description":"Verse or verse range inside the chapter. Absent on a convention. A range is written with a hyphen, as in 115-117."},"translation":{"type":"string","example":"N. Chidambaram Iyer","description":"Translator of the edition the verse was read in. Absent on a convention."},"year":{"type":"number","example":1884,"description":"Publication year of that edition. Absent on a convention."},"publicDomain":{"type":"boolean","example":true,"description":"Whether the cited edition is in the public domain. True on the 1884 Brihat Samhita edition, whose verses are quoted. False on the 1933 Manasara edition behind the Ayadi formulas, from which only the multipliers, divisors and names are taken, never a sentence."},"basis":{"type":"string","example":"the south-west placement of the principal bedroom is later Vastu practice; chapter 53 places no bedroom","description":"Why a convention rule says what it says. Present only when text is convention, and it names the tradition the rule comes from rather than a verse."}},"required":["text"],"description":"Where a verdict comes from: a chapter and verse of a named public-domain edition, or the literal convention with the practice it rests on. Every verdict in this domain carries one."},"conventions":{"type":"object","properties":{"grid":{"type":"string","example":"81-pada","description":"Which division of the ground was read. Echoes the resolved value whether it was sent or defaulted."}},"required":["grid"],"description":"The switches this reading resolved, echoed so a stored response can be reproduced years later without knowing what the defaults were on the day it was made."}},"required":["pada","side","startCorner","ordinalOnSide","square","cell","effect","auspiciousness","reading","recommendedPadas","source","conventions"]}}}},"400":{"description":"Validation error. `issues[]` lists every failed field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"First issue summary."},"code":{"type":"string","enum":["validation_error"]},"issues":{"type":"array","description":"Every validation failure. Use this to rebuild a valid request.","items":{"type":"object","properties":{"path":{"type":"string","description":"Dot-separated field path, or \"(root)\" for top-level."},"message":{"type":"string"},"code":{"type":"string","description":"Zod issue code (invalid_type, too_small, too_big, invalid_string, ...)."},"expected":{"type":"string","description":"Expected type for invalid_type."},"minimum":{"description":"Minimum bound for too_small issues.","oneOf":[{"type":"number"},{"type":"string"}]},"maximum":{"description":"Maximum bound for too_big issues.","oneOf":[{"type":"number"},{"type":"string"}]},"inclusive":{"type":"boolean"},"format":{"type":"string","description":"Format name for string issues (regex, email, url, uuid)."},"pattern":{"type":"string","description":"Regex pattern when format is regex."}},"required":["path","message"]}}},"required":["error","code","issues"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}},"405":{"description":"Method not allowed. The path exists but only responds to the methods listed in `allow[]` and the `Allow` response header.","headers":{"Allow":{"description":"Comma-separated list of allowed methods (RFC 9110).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["method_not_allowed"]},"allow":{"type":"array","items":{"type":"string"},"description":"Allowed HTTP methods for this path. Mirrors the Allow response header."},"docs":{"type":"string","description":"Link to the product page for this domain."}},"required":["error","code","allow"]}}}},"429":{"description":"Monthly rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}}}}},"/mandala":{"post":{"operationId":"generateMandala","tags":["Vastu"],"summary":"Generate Vastu Purusha Mandala - 81 pada and 64 pada grid API","description":"Vastu Purusha Mandala projected over a real plot: send the ground and the API returns every square with the devata holding it, the brahmasthan as a polygon you can draw, the marma points, the six vamsa diagonals named by their devatas and the nine atimarma crossings. Choose the 81 pada Paramasayika or the 64 pada Manduka, and the response says which verses each part rests on. Built for floor plan overlays, practitioner reports and any tool that has to place rooms against the classical grid.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["en","tr","de","es","hi","pt","fr","ru","zh-Hans","zh-Hant"],"default":"en","example":"en","description":"Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English."},"required":false,"description":"Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.","name":"lang","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"plot":{"type":"object","properties":{"width":{"type":"number","exclusiveMinimum":0,"example":30,"description":"East-west extent of a rectangular plot, in the unit given. Send this with depth for a rectangle, or send polygon instead."},"depth":{"type":"number","exclusiveMinimum":0,"example":40,"description":"North-south extent of a rectangular plot, in the unit given. Send this with width for a rectangle, or send polygon instead."},"polygon":{"type":"array","items":{"type":"object","properties":{"x":{"type":"number","example":15,"description":"Distance east of the plot origin, in the same unit as the plot. The x axis runs east."},"y":{"type":"number","example":0,"description":"Distance north of the plot origin, in the same unit as the plot. The y axis runs north."}},"required":["x","y"]},"minItems":3,"maxItems":16,"example":[{"x":0,"y":0},{"x":30,"y":0},{"x":30,"y":40},{"x":0,"y":40}],"description":"The plot outline as 3 to 16 vertices in plot coordinates, x east and y north, in either winding order. Use this instead of width and depth for a plot with a cut corner, an extension or an irregular boundary."},"unit":{"type":"string","enum":["feet","metres"],"default":"feet","example":"feet","description":"Unit the plot dimensions are given in. Every distance the response returns is in this same unit. The mandala projection is scale free, so this affects the areas and the marma size and nothing else."}},"description":"The ground the mandala is projected over. Send width and depth for a compass-aligned rectangle, or polygon for anything else. The x axis runs east and the y axis north, and the mandala is aligned to the compass rather than to the building."},"grid":{"type":"string","enum":["81-pada","64-pada"],"default":"81-pada","example":"81-pada","description":"Which division of the ground to read: 81-pada is the Paramasayika of Brihat Samhita 53.42, the grid the chapter numbers and names every devata on, and 64-pada is the Manduka of 53.55, for which the chapter gives structure only and no devata names. Defaults to 81-pada."}},"required":["plot"]}}}},"responses":{"200":{"description":"Every cell of the projected mandala with its devata, brahmasthan and geometry","content":{"application/json":{"schema":{"type":"object","properties":{"grid":{"type":"string","example":"81-pada","description":"Which division was projected, echoing the resolved value."},"cells":{"type":"array","items":{"type":"object","properties":{"square":{"type":"number","example":41,"description":"Square number, 1 to 81 on the Paramasayika and 1 to 64 on the Manduka. Squares run row-major over the printed plate, which puts 1 in the north-east, 9 in the south-east, 73 in the north-west and 81 in the south-west on the 81 pada grid."},"rowFromNorth":{"type":"number","example":5,"description":"Row of the grid, 1 at the northern edge and 9 or 8 at the southern one."},"columnFromWest":{"type":"number","example":5,"description":"Column of the grid, 1 at the western edge and 9 or 8 at the eastern one."},"devata":{"type":"string","example":"brahma","description":"Identifier of the devata holding this square. Always English transliteration, safe to compare against. Present only on the 81 pada grid, since the chapter names no devata on the 64 pada division."},"devataName":{"type":"string","example":"Brahmā","description":"Display name of that devata, with the diacritics the transliteration carries. Present only on the 81 pada grid."},"class":{"type":"string","example":"center","description":"Which ring of the mandala the devata belongs to: perimeter for the outer 32, innerRing for the eight around Brahma, innerCorner for the four on the inner diagonals, center for Brahma. Present only on the 81 pada grid."},"group":{"type":"string","example":"dvipada","description":"How many squares the devata holds under the classification of 53.49 to 50: padika for one, dvipada for two, tripada for three. Absent for Brahma, which those verses leave outside the scheme, and on the 64 pada grid."},"role":{"type":"string","example":"around-brahma","description":"The structural role 53.55 to 56 gives this square of the 64 pada division: brahma, halved-inner-corner, halved-outer-corner, around-brahma, dvipada or outer. Present only on the 64 pada grid, which is the only thing that chapter states about it."},"center":{"type":"object","properties":{"x":{"type":"number","example":15,"description":"Distance east of the plot origin, in the same unit as the plot. The x axis runs east."},"y":{"type":"number","example":0,"description":"Distance north of the plot origin, in the same unit as the plot. The y axis runs north."}},"required":["x","y"],"description":"Centre of the square in plot coordinates. This point is the marmasthala of the square, the vital spot 53.57 forbids raising a pillar on."},"withinPlot":{"type":"boolean","example":true,"description":"Whether the centre of this square falls inside the plot outline. False where an irregular plot has a corner cut away, which is how a missing quarter of the mandala shows up as data rather than as a missing row."}},"required":["square","rowFromNorth","columnFromWest","center","withinPlot"]},"description":"Every square of the projected mandala, row-major from the north-west. 81 entries on the Paramasayika and 64 on the Manduka."},"brahmasthan":{"type":"object","properties":{"squares":{"type":"array","items":{"type":"number"},"example":[31,32,33,40,41,42,49,50,51],"description":"The squares Brahma holds: the nine central squares on the 81 pada grid, the four on the 64 pada grid."},"polygon":{"type":"array","items":{"type":"object","properties":{"x":{"type":"number","example":15,"description":"Distance east of the plot origin, in the same unit as the plot. The x axis runs east."},"y":{"type":"number","example":0,"description":"Distance north of the plot origin, in the same unit as the plot. The y axis runs north."}},"required":["x","y"]},"description":"The brahmasthan as four corners in plot coordinates, so it can be drawn straight onto a plan. It is the block a house is kept clear of, and the chapter destroys the family of a house whose gate faces it."},"area":{"type":"number","example":133.33,"description":"Area of the brahmasthan in the square of the plot unit, so a report can quote how much ground it covers."}},"required":["squares","polygon","area"],"description":"The central block of the mandala. Nine squares on the Paramasayika and four on the Manduka."},"marma":{"type":"object","properties":{"points":{"type":"array","items":{"type":"object","properties":{"x":{"type":"number","example":15,"description":"Distance east of the plot origin, in the same unit as the plot. The x axis runs east."},"y":{"type":"number","example":0,"description":"Distance north of the plot origin, in the same unit as the plot. The y axis runs north."}},"required":["x","y"]},"description":"The centre of every square, which 53.57 calls a marmasthala and forbids raising a pillar over."},"areaEach":{"type":"number","example":1.85,"description":"Area of one marma spot in the square of the plot unit. 53.64 sets it at one eighth of the area of a square, so it scales with the plot."}},"required":["points","areaEach"],"description":"The vital spots of the mandala. Present on the 81 pada grid, where 53.57 and 53.64 state the rule and its size. Absent on the 64 pada grid, for which the chapter states neither."},"vamsa":{"type":"array","items":{"type":"object","properties":{"fromSquare":{"type":"number","example":73,"description":"Square the line starts at, named in 53.63 by the devata holding it."},"fromDevata":{"type":"string","example":"roga","description":"Identifier of the devata at that end. Always English transliteration, safe to compare against."},"toSquare":{"type":"number","example":9,"description":"Square the line ends at, named in 53.63 by the devata holding it."},"toDevata":{"type":"string","example":"vayu","description":"Identifier of the devata at that end."},"axis":{"type":"string","example":"northwest-southeast","description":"Which way the line runs across the grid, northwest-southeast or northeast-southwest. Derived from the endpoint cells rather than stored, so it cannot disagree with the geometry."},"isMainDiagonal":{"type":"boolean","example":true,"description":"Whether this is one of the two corner to corner diagonals. The other four run parallel to them, two cells either side."},"from":{"type":"object","properties":{"x":{"type":"number","example":15,"description":"Distance east of the plot origin, in the same unit as the plot. The x axis runs east."},"y":{"type":"number","example":0,"description":"Distance north of the plot origin, in the same unit as the plot. The y axis runs north."}},"required":["x","y"],"description":"Start of the line in plot coordinates, at the centre of its square."},"to":{"type":"object","properties":{"x":{"type":"number","example":15,"description":"Distance east of the plot origin, in the same unit as the plot. The x axis runs east."},"y":{"type":"number","example":0,"description":"Distance north of the plot origin, in the same unit as the plot. The y axis runs north."}},"required":["x","y"],"description":"End of the line in plot coordinates, at the centre of its square."}},"required":["fromSquare","fromDevata","toSquare","toDevata","axis","isMainDiagonal","from","to"]},"description":"The six vamsa lines of 53.63, each named in the verse by the devatas at its two ends. Present only on the 81 pada grid: the 64 pada division is told to draw its main diagonals and nothing further is stated, so a six line geometry there would be borrowed from a different text."},"atimarma":{"type":"array","items":{"type":"number"},"example":[23,31,33,39,41,43,49,51,59],"description":"The nine squares where the six vamsa lines cross. 53.63 asserts nine points and lists none, so these are computed by intersecting the lines rather than transcribed. They are the centre, the four corners of the Brahma block and the four cardinal squares of the second ring. Present only on the 81 pada grid."},"sources":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","example":"Brihat Samhita","description":"The primary text this verdict rests on, or the literal value convention where no verse states the rule. Always English, safe to compare against."},"chapter":{"type":"number","example":53,"description":"Chapter of the primary text. Absent on a convention, which has no chapter to cite."},"verse":{"type":"string","example":"118","description":"Verse or verse range inside the chapter. Absent on a convention. A range is written with a hyphen, as in 115-117."},"translation":{"type":"string","example":"N. Chidambaram Iyer","description":"Translator of the edition the verse was read in. Absent on a convention."},"year":{"type":"number","example":1884,"description":"Publication year of that edition. Absent on a convention."},"publicDomain":{"type":"boolean","example":true,"description":"Whether the cited edition is in the public domain. True on the 1884 Brihat Samhita edition, whose verses are quoted. False on the 1933 Manasara edition behind the Ayadi formulas, from which only the multipliers, divisors and names are taken, never a sentence."},"basis":{"type":"string","example":"the south-west placement of the principal bedroom is later Vastu practice; chapter 53 places no bedroom","description":"Why a convention rule says what it says. Present only when text is convention, and it names the tradition the rule comes from rather than a verse."}},"required":["text"],"description":"Where a verdict comes from: a chapter and verse of a named public-domain edition, or the literal convention with the practice it rests on. Every verdict in this domain carries one."},"description":"Every verse this projection rests on: the grid and its devatas, the 64 pada structure where that grid was asked for, and the marma and vamsa geometry where it applies."},"conventions":{"type":"object","properties":{"grid":{"type":"string","example":"81-pada","description":"Which division of the ground was projected. Echoes the resolved value whether it was sent or defaulted."}},"required":["grid"],"description":"The switches this projection resolved, echoed so a stored response can be reproduced later."}},"required":["grid","cells","brahmasthan","sources","conventions"]}}}},"400":{"description":"Validation error. `issues[]` lists every failed field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"First issue summary."},"code":{"type":"string","enum":["validation_error"]},"issues":{"type":"array","description":"Every validation failure. Use this to rebuild a valid request.","items":{"type":"object","properties":{"path":{"type":"string","description":"Dot-separated field path, or \"(root)\" for top-level."},"message":{"type":"string"},"code":{"type":"string","description":"Zod issue code (invalid_type, too_small, too_big, invalid_string, ...)."},"expected":{"type":"string","description":"Expected type for invalid_type."},"minimum":{"description":"Minimum bound for too_small issues.","oneOf":[{"type":"number"},{"type":"string"}]},"maximum":{"description":"Maximum bound for too_big issues.","oneOf":[{"type":"number"},{"type":"string"}]},"inclusive":{"type":"boolean"},"format":{"type":"string","description":"Format name for string issues (regex, email, url, uuid)."},"pattern":{"type":"string","description":"Regex pattern when format is regex."}},"required":["path","message"]}}},"required":["error","code","issues"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}},"405":{"description":"Method not allowed. The path exists but only responds to the methods listed in `allow[]` and the `Allow` response header.","headers":{"Allow":{"description":"Comma-separated list of allowed methods (RFC 9110).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["method_not_allowed"]},"allow":{"type":"array","items":{"type":"string"},"description":"Allowed HTTP methods for this path. Mirrors the Allow response header."},"docs":{"type":"string","description":"Link to the product page for this domain."}},"required":["error","code","allow"]}}}},"429":{"description":"Monthly rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}}}}},"/plot":{"post":{"operationId":"calculatePlotAnalysis","tags":["Vastu"],"summary":"Analyse a plot - Vastu land and site assessment API","description":"Vastu plot analysis from typed geometry: send the outline, the facing, where the ground falls and where the water is, and the API returns a verdict on the shape, the proportion, the ground level under two schools, each corner extension and cut, the road and the water. Every verdict names the chapter and verse behind it, or says plainly that it is convention, which matters because the ground level verses and the widely taught modern rule genuinely disagree. Built for listing and land assessment tools, practitioner site reports and buyer facing checks.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["en","tr","de","es","hi","pt","fr","ru","zh-Hans","zh-Hant"],"default":"en","example":"en","description":"Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English."},"required":false,"description":"Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.","name":"lang","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"plot":{"type":"object","properties":{"width":{"type":"number","exclusiveMinimum":0,"example":30,"description":"East-west extent of a rectangular plot, in the unit given. Send this with depth for a rectangle, or send polygon instead."},"depth":{"type":"number","exclusiveMinimum":0,"example":40,"description":"North-south extent of a rectangular plot, in the unit given. Send this with width for a rectangle, or send polygon instead."},"polygon":{"type":"array","items":{"type":"object","properties":{"x":{"type":"number","example":15,"description":"Distance east of the plot origin, in the same unit as the plot. The x axis runs east."},"y":{"type":"number","example":0,"description":"Distance north of the plot origin, in the same unit as the plot. The y axis runs north."}},"required":["x","y"]},"minItems":3,"maxItems":16,"example":[{"x":0,"y":0},{"x":30,"y":0},{"x":30,"y":40},{"x":0,"y":40}],"description":"The plot outline as 3 to 16 vertices in plot coordinates, x east and y north, in either winding order. Use this instead of width and depth for a plot with a cut corner, an extension or an irregular boundary."},"unit":{"type":"string","enum":["feet","metres"],"default":"feet","example":"feet","description":"Unit the plot dimensions are given in. Every distance the response returns is in this same unit. The mandala projection is scale free, so this affects the areas and the marma size and nothing else."}},"description":"The ground the mandala is projected over. Send width and depth for a compass-aligned rectangle, or polygon for anything else. The x axis runs east and the y axis north, and the mandala is aligned to the compass rather than to the building."},"facing":{"type":"string","enum":["North","Northeast","East","Southeast","South","Southwest","West","Northwest"],"example":"North","description":"Direction the front of the house looks out toward, one of the eight compass sectors. Case and punctuation are folded, so north-east, northeast and NorthEast all resolve. Send this or facingDegrees, never both."},"facingDegrees":{"type":"number","minimum":0,"maximum":360,"example":15,"description":"Direction the front of the house looks out toward, as a compass bearing in degrees clockwise from true north, measured looking OUT from the building. The same convention the feng shui facing endpoints use, so a bearing works unchanged across the two domains. Send this or facing, never both."},"slopeLowDirection":{"type":"string","enum":["North","Northeast","East","Southeast","South","Southwest","West","Northwest"],"example":"Northeast","description":"Which quarter of the plot the ground falls toward, that is where the LOW point is. The chapter states its rules in terms of the side that stands HIGHER, so the opposite of this value is what the verses are read against, and both are returned. Omit it if the ground is level."},"road":{"type":"string","enum":["North","Northeast","East","Southeast","South","Southwest","West","Northwest"],"example":"North","description":"Which side a road runs along. The verdict is convention: the chapter states no rule for the side a road is on, only that an obstruction facing the gate brings misery unless it lies beyond twice the height of the house."},"extensions":{"type":"array","items":{"type":"string","enum":["North","Northeast","East","Southeast","South","Southwest","West","Northwest"]},"maxItems":8,"example":["Northeast"],"description":"Quarters where the plot bulges out beyond a rectangle. Every extension verdict is convention: the chapter states no rule for a named corner and the nearest verses speak of a figure with a limb wanting."},"cuts":{"type":"array","items":{"type":"string","enum":["North","Northeast","East","Southeast","South","Southwest","West","Northwest"]},"maxItems":8,"example":["Southwest"],"description":"Quarters where a corner is missing from the rectangle. Every cut verdict is convention, for the same reason as the extensions."},"water":{"type":"string","enum":["North","Northeast","East","Southeast","South","Southwest","West","Northwest"],"example":"Northeast","description":"Which quarter holds standing water, a well, a tank or a sump. This one IS sourced: 53.119 gives a distinct effect for each of the eight directions and calls only the north and the north-east favourable."},"slopeSchool":{"type":"string","enum":["brihat-samhita","modern"],"default":"brihat-samhita","example":"brihat-samhita","description":"Which reading of the ground level to lead with. brihat-samhita applies verses 115 to 117 as written, where a higher north-east is a loss, a higher east or north is permitted when level ground is unavoidable and still carries its stated cost, and a higher south or west carries its cost with no allowance. modern applies the widely taught rule that the north-east must be the lowest point, which agrees with verse 115 and contradicts the verse 116 allowance. Both readings are returned whichever you choose, so the disagreement is visible rather than hidden. Defaults to brihat-samhita."}},"required":["plot"]}}}},"responses":{"200":{"description":"Shape, proportion, ground level under both schools, corners, road and water verdicts","content":{"application/json":{"schema":{"type":"object","properties":{"orientation":{"type":"object","properties":{"facing":{"type":"string","example":"Northeast","description":"Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against and against the same value on the feng shui and I Ching endpoints."},"sitting":{"type":"string","example":"South","description":"The sector directly opposite the facing, which is the back of the building. Always English."},"facingDegrees":{"type":"number","example":15,"description":"The bearing you sent, echoed. Absent when you named a sector instead of a bearing."},"mountain":{"type":"string","example":"N3","description":"The 15 degree mountain the bearing fell in, in the compass label form the feng shui endpoints use. Absent when you named a sector instead of a bearing, since a sector spans three mountains."}},"required":["facing","sitting"],"description":"Which way the building looks and which way it sits. Resolved through the same 24 mountain table the feng shui facing endpoints use, so a bearing lands in the same sector on both domains."},"dimensions":{"type":"object","properties":{"length":{"type":"number","example":40,"description":"North-south extent of the plot, in the unit you sent."},"breadth":{"type":"number","example":30,"description":"East-west extent of the plot, in the unit you sent."},"area":{"type":"number","example":1200,"description":"Area enclosed by the outline, in the square of your unit. Computed from the polygon, so a cut corner reduces it."},"ratio":{"type":"number","example":1.333,"description":"Length divided by breadth. The chapter has exactly one rank-independent ratio rule, twice the breadth for a house with an inner hall, and no band at all for anything else."}},"required":["length","breadth","area","ratio"],"description":"What the outline measures, in the unit you sent."},"shape":{"type":"object","properties":{"verdict":{"type":"string","example":"irregular","description":"How the reading lands. Always English, safe to compare against and to key styling on."},"effect":{"type":"string","example":"The ground is not a regular four sided figure. The chapter gives the death of kinsmen for an irregular shape and barrenness for irregular sides.","description":"What the verdict means, as original prose. Translated in place when lang is set to a language other than English."},"source":{"type":"object","properties":{"text":{"type":"string","example":"Brihat Samhita","description":"The primary text this verdict rests on, or the literal value convention where no verse states the rule. Always English, safe to compare against."},"chapter":{"type":"number","example":53,"description":"Chapter of the primary text. Absent on a convention, which has no chapter to cite."},"verse":{"type":"string","example":"118","description":"Verse or verse range inside the chapter. Absent on a convention. A range is written with a hyphen, as in 115-117."},"translation":{"type":"string","example":"N. Chidambaram Iyer","description":"Translator of the edition the verse was read in. Absent on a convention."},"year":{"type":"number","example":1884,"description":"Publication year of that edition. Absent on a convention."},"publicDomain":{"type":"boolean","example":true,"description":"Whether the cited edition is in the public domain. True on the 1884 Brihat Samhita edition, whose verses are quoted. False on the 1933 Manasara edition behind the Ayadi formulas, from which only the multipliers, divisors and names are taken, never a sentence."},"basis":{"type":"string","example":"the south-west placement of the principal bedroom is later Vastu practice; chapter 53 places no bedroom","description":"Why a convention rule says what it says. Present only when text is convention, and it names the tradition the rule comes from rather than a verse."}},"required":["text"],"description":"Where a verdict comes from: a chapter and verse of a named public-domain edition, or the literal convention with the practice it rests on. Every verdict in this domain carries one."}},"required":["verdict","effect","source"],"description":"Whether the ground is a regular four sided figure, per 53.115, which gives the death of kinsmen for an irregular shape and barrenness for irregular sides."},"ratio":{"type":"object","properties":{"verdict":{"type":"string","example":"irregular","description":"How the reading lands. Always English, safe to compare against and to key styling on."},"effect":{"type":"string","example":"The ground is not a regular four sided figure. The chapter gives the death of kinsmen for an irregular shape and barrenness for irregular sides.","description":"What the verdict means, as original prose. Translated in place when lang is set to a language other than English."},"source":{"type":"object","properties":{"text":{"type":"string","example":"Brihat Samhita","description":"The primary text this verdict rests on, or the literal value convention where no verse states the rule. Always English, safe to compare against."},"chapter":{"type":"number","example":53,"description":"Chapter of the primary text. Absent on a convention, which has no chapter to cite."},"verse":{"type":"string","example":"118","description":"Verse or verse range inside the chapter. Absent on a convention. A range is written with a hyphen, as in 115-117."},"translation":{"type":"string","example":"N. Chidambaram Iyer","description":"Translator of the edition the verse was read in. Absent on a convention."},"year":{"type":"number","example":1884,"description":"Publication year of that edition. Absent on a convention."},"publicDomain":{"type":"boolean","example":true,"description":"Whether the cited edition is in the public domain. True on the 1884 Brihat Samhita edition, whose verses are quoted. False on the 1933 Manasara edition behind the Ayadi formulas, from which only the multipliers, divisors and names are taken, never a sentence."},"basis":{"type":"string","example":"the south-west placement of the principal bedroom is later Vastu practice; chapter 53 places no bedroom","description":"Why a convention rule says what it says. Present only when text is convention, and it names the tradition the rule comes from rather than a verse."}},"required":["text"],"description":"Where a verdict comes from: a chapter and verse of a named public-domain edition, or the literal convention with the practice it rests on. Every verdict in this domain carries one."}},"required":["verdict","effect","source"],"description":"How the proportion reads. The one sourced verdict is the doubled length of 53.11; everything else is a modern band and is labelled convention, because no rank-independent ratio rule exists in the chapter at all."},"slope":{"type":"object","properties":{"lowDirection":{"type":"string","example":"Northeast","description":"The quarter you said the ground falls toward, echoed."},"highDirection":{"type":"string","example":"Southwest","description":"The quarter that therefore stands higher, which is what the verses are stated in terms of."},"reading":{"type":"string","example":"The high ground lies to the Southwest and the low ground to the Northeast.","description":"The ground level as a sentence, for a report. Translated in place when lang is set."},"schools":{"type":"array","items":{"type":"object","properties":{"school":{"type":"string","example":"brihat-samhita","description":"Which reading this verdict follows. Always English, safe to compare against."},"verdict":{"type":"string","example":"not-stated","description":"How that reading lands: auspicious, permitted where a slight rise is expressly allowed, inauspicious, or not-stated where the chapter gives no effect for a rise in that quarter. Always English."},"verse":{"type":"string","example":"53.117","description":"The verse the reading rests on. Empty on the modern school, which rests on teaching practice rather than on a verse."},"effect":{"type":"string","example":"Hatred of friends.","description":"What that reading says follows, as original prose. Translated in place when lang is set."}},"required":["school","verdict","verse","effect"]},"description":"Both readings, always, whichever school you asked for. The two genuinely disagree where a slight rise on the east or the north is unavoidable: the chapter allows it and the modern rule does not, and publishing both is what lets a practitioner reconcile our verdict with their teacher."},"chosen":{"type":"string","example":"brihat-samhita","description":"Which of the two readings you asked to lead with, echoed."}},"required":["lowDirection","highDirection","reading","schools","chosen"],"description":"The ground level under both schools. Absent when you sent no low direction, which is how you say the ground is level."},"water":{"type":"object","properties":{"direction":{"type":"string","example":"Northeast","description":"Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against and against the same value on the feng shui and I Ching endpoints."},"effect":{"type":"string","example":"Sons.","description":"What 53.119 gives for standing water in that quarter, as original prose. Translated in place when lang is set."},"auspiciousness":{"type":"string","example":"inauspicious","description":"How the stated effect reads: auspicious for a gain, inauspicious for a harm, mixed where the text names a gain and a loss together. A RoxyAPI classification of the verse effect rather than a word in the text, and always English so it is safe to key styling on."},"source":{"type":"object","properties":{"text":{"type":"string","example":"Brihat Samhita","description":"The primary text this verdict rests on, or the literal value convention where no verse states the rule. Always English, safe to compare against."},"chapter":{"type":"number","example":53,"description":"Chapter of the primary text. Absent on a convention, which has no chapter to cite."},"verse":{"type":"string","example":"118","description":"Verse or verse range inside the chapter. Absent on a convention. A range is written with a hyphen, as in 115-117."},"translation":{"type":"string","example":"N. Chidambaram Iyer","description":"Translator of the edition the verse was read in. Absent on a convention."},"year":{"type":"number","example":1884,"description":"Publication year of that edition. Absent on a convention."},"publicDomain":{"type":"boolean","example":true,"description":"Whether the cited edition is in the public domain. True on the 1884 Brihat Samhita edition, whose verses are quoted. False on the 1933 Manasara edition behind the Ayadi formulas, from which only the multipliers, divisors and names are taken, never a sentence."},"basis":{"type":"string","example":"the south-west placement of the principal bedroom is later Vastu practice; chapter 53 places no bedroom","description":"Why a convention rule says what it says. Present only when text is convention, and it names the tradition the rule comes from rather than a verse."}},"required":["text"],"description":"Where a verdict comes from: a chapter and verse of a named public-domain edition, or the literal convention with the practice it rests on. Every verdict in this domain carries one."}},"required":["direction","effect","auspiciousness","source"],"description":"What the chapter says about standing water in the quarter you named. Only the north and the north-east are favourable, and each of the other six carries its own harm. Absent when you named no water."},"extensions":{"type":"array","items":{"type":"object","properties":{"direction":{"type":"string","example":"Northeast","description":"Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against and against the same value on the feng shui and I Ching endpoints."},"auspiciousness":{"type":"string","example":"inauspicious","description":"How the stated effect reads: auspicious for a gain, inauspicious for a harm, mixed where the text names a gain and a loss together. A RoxyAPI classification of the verse effect rather than a word in the text, and always English so it is safe to key styling on."},"effect":{"type":"string","example":"An extension of the north-east quarter is the one enlargement modern practice treats as favourable. The chapter itself states no rule for a corner extension.","description":"What the reading says, as original prose that names its own basis."},"source":{"type":"object","properties":{"text":{"type":"string","example":"Brihat Samhita","description":"The primary text this verdict rests on, or the literal value convention where no verse states the rule. Always English, safe to compare against."},"chapter":{"type":"number","example":53,"description":"Chapter of the primary text. Absent on a convention, which has no chapter to cite."},"verse":{"type":"string","example":"118","description":"Verse or verse range inside the chapter. Absent on a convention. A range is written with a hyphen, as in 115-117."},"translation":{"type":"string","example":"N. Chidambaram Iyer","description":"Translator of the edition the verse was read in. Absent on a convention."},"year":{"type":"number","example":1884,"description":"Publication year of that edition. Absent on a convention."},"publicDomain":{"type":"boolean","example":true,"description":"Whether the cited edition is in the public domain. True on the 1884 Brihat Samhita edition, whose verses are quoted. False on the 1933 Manasara edition behind the Ayadi formulas, from which only the multipliers, divisors and names are taken, never a sentence."},"basis":{"type":"string","example":"the south-west placement of the principal bedroom is later Vastu practice; chapter 53 places no bedroom","description":"Why a convention rule says what it says. Present only when text is convention, and it names the tradition the rule comes from rather than a verse."}},"required":["text"],"description":"Where a verdict comes from: a chapter and verse of a named public-domain edition, or the literal convention with the practice it rests on. Every verdict in this domain carries one."}},"required":["direction","auspiciousness","effect","source"]},"description":"A verdict per extended quarter, every one of them convention. Empty when you named none."},"cuts":{"type":"array","items":{"type":"object","properties":{"direction":{"type":"string","example":"Northeast","description":"Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against and against the same value on the feng shui and I Ching endpoints."},"auspiciousness":{"type":"string","example":"inauspicious","description":"How the stated effect reads: auspicious for a gain, inauspicious for a harm, mixed where the text names a gain and a loss together. A RoxyAPI classification of the verse effect rather than a word in the text, and always English so it is safe to key styling on."},"effect":{"type":"string","example":"Modern practice treats a missing corner as unfavourable. The chapter itself states no rule for a cut, and the nearest verses give the loss of wealth, grain or virtue where the figure of the Vastupurusha has an arm or a head wanting.","description":"What the reading says, as original prose that names its own basis."},"source":{"type":"object","properties":{"text":{"type":"string","example":"Brihat Samhita","description":"The primary text this verdict rests on, or the literal value convention where no verse states the rule. Always English, safe to compare against."},"chapter":{"type":"number","example":53,"description":"Chapter of the primary text. Absent on a convention, which has no chapter to cite."},"verse":{"type":"string","example":"118","description":"Verse or verse range inside the chapter. Absent on a convention. A range is written with a hyphen, as in 115-117."},"translation":{"type":"string","example":"N. Chidambaram Iyer","description":"Translator of the edition the verse was read in. Absent on a convention."},"year":{"type":"number","example":1884,"description":"Publication year of that edition. Absent on a convention."},"publicDomain":{"type":"boolean","example":true,"description":"Whether the cited edition is in the public domain. True on the 1884 Brihat Samhita edition, whose verses are quoted. False on the 1933 Manasara edition behind the Ayadi formulas, from which only the multipliers, divisors and names are taken, never a sentence."},"basis":{"type":"string","example":"the south-west placement of the principal bedroom is later Vastu practice; chapter 53 places no bedroom","description":"Why a convention rule says what it says. Present only when text is convention, and it names the tradition the rule comes from rather than a verse."}},"required":["text"],"description":"Where a verdict comes from: a chapter and verse of a named public-domain edition, or the literal convention with the practice it rests on. Every verdict in this domain carries one."}},"required":["direction","auspiciousness","effect","source"]},"description":"A verdict per cut quarter, every one of them convention."},"road":{"type":"object","properties":{"direction":{"type":"string","example":"Northeast","description":"Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against and against the same value on the feng shui and I Ching endpoints."},"auspiciousness":{"type":"string","example":"inauspicious","description":"How the stated effect reads: auspicious for a gain, inauspicious for a harm, mixed where the text names a gain and a loss together. A RoxyAPI classification of the verse effect rather than a word in the text, and always English so it is safe to key styling on."},"effect":{"type":"string","example":"Modern practice reads a road on the north or the east as favourable. The chapter states no rule for the side a road runs on.","description":"What the reading says, as original prose that names its own basis."},"source":{"type":"object","properties":{"text":{"type":"string","example":"Brihat Samhita","description":"The primary text this verdict rests on, or the literal value convention where no verse states the rule. Always English, safe to compare against."},"chapter":{"type":"number","example":53,"description":"Chapter of the primary text. Absent on a convention, which has no chapter to cite."},"verse":{"type":"string","example":"118","description":"Verse or verse range inside the chapter. Absent on a convention. A range is written with a hyphen, as in 115-117."},"translation":{"type":"string","example":"N. Chidambaram Iyer","description":"Translator of the edition the verse was read in. Absent on a convention."},"year":{"type":"number","example":1884,"description":"Publication year of that edition. Absent on a convention."},"publicDomain":{"type":"boolean","example":true,"description":"Whether the cited edition is in the public domain. True on the 1884 Brihat Samhita edition, whose verses are quoted. False on the 1933 Manasara edition behind the Ayadi formulas, from which only the multipliers, divisors and names are taken, never a sentence."},"basis":{"type":"string","example":"the south-west placement of the principal bedroom is later Vastu practice; chapter 53 places no bedroom","description":"Why a convention rule says what it says. Present only when text is convention, and it names the tradition the rule comes from rather than a verse."}},"required":["text"],"description":"Where a verdict comes from: a chapter and verse of a named public-domain edition, or the literal convention with the practice it rests on. Every verdict in this domain carries one."}},"required":["direction","auspiciousness","effect","source"],"description":"The convention verdict on the side a road runs, with the sourced obstruction rule quoted in the sources list beside it. Absent when you named no road."},"sources":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","example":"Brihat Samhita","description":"The primary text this verdict rests on, or the literal value convention where no verse states the rule. Always English, safe to compare against."},"chapter":{"type":"number","example":53,"description":"Chapter of the primary text. Absent on a convention, which has no chapter to cite."},"verse":{"type":"string","example":"118","description":"Verse or verse range inside the chapter. Absent on a convention. A range is written with a hyphen, as in 115-117."},"translation":{"type":"string","example":"N. Chidambaram Iyer","description":"Translator of the edition the verse was read in. Absent on a convention."},"year":{"type":"number","example":1884,"description":"Publication year of that edition. Absent on a convention."},"publicDomain":{"type":"boolean","example":true,"description":"Whether the cited edition is in the public domain. True on the 1884 Brihat Samhita edition, whose verses are quoted. False on the 1933 Manasara edition behind the Ayadi formulas, from which only the multipliers, divisors and names are taken, never a sentence."},"basis":{"type":"string","example":"the south-west placement of the principal bedroom is later Vastu practice; chapter 53 places no bedroom","description":"Why a convention rule says what it says. Present only when text is convention, and it names the tradition the rule comes from rather than a verse."}},"required":["text"],"description":"Where a verdict comes from: a chapter and verse of a named public-domain edition, or the literal convention with the practice it rests on. Every verdict in this domain carries one."},"description":"Every verse and every convention this analysis rests on, so a report can print the citation beside each verdict."},"conventions":{"type":"object","properties":{"slopeSchool":{"type":"string","example":"brihat-samhita","description":"Which ground level reading was asked to lead. Echoes the resolved value whether it was sent or defaulted."}},"required":["slopeSchool"],"description":"The switches this analysis resolved, echoed so it can be reproduced later."}},"required":["orientation","dimensions","shape","ratio","extensions","cuts","sources","conventions"]}}}},"400":{"description":"Validation error. `issues[]` lists every failed field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"First issue summary."},"code":{"type":"string","enum":["validation_error"]},"issues":{"type":"array","description":"Every validation failure. Use this to rebuild a valid request.","items":{"type":"object","properties":{"path":{"type":"string","description":"Dot-separated field path, or \"(root)\" for top-level."},"message":{"type":"string"},"code":{"type":"string","description":"Zod issue code (invalid_type, too_small, too_big, invalid_string, ...)."},"expected":{"type":"string","description":"Expected type for invalid_type."},"minimum":{"description":"Minimum bound for too_small issues.","oneOf":[{"type":"number"},{"type":"string"}]},"maximum":{"description":"Maximum bound for too_big issues.","oneOf":[{"type":"number"},{"type":"string"}]},"inclusive":{"type":"boolean"},"format":{"type":"string","description":"Format name for string issues (regex, email, url, uuid)."},"pattern":{"type":"string","description":"Regex pattern when format is regex."}},"required":["path","message"]}}},"required":["error","code","issues"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}},"405":{"description":"Method not allowed. The path exists but only responds to the methods listed in `allow[]` and the `Allow` response header.","headers":{"Allow":{"description":"Comma-separated list of allowed methods (RFC 9110).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["method_not_allowed"]},"allow":{"type":"array","items":{"type":"string"},"description":"Allowed HTTP methods for this path. Mirrors the Allow response header."},"docs":{"type":"string","description":"Link to the product page for this domain."}},"required":["error","code","allow"]}}}},"429":{"description":"Monthly rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}}}}},"/ayadi":{"post":{"operationId":"calculateAyadi","tags":["Vastu"],"summary":"Calculate Ayadi shadvarga - Vastu proportion and yoni calculator API","description":"Ayadi shadvarga calculator for a building or a room: send the dimensions and the API returns all six proportional formulas with the multiplier, the divisor and the remainder shown, the member each remainder names, and the two verdict rules the texts state. Choose between three text families, which genuinely disagree, and choose your own cubit length, because every remainder is unit sensitive. Built for practitioner tools, plan checking software and anyone who has to justify a dimension rather than assert it.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["en","tr","de","es","hi","pt","fr","ru","zh-Hans","zh-Hant"],"default":"en","example":"en","description":"Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English."},"required":false,"description":"Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.","name":"lang","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"length":{"type":"number","exclusiveMinimum":0,"example":11,"description":"Length of the building or room, in the unit given. Under the Manasara family this is the measure the aya and rksha formulas multiply; under the perimeter family it only feeds the perimeter."},"breadth":{"type":"number","exclusiveMinimum":0,"example":11,"description":"Breadth of the building or room, in the unit given. Under the Manasara family this is the measure the vyaya and yoni formulas multiply."},"perimeter":{"type":"number","exclusiveMinimum":0,"example":11,"description":"Perimeter of the plan, if it is not simply twice the length plus twice the breadth. The perimeter family runs every formula on this one measure, so it is the number that decides all six remainders there."},"circumference":{"type":"number","exclusiveMinimum":0,"example":11,"description":"Circumference or height, if the Manasara vara and tithi formulas should read something other than the perimeter. Defaults to the perimeter, which is what a rectangular plan supplies."},"unit":{"type":"string","enum":["hasta","feet","metres"],"default":"hasta","example":"hasta","description":"Unit the Ayadi dimensions are given in. Every remainder is unit sensitive, so this is an input and never assumed: the same building measured in cubits and in feet gives different remainders. hasta is the classical cubit and needs no conversion; feet and metres are converted using hastaInches and rounded to whole cubits, and the rounded figures are returned. Defaults to hasta."},"hastaInches":{"type":"number","exclusiveMinimum":0,"default":18,"example":18,"description":"Length of one hasta, the classical cubit, in inches. Defaults to 18, which is 24 angula at three quarters of an inch each and is the value three independent sources agree on. Raise it if your lineage measures the cubit differently; the value used is echoed on the response so a stored reading can be reproduced years later. Only used when unit is feet or metres."},"ayadiText":{"type":"string","enum":["manasara","perimeter-texts","utpala"],"default":"manasara","example":"manasara","description":"Which family of Ayadi formulas to apply. manasara takes length, breadth and circumference separately and is double sourced. perimeter-texts runs every formula on the perimeter alone and is the family the usual worked example is printed for. utpala supplies a yoni formula from the length times the breadth and nothing else, so the other five vargas fall back to the perimeter family and the response says so. Defaults to manasara."},"vyayaFormula":{"type":"string","enum":["p9-10","p3-14"],"default":"p9-10","example":"p9-10","description":"Which vyaya formula the perimeter family uses. The printed table gives two joined by the word or and states no rule for choosing. p9-10 multiplies by nine and divides by ten, which is the only divisor consistent with the ten member vyaya group, so its remainder can be placed in that group and it is the default. p3-14 multiplies by three and divides by fourteen, and its remainder maps to no group any source enumerates. Ignored when ayadiText is manasara, which has one vyaya formula."}},"required":["length","breadth"]}}}},"responses":{"200":{"description":"The six vargas with their arithmetic, the vayas quotient and the verdict","content":{"application/json":{"schema":{"type":"object","properties":{"measures":{"type":"object","properties":{"length":{"type":"number","example":11,"description":"Length in whole hasta, after conversion and rounding."},"breadth":{"type":"number","example":11,"description":"Breadth in whole hasta, after conversion and rounding."},"perimeter":{"type":"number","example":11,"description":"Perimeter in whole hasta, either as you sent it or as twice length plus twice breadth."},"circumference":{"type":"number","example":11,"description":"Circumference in whole hasta, defaulting to the perimeter."},"area":{"type":"number","example":121,"description":"Length times breadth in whole hasta squared, which is the measure the Utpala yoni formula reads."}},"required":["length","breadth","perimeter","circumference","area"],"description":"What was actually divided, in whole cubits. Every remainder is unit sensitive and the formulas are integer arithmetic, so a measure sent in feet or metres is converted and rounded and the rounded figure is published here rather than left for you to infer."},"vargas":{"type":"array","items":{"type":"object","properties":{"varga":{"type":"string","example":"yoni","description":"Which of the six proportional formulas this row is: aya, vyaya, yoni, rksha, tithi or vara. Always English, safe to compare against."},"operand":{"type":"string","example":"perimeter","description":"Which measure the formula multiplied: length, breadth, circumference, perimeter or area. This is where the three text families differ most, since the Manasara reads three measures separately and the perimeter family reads one."},"operandValue":{"type":"number","example":11,"description":"The measure in whole hasta, after any conversion and rounding. This is the number actually multiplied, so a surprising remainder can be traced to it."},"multiplier":{"type":"number","example":3,"description":"What the measure was multiplied by, per the formula of the chosen text family."},"divisor":{"type":"number","example":8,"description":"What the product was divided by, which is also the size of the group named."},"product":{"type":"number","example":33,"description":"The measure times the multiplier, shown so the arithmetic can be checked by hand."},"remainder":{"type":"number","example":1,"description":"What the division left. This is the Ayadi result: the remainder, not the quotient, names the member of the group."},"groupSize":{"type":"number","example":8,"description":"How many members the group has. Aya is a group of twelve and vyaya a group of ten, which is stated in the text even though the names are not."},"name":{"type":"string","example":"Dhvaja","description":"The member the remainder names. Present for the four groups whose names are sourced: the eight yonis, the 27 nakshatras, the 30 tithis and the seven varas. Absent for aya and vyaya, whose names beyond the first are printed in no public-domain source and are never invented here."},"firstName":{"type":"string","example":"Siddhi","description":"The first member of the group, for the two groups where that is all any source gives. Present on aya and on vyaya, and on nothing else."},"gloss":{"type":"string","example":"flag","description":"What the yoni name means in plain words. Present on the yoni row only, and translated in place when lang is set."},"auspicious":{"type":"boolean","example":true,"description":"Whether this remainder is favourable under the rule the text states for that group: the odd yonis, the odd nakshatras, and four of the seven varas. Absent where no source states a rule for the group."},"source":{"type":"object","properties":{"text":{"type":"string","example":"Brihat Samhita","description":"The primary text this verdict rests on, or the literal value convention where no verse states the rule. Always English, safe to compare against."},"chapter":{"type":"number","example":53,"description":"Chapter of the primary text. Absent on a convention, which has no chapter to cite."},"verse":{"type":"string","example":"118","description":"Verse or verse range inside the chapter. Absent on a convention. A range is written with a hyphen, as in 115-117."},"translation":{"type":"string","example":"N. Chidambaram Iyer","description":"Translator of the edition the verse was read in. Absent on a convention."},"year":{"type":"number","example":1884,"description":"Publication year of that edition. Absent on a convention."},"publicDomain":{"type":"boolean","example":true,"description":"Whether the cited edition is in the public domain. True on the 1884 Brihat Samhita edition, whose verses are quoted. False on the 1933 Manasara edition behind the Ayadi formulas, from which only the multipliers, divisors and names are taken, never a sentence."},"basis":{"type":"string","example":"the south-west placement of the principal bedroom is later Vastu practice; chapter 53 places no bedroom","description":"Why a convention rule says what it says. Present only when text is convention, and it names the tradition the rule comes from rather than a verse."}},"required":["text"],"description":"Where a verdict comes from: a chapter and verse of a named public-domain edition, or the literal convention with the practice it rests on. Every verdict in this domain carries one."}},"required":["varga","operand","operandValue","multiplier","divisor","product","remainder","groupSize","source"]},"description":"The six proportional formulas, each with its measure, multiplier, divisor, remainder and the member that remainder names."},"vayas":{"type":"number","example":3,"description":"The seventh formula of the perimeter family, which takes the QUOTIENT of the perimeter times eight over twenty seven where rksha takes the remainder. An age or span rather than a member of a named group, and not part of the Manasara six."},"verdict":{"type":"object","properties":{"yoniAuspicious":{"type":"boolean","example":true,"description":"Whether the yoni is one of the four favourable members. A remainder of zero is a reject rather than the eighth name, because a zero remainder would face the building north-east and the reference rule says the proportions must be altered instead."},"ayaVyaya":{"type":"string","example":"aya-greater","description":"How the aya compares with the vyaya: aya-greater is conducive to prosperity, equal carries no defect, aya-lesser is defective, and zero-remainder means one of the two divided exactly, which the text calls auspicious in its own right. Always English, safe to compare against."},"reading":{"type":"string","example":"The yoni remainder is 1, which names Dhvaja, the flag. The aya remainder 4 exceeds the vyaya remainder 9, which the text calls conducive to prosperity.","description":"The verdict as a sentence, for a report. Composed from the yoni and the aya against vyaya rule, and translated in place when lang is set."},"source":{"type":"object","properties":{"text":{"type":"string","example":"Brihat Samhita","description":"The primary text this verdict rests on, or the literal value convention where no verse states the rule. Always English, safe to compare against."},"chapter":{"type":"number","example":53,"description":"Chapter of the primary text. Absent on a convention, which has no chapter to cite."},"verse":{"type":"string","example":"118","description":"Verse or verse range inside the chapter. Absent on a convention. A range is written with a hyphen, as in 115-117."},"translation":{"type":"string","example":"N. Chidambaram Iyer","description":"Translator of the edition the verse was read in. Absent on a convention."},"year":{"type":"number","example":1884,"description":"Publication year of that edition. Absent on a convention."},"publicDomain":{"type":"boolean","example":true,"description":"Whether the cited edition is in the public domain. True on the 1884 Brihat Samhita edition, whose verses are quoted. False on the 1933 Manasara edition behind the Ayadi formulas, from which only the multipliers, divisors and names are taken, never a sentence."},"basis":{"type":"string","example":"the south-west placement of the principal bedroom is later Vastu practice; chapter 53 places no bedroom","description":"Why a convention rule says what it says. Present only when text is convention, and it names the tradition the rule comes from rather than a verse."}},"required":["text"],"description":"Where a verdict comes from: a chapter and verse of a named public-domain edition, or the literal convention with the practice it rests on. Every verdict in this domain carries one."}},"required":["yoniAuspicious","ayaVyaya","reading","source"],"description":"The two verdict rules the texts actually state: the yoni must be one of the four favourable members, and the aya remainder should exceed the vyaya remainder."},"conventions":{"type":"object","properties":{"ayadiText":{"type":"string","example":"manasara","description":"Which family of formulas was applied. Echoes the resolved value."},"vyayaFormula":{"type":"string","example":"p9-10","description":"Which of the two perimeter vyaya formulas was applied. Echoed even under the Manasara family, which has one vyaya formula and ignores it, so a stored response always says what was resolved."},"unit":{"type":"string","example":"hasta","description":"Which unit the dimensions arrived in. Echoes the resolved value."},"hastaInches":{"type":"number","example":18,"description":"How long one hasta was taken to be, in inches. Echoed because the remainders are unit sensitive and a stored reading cannot be reproduced without it."}},"required":["ayadiText","vyayaFormula","unit","hastaInches"],"description":"The switches this calculation resolved, echoed so it can be reproduced years later without knowing what the defaults were on the day it was made."}},"required":["measures","vargas","vayas","verdict","conventions"]}}}},"400":{"description":"Validation error. `issues[]` lists every failed field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"First issue summary."},"code":{"type":"string","enum":["validation_error"]},"issues":{"type":"array","description":"Every validation failure. Use this to rebuild a valid request.","items":{"type":"object","properties":{"path":{"type":"string","description":"Dot-separated field path, or \"(root)\" for top-level."},"message":{"type":"string"},"code":{"type":"string","description":"Zod issue code (invalid_type, too_small, too_big, invalid_string, ...)."},"expected":{"type":"string","description":"Expected type for invalid_type."},"minimum":{"description":"Minimum bound for too_small issues.","oneOf":[{"type":"number"},{"type":"string"}]},"maximum":{"description":"Maximum bound for too_big issues.","oneOf":[{"type":"number"},{"type":"string"}]},"inclusive":{"type":"boolean"},"format":{"type":"string","description":"Format name for string issues (regex, email, url, uuid)."},"pattern":{"type":"string","description":"Regex pattern when format is regex."}},"required":["path","message"]}}},"required":["error","code","issues"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}},"405":{"description":"Method not allowed. The path exists but only responds to the methods listed in `allow[]` and the `Allow` response header.","headers":{"Allow":{"description":"Comma-separated list of allowed methods (RFC 9110).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["method_not_allowed"]},"allow":{"type":"array","items":{"type":"string"},"description":"Allowed HTTP methods for this path. Mirrors the Allow response header."},"docs":{"type":"string","description":"Link to the product page for this domain."}},"required":["error","code","allow"]}}}},"429":{"description":"Monthly rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}}}}},"/rooms":{"post":{"operationId":"calculateRoomCompliance","tags":["Vastu"],"summary":"Check room placement - Vastu room direction compliance API","description":"Vastu room direction check for a whole floor plan: send the plot and a list of rooms, by quarter or by outline, and the API returns a verdict per room with the quarters it belongs in, the quarters to keep it out of, a remedy when it is misplaced, and a composite score with the weights published. Four of the twelve room types carry a chapter and verse and the other eight are labelled convention, so a report can say which half of it is classical. Built for floor plan tools, listing checks and practitioner reports.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["en","tr","de","es","hi","pt","fr","ru","zh-Hans","zh-Hant"],"default":"en","example":"en","description":"Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English."},"required":false,"description":"Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.","name":"lang","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"plot":{"type":"object","properties":{"width":{"type":"number","exclusiveMinimum":0,"example":30,"description":"East-west extent of a rectangular plot, in the unit given. Send this with depth for a rectangle, or send polygon instead."},"depth":{"type":"number","exclusiveMinimum":0,"example":40,"description":"North-south extent of a rectangular plot, in the unit given. Send this with width for a rectangle, or send polygon instead."},"polygon":{"type":"array","items":{"type":"object","properties":{"x":{"type":"number","example":15,"description":"Distance east of the plot origin, in the same unit as the plot. The x axis runs east."},"y":{"type":"number","example":0,"description":"Distance north of the plot origin, in the same unit as the plot. The y axis runs north."}},"required":["x","y"]},"minItems":3,"maxItems":16,"example":[{"x":0,"y":0},{"x":30,"y":0},{"x":30,"y":40},{"x":0,"y":40}],"description":"The plot outline as 3 to 16 vertices in plot coordinates, x east and y north, in either winding order. Use this instead of width and depth for a plot with a cut corner, an extension or an irregular boundary."},"unit":{"type":"string","enum":["feet","metres"],"default":"feet","example":"feet","description":"Unit the plot dimensions are given in. Every distance the response returns is in this same unit. The mandala projection is scale free, so this affects the areas and the marma size and nothing else."}},"description":"The ground the mandala is projected over. Send width and depth for a compass-aligned rectangle, or polygon for anything else. The x axis runs east and the y axis north, and the mandala is aligned to the compass rather than to the building."},"facing":{"type":"string","enum":["North","Northeast","East","Southeast","South","Southwest","West","Northwest"],"example":"North","description":"Direction the front of the house looks out toward, one of the eight compass sectors. Case and punctuation are folded, so north-east, northeast and NorthEast all resolve. Send this or facingDegrees, never both."},"facingDegrees":{"type":"number","minimum":0,"maximum":360,"example":15,"description":"Direction the front of the house looks out toward, as a compass bearing in degrees clockwise from true north, measured looking OUT from the building. The same convention the feng shui facing endpoints use, so a bearing works unchanged across the two domains. Send this or facing, never both."},"rooms":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["puja","kitchen","master-bedroom","bedroom","living","dining","study","toilet","store","staircase","water-storage","entrance"],"example":"kitchen","description":"What the room is, one of puja, kitchen, master-bedroom, bedroom, living, dining, study, toilet, store, staircase, water-storage, entrance. Case and punctuation are folded, so Master Bedroom and master_bedroom both resolve. Four of the twelve carry a verse and the rest carry convention, and the response says which."},"direction":{"type":"string","enum":["North","Northeast","East","Southeast","South","Southwest","West","Northwest"],"example":"Southeast","description":"Which quarter of the plot the room sits in, if you already know it. Send this or polygon, never both."},"polygon":{"type":"array","items":{"type":"object","properties":{"x":{"type":"number","example":15,"description":"Distance east of the plot origin, in the same unit as the plot. The x axis runs east."},"y":{"type":"number","example":0,"description":"Distance north of the plot origin, in the same unit as the plot. The y axis runs north."}},"required":["x","y"]},"minItems":3,"maxItems":16,"example":[{"x":20,"y":2},{"x":28,"y":2},{"x":28,"y":12},{"x":20,"y":12}],"description":"The room outline in plot coordinates, 3 to 16 vertices. The quarter is read from the area centroid against thirds of the plot, so an L-shaped room lands where its mass is rather than where its corners are. Send this or direction, never both."}},"required":["type"]},"minItems":1,"maxItems":24,"description":"The rooms to check, 1 to 24 of them. Each carries a type and either the quarter it sits in or its outline."}},"required":["plot","rooms"]}}}},"responses":{"200":{"description":"A verdict per room, the composite score and the weights behind it","content":{"application/json":{"schema":{"type":"object","properties":{"rooms":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","example":"kitchen","description":"The room type, echoed in its canonical spelling. Always English, safe to compare against."},"zone":{"type":"string","example":"Southeast","description":"Which of the nine zones the room occupies: one of the eight compass sectors, or Center for the middle ninth, which is the brahmasthan. Always English."},"verdict":{"type":"string","example":"ideal","description":"How the placement reads: ideal where the room sits where its rule puts it, avoid where it sits where the rule warns against, acceptable for everything between. Always English, safe to key styling on."},"idealDirections":{"type":"array","items":{"type":"string","example":"Northeast","description":"Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against and against the same value on the feng shui and I Ching endpoints."},"example":["Southeast"],"description":"The quarters this room type belongs in under its rule."},"avoidDirections":{"type":"array","items":{"type":"string","example":"Northeast","description":"Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against and against the same value on the feng shui and I Ching endpoints."},"example":["Northeast"],"description":"The quarters this room type should be kept out of under its rule."},"reading":{"type":"string","example":"The kitchen stands in the Southeast quarter, which is where it belongs.","description":"The placement as a sentence, for a report. Translated in place when lang is set to a language other than English."},"remedy":{"type":"string","example":"Move the cooking hearth to the south-east quarter, which is where the chapter puts the kitchen. Where the room cannot move, shift the hob itself to the south-east corner of the room and cook facing east.","description":"What to do when the room is not where it belongs. Original prose, translated in place when lang is set."},"source":{"type":"object","properties":{"text":{"type":"string","example":"Brihat Samhita","description":"The primary text this verdict rests on, or the literal value convention where no verse states the rule. Always English, safe to compare against."},"chapter":{"type":"number","example":53,"description":"Chapter of the primary text. Absent on a convention, which has no chapter to cite."},"verse":{"type":"string","example":"118","description":"Verse or verse range inside the chapter. Absent on a convention. A range is written with a hyphen, as in 115-117."},"translation":{"type":"string","example":"N. Chidambaram Iyer","description":"Translator of the edition the verse was read in. Absent on a convention."},"year":{"type":"number","example":1884,"description":"Publication year of that edition. Absent on a convention."},"publicDomain":{"type":"boolean","example":true,"description":"Whether the cited edition is in the public domain. True on the 1884 Brihat Samhita edition, whose verses are quoted. False on the 1933 Manasara edition behind the Ayadi formulas, from which only the multipliers, divisors and names are taken, never a sentence."},"basis":{"type":"string","example":"the south-west placement of the principal bedroom is later Vastu practice; chapter 53 places no bedroom","description":"Why a convention rule says what it says. Present only when text is convention, and it names the tradition the rule comes from rather than a verse."}},"required":["text"],"description":"Where a verdict comes from: a chapter and verse of a named public-domain edition, or the literal convention with the practice it rests on. Every verdict in this domain carries one."}},"required":["type","zone","verdict","idealDirections","avoidDirections","reading","remedy","source"]},"description":"One reading per room sent, in the order you sent them."},"score":{"type":"number","example":83.3,"description":"A RoxyAPI composite from 0 to 100 over the rooms you sent, not a classical quantity and not a number any verse gives. A rule carrying a verse weighs twice one carrying convention; an ideal placement scores full, an acceptable one half and a placement to avoid nothing. The weights are published in the scoring field so you can recompute it or ignore it."},"scoring":{"type":"object","properties":{"sourcedWeight":{"type":"number","example":2,"description":"The weight a rule carrying a chapter and verse contributes."},"conventionWeight":{"type":"number","example":1,"description":"The weight a rule carrying convention contributes."},"idealPoints":{"type":"number","example":1,"description":"The points an ideal placement earns, out of one."},"neutralPoints":{"type":"number","example":0.5,"description":"The points an acceptable placement earns, out of one."},"avoidPoints":{"type":"number","example":0,"description":"The points a placement to avoid earns, out of one."}},"required":["sourcedWeight","conventionWeight","idealPoints","neutralPoints","avoidPoints"],"description":"The weights behind the composite, published rather than hidden so the number is auditable."},"facing":{"type":"string","example":"North","description":"Which way the building faces, echoed. It does not move the zones: the mandala is aligned to the compass rather than to the building, so a room in the south-east is in the south-east whichever way the front door looks."},"sources":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","example":"Brihat Samhita","description":"The primary text this verdict rests on, or the literal value convention where no verse states the rule. Always English, safe to compare against."},"chapter":{"type":"number","example":53,"description":"Chapter of the primary text. Absent on a convention, which has no chapter to cite."},"verse":{"type":"string","example":"118","description":"Verse or verse range inside the chapter. Absent on a convention. A range is written with a hyphen, as in 115-117."},"translation":{"type":"string","example":"N. Chidambaram Iyer","description":"Translator of the edition the verse was read in. Absent on a convention."},"year":{"type":"number","example":1884,"description":"Publication year of that edition. Absent on a convention."},"publicDomain":{"type":"boolean","example":true,"description":"Whether the cited edition is in the public domain. True on the 1884 Brihat Samhita edition, whose verses are quoted. False on the 1933 Manasara edition behind the Ayadi formulas, from which only the multipliers, divisors and names are taken, never a sentence."},"basis":{"type":"string","example":"the south-west placement of the principal bedroom is later Vastu practice; chapter 53 places no bedroom","description":"Why a convention rule says what it says. Present only when text is convention, and it names the tradition the rule comes from rather than a verse."}},"required":["text"],"description":"Where a verdict comes from: a chapter and verse of a named public-domain edition, or the literal convention with the practice it rests on. Every verdict in this domain carries one."},"description":"Every rule this report rests on, so a printed report can carry the citation beside each room."}},"required":["rooms","score","scoring","facing","sources"]}}}},"400":{"description":"Validation error. `issues[]` lists every failed field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"First issue summary."},"code":{"type":"string","enum":["validation_error"]},"issues":{"type":"array","description":"Every validation failure. Use this to rebuild a valid request.","items":{"type":"object","properties":{"path":{"type":"string","description":"Dot-separated field path, or \"(root)\" for top-level."},"message":{"type":"string"},"code":{"type":"string","description":"Zod issue code (invalid_type, too_small, too_big, invalid_string, ...)."},"expected":{"type":"string","description":"Expected type for invalid_type."},"minimum":{"description":"Minimum bound for too_small issues.","oneOf":[{"type":"number"},{"type":"string"}]},"maximum":{"description":"Maximum bound for too_big issues.","oneOf":[{"type":"number"},{"type":"string"}]},"inclusive":{"type":"boolean"},"format":{"type":"string","description":"Format name for string issues (regex, email, url, uuid)."},"pattern":{"type":"string","description":"Regex pattern when format is regex."}},"required":["path","message"]}}},"required":["error","code","issues"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}},"405":{"description":"Method not allowed. The path exists but only responds to the methods listed in `allow[]` and the `Allow` response header.","headers":{"Allow":{"description":"Comma-separated list of allowed methods (RFC 9110).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["method_not_allowed"]},"allow":{"type":"array","items":{"type":"string"},"description":"Allowed HTTP methods for this path. Mirrors the Allow response header."},"docs":{"type":"string","description":"Link to the product page for this domain."}},"required":["error","code","allow"]}}}},"429":{"description":"Monthly rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}}}}},"/timing/griha-pravesh":{"post":{"operationId":"findGrihaPraveshDates","tags":["Vastu"],"summary":"Find griha pravesh dates - Vastu house warming muhurta API","description":"Griha pravesh muhurta search over a date window: send the window and the place, and the API returns every day that clears the classical day-level rules, with the nakshatra, tithi, weekday and solar position that qualified it and the rule ids that admitted it. Two Muhurta texts disagree on the admissible nakshatras and you choose which one leads, and the rules a date search cannot settle are published rather than dropped. Built for house warming date pickers, practitioner scheduling and agent assistants that have to answer when a family should move in.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["en","tr","de","es","hi","pt","fr","ru","zh-Hans","zh-Hant"],"default":"en","example":"en","description":"Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English."},"required":false,"description":"Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.","name":"lang","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"startDate":{"type":"string","format":"date","example":"2027-01-20","description":"First day of the search window, in YYYY-MM-DD. Every limb is read at sunrise of the local day, because the Hindu day begins at sunrise rather than at midnight."},"endDate":{"type":"string","format":"date","example":"2027-03-20","description":"Last day of the search window, in YYYY-MM-DD, inclusive. The window is capped at 93 days, which is a full season and the same cap the Vedic auspicious day search carries."},"latitude":{"type":"number","minimum":-90,"maximum":90,"example":28.6139,"description":"Latitude of the house, in decimal degrees, positive north. Sunrise decides where one day ends and the next begins, so a nakshatra running out during the morning changes which day it counts for."},"longitude":{"type":"number","minimum":-180,"maximum":180,"example":77.209,"description":"Longitude of the house, in decimal degrees, positive east."},"timezone":{"anyOf":[{"type":"number","minimum":-14,"maximum":14},{"type":"string"}],"description":"IANA name (e.g. \"America/New_York\", \"Europe/London\", \"UTC\"), decimal hours (e.g. -5 for EST, 1 for CET), or a fixed UTC offset (e.g. \"-05:00\", \"+01:00\"). Prefer the IANA name: it is resolved to the DST-correct offset for the birth date, while a fixed offset or decimal is taken literally and will be wrong if it does not match the daylight-saving state on that date. Invalid timezones return 400 with a validation error.","example":"America/New_York"},"muhurtaText":{"type":"string","enum":["muhurta-chintamani","kalaprakasika"],"default":"muhurta-chintamani","example":"muhurta-chintamani","description":"Which Muhurta text supplies the admissible nakshatras for entering a new house. muhurta-chintamani admits eight and kalaprakasika admits twelve; seven overlap and are the high confidence core, one is unique to the first and five to the second. The two texts are independent witnesses, which is what makes the overlap strong and the difference worth exposing. Defaults to muhurta-chintamani."}},"required":["startDate","endDate","latitude","longitude","timezone"]}}}},"responses":{"200":{"description":"Every admitted day with its panchang limbs, plus the rules and the rejections","content":{"application/json":{"schema":{"type":"object","properties":{"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","example":"2027-02-11","description":"The admitted day, in YYYY-MM-DD."},"sunrise":{"type":"string","example":"2027-02-11T01:32:11.000Z","description":"Sunrise at the coordinates you sent, as a UTC instant. This is the moment every limb below was read at. Absent inside a polar night, where the Sun does not rise and the day was read from local midnight instead."},"nakshatra":{"type":"object","properties":{"number":{"type":"number","example":4,"description":"Nakshatra number 1 to 27, counting from Ashwini. Abhijit is not among them."},"id":{"type":"string","example":"rohini","description":"Identifier of the nakshatra, lower case with hyphens. Always English transliteration, safe to compare against and against the same value on the panchang endpoints."},"name":{"type":"string","example":"Rohini","description":"Display name of the nakshatra, as the panchang endpoints spell it."}},"required":["number","id","name"],"description":"The nakshatra the Moon stood in at sunrise, which is the strongest of the rules."},"tithi":{"type":"object","properties":{"number":{"type":"number","example":6,"description":"Tithi number 1 to 30 across the lunar month, 1 to 15 bright then 16 to 30 dark."},"name":{"type":"string","example":"Ṣaṣṭī","description":"Display name of the tithi, as the panchang endpoints spell it."},"paksha":{"type":"string","example":"Shukla","description":"Which half of the lunar month: Shukla for the bright half and Krishna for the dark. Always English, safe to compare against."}},"required":["number","name","paksha"],"description":"The tithi running at sunrise."},"vara":{"type":"object","properties":{"number":{"type":"number","example":4,"description":"Weekday number, 0 for Sunday through 6 for Saturday."},"name":{"type":"string","example":"Thursday","description":"Weekday name, counted from sunrise rather than from midnight."}},"required":["number","name"],"description":"The weekday, which begins at sunrise in this reckoning."},"ayana":{"type":"string","example":"uttarayana","description":"Which half of the solar year: uttarayana is the northern course and is required, dakshinayana the southern. Always English, safe to compare against."},"solarLongitude":{"type":"number","example":296.412,"description":"Sidereal longitude of the Sun at sunrise, in degrees. Published because two of the rules are solar and a caller can check them from it."},"karana":{"type":"string","example":"Bava","description":"The karana at sunrise. Vishti, also called Bhadra, is the one that bars a day. Always English transliteration."},"quality":{"type":"string","example":"preferred","description":"preferred where the tithi is one both texts single out and the weekday is not the neutral one, admissible otherwise. Always English, safe to compare against."},"admittedBy":{"type":"array","items":{"type":"string"},"example":["nakshatra-admissible","tithi-window"],"description":"The rule ids this day satisfied, in the order they were tested. Look each one up in the rules field for what it requires and where it comes from."},"reading":{"type":"string","example":"The day clears every rule this search can test, on the nakshatra Rohini, the tithi Ṣaṣṭī and a Thursday.","description":"The day as a sentence, for a report or a chat answer. Translated in place when lang is set to a language other than English."}},"required":["date","nakshatra","tithi","vara","ayana","solarLongitude","karana","quality","admittedBy","reading"]},"description":"The days in the window that clear every day-level rule, in date order. Only admitted days are listed; the rules that rejected the rest are tallied in rejectionsByRule."},"total":{"type":"number","example":4,"description":"How many days were admitted."},"window":{"type":"object","properties":{"startDate":{"type":"string","example":"2027-01-20","description":"First day searched, echoed."},"endDate":{"type":"string","example":"2027-03-20","description":"Last day searched, echoed."},"daysEvaluated":{"type":"number","example":60,"description":"How many days the window covered, inclusive of both ends."}},"required":["startDate","endDate","daysEvaluated"],"description":"What was searched, echoed so a stored result is self describing."},"rejectionsByRule":{"type":"object","additionalProperties":{"type":"number","example":21,"description":"How many days that rule rejected. One day can be rejected by several rules."},"example":{"uttarayana":21,"nakshatra-admissible":45},"description":"A tally of which rule rejected how many days, keyed on the rule id. This is what makes an empty result actionable: a window inside the southern course fails every day on one rule and you can see that at a glance."},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"nakshatra-admissible","description":"Identifier of the rule, which is what the day rows reference."},"requirement":{"type":"string","example":"The nakshatra at sunrise must be one the chosen text admits for entering a new house.","description":"What the rule requires, as original prose. Translated in place when lang is set."},"confidence":{"type":"string","example":"high","description":"How well attested the rule is: high where two independent texts agree, medium where two dependent witnesses do or one text states it twice. Always English."},"source":{"type":"object","properties":{"text":{"type":"string","example":"Brihat Samhita","description":"The primary text this verdict rests on, or the literal value convention where no verse states the rule. Always English, safe to compare against."},"chapter":{"type":"number","example":53,"description":"Chapter of the primary text. Absent on a convention, which has no chapter to cite."},"verse":{"type":"string","example":"118","description":"Verse or verse range inside the chapter. Absent on a convention. A range is written with a hyphen, as in 115-117."},"translation":{"type":"string","example":"N. Chidambaram Iyer","description":"Translator of the edition the verse was read in. Absent on a convention."},"year":{"type":"number","example":1884,"description":"Publication year of that edition. Absent on a convention."},"publicDomain":{"type":"boolean","example":true,"description":"Whether the cited edition is in the public domain. True on the 1884 Brihat Samhita edition, whose verses are quoted. False on the 1933 Manasara edition behind the Ayadi formulas, from which only the multipliers, divisors and names are taken, never a sentence."},"basis":{"type":"string","example":"the south-west placement of the principal bedroom is later Vastu practice; chapter 53 places no bedroom","description":"Why a convention rule says what it says. Present only when text is convention, and it names the tradition the rule comes from rather than a verse."}},"required":["text"],"description":"Where a verdict comes from: a chapter and verse of a named public-domain edition, or the literal convention with the practice it rests on. Every verdict in this domain carries one."}},"required":["id","requirement","confidence","source"]},"description":"Every rule applied, with what it requires, how well attested it is, and where it comes from."},"leftToTheAstrologer":{"type":"array","items":{"type":"string"},"example":["The rising sign at the moment of entry should be one of the four fixed signs, or a sign benefic to the owner. One text admits a movable sign only when the rising navamsa is the Bull."],"description":"The rules a date search cannot settle, published rather than dropped. They are judgements about a MOMENT and about the owner, not about a day, and a caller who believes an admitted day is finished without them would be wrong."},"sources":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","example":"Brihat Samhita","description":"The primary text this verdict rests on, or the literal value convention where no verse states the rule. Always English, safe to compare against."},"chapter":{"type":"number","example":53,"description":"Chapter of the primary text. Absent on a convention, which has no chapter to cite."},"verse":{"type":"string","example":"118","description":"Verse or verse range inside the chapter. Absent on a convention. A range is written with a hyphen, as in 115-117."},"translation":{"type":"string","example":"N. Chidambaram Iyer","description":"Translator of the edition the verse was read in. Absent on a convention."},"year":{"type":"number","example":1884,"description":"Publication year of that edition. Absent on a convention."},"publicDomain":{"type":"boolean","example":true,"description":"Whether the cited edition is in the public domain. True on the 1884 Brihat Samhita edition, whose verses are quoted. False on the 1933 Manasara edition behind the Ayadi formulas, from which only the multipliers, divisors and names are taken, never a sentence."},"basis":{"type":"string","example":"the south-west placement of the principal bedroom is later Vastu practice; chapter 53 places no bedroom","description":"Why a convention rule says what it says. Present only when text is convention, and it names the tradition the rule comes from rather than a verse."}},"required":["text"],"description":"Where a verdict comes from: a chapter and verse of a named public-domain edition, or the literal convention with the practice it rests on. Every verdict in this domain carries one."},"description":"The primary citations behind the whole search, including the one house entry rule the Brihat Samhita itself states, which is in its muhurta chapter and not in the architecture chapter."},"conventions":{"type":"object","properties":{"muhurtaText":{"type":"string","example":"muhurta-chintamani","description":"Which Muhurta text supplied the nakshatra list. Echoes the resolved value whether it was sent or defaulted."},"timezone":{"type":"number","example":5.5,"description":"The UTC offset in hours the local day was resolved with, after any IANA name was resolved to a number."}},"required":["muhurtaText","timezone"],"description":"The switches this search resolved, echoed so it can be reproduced later."}},"required":["days","total","window","rejectionsByRule","rules","leftToTheAstrologer","sources","conventions"]}}}},"400":{"description":"Validation error. `issues[]` lists every failed field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"First issue summary."},"code":{"type":"string","enum":["validation_error"]},"issues":{"type":"array","description":"Every validation failure. Use this to rebuild a valid request.","items":{"type":"object","properties":{"path":{"type":"string","description":"Dot-separated field path, or \"(root)\" for top-level."},"message":{"type":"string"},"code":{"type":"string","description":"Zod issue code (invalid_type, too_small, too_big, invalid_string, ...)."},"expected":{"type":"string","description":"Expected type for invalid_type."},"minimum":{"description":"Minimum bound for too_small issues.","oneOf":[{"type":"number"},{"type":"string"}]},"maximum":{"description":"Maximum bound for too_big issues.","oneOf":[{"type":"number"},{"type":"string"}]},"inclusive":{"type":"boolean"},"format":{"type":"string","description":"Format name for string issues (regex, email, url, uuid)."},"pattern":{"type":"string","description":"Regex pattern when format is regex."}},"required":["path","message"]}}},"required":["error","code","issues"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}},"405":{"description":"Method not allowed. The path exists but only responds to the methods listed in `allow[]` and the `Allow` response header.","headers":{"Allow":{"description":"Comma-separated list of allowed methods (RFC 9110).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["method_not_allowed"]},"allow":{"type":"array","items":{"type":"string"},"description":"Allowed HTTP methods for this path. Mirrors the Allow response header."},"docs":{"type":"string","description":"Link to the product page for this domain."}},"required":["error","code","allow"]}}}},"429":{"description":"Monthly rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}}}}},"/directions":{"get":{"operationId":"listDikpalaDirections","tags":["Vastu"],"summary":"List the eight directions - Vastu dikpala and direction reference API","description":"Reference table of the eight Vastu directions: the dikpala who rules each quarter of the horizon, the squares of the mandala it covers with their devatas, what the chapter places on that side, and what standing water there brings. A pure reference endpoint with no plot required, for building a picker or a directions guide. Every row says which verse each part comes from and labels the element as the later convention it is.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["en","tr","de","es","hi","pt","fr","ru","zh-Hans","zh-Hant"],"default":"en","example":"en","description":"Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English."},"required":false,"description":"Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.","name":"lang","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":8,"default":8,"example":8,"description":"Maximum items to return per page. Range: 1-8, default 8."},"required":false,"description":"Maximum items to return per page. Range: 1-8, default 8.","name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0,"example":0,"description":"Number of items to skip for pagination. Default 0."},"required":false,"description":"Number of items to skip for pagination. Default 0.","name":"offset","in":"query"}],"responses":{"200":{"description":"The eight directions with their dikpalas, devatas and water effects","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number","example":8,"description":"How many directions there are in all, which is always eight."},"limit":{"type":"number","example":8,"description":"How many were requested per page."},"offset":{"type":"number","example":0,"description":"How many were skipped."},"directions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"Northeast","description":"Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against and against the same value on the feng shui and I Ching endpoints."},"dikpala":{"type":"string","example":"Isana","description":"The lord of this quarter of the horizon, per Brihat Samhita 54.3. Always English transliteration, safe to compare against. These are NOT the 45 mandala devatas and the two sets must not be merged: Agni is the north-east mandala square and the south-east dikpala."},"kind":{"type":"string","example":"intercardinal","description":"Whether this is one of the four cardinal directions or one of the four intercardinal quarters. Always English."},"element":{"type":"string","example":"water","description":"The element conventionally assigned to this quarter: fire, earth, air or water. Present only on the four intercardinal quarters, because the cardinal ones carry none in this scheme, and it is labelled convention because the Brihat Samhita assigns no element to any direction at all."},"squares":{"type":"array","items":{"type":"number"},"example":[1,2,10,11,21],"description":"The squares of the 81 pada grid this direction covers. For a cardinal direction those are its eight perimeter squares in the order the verses enumerate them; for an intercardinal quarter they are the corner square and the four single pada squares gathered around it."},"devatas":{"type":"array","items":{"type":"object","properties":{"square":{"type":"number","example":1,"description":"Square number in the 81 pada grid."},"id":{"type":"string","example":"agni","description":"Identifier of the devata holding it. Always English transliteration, safe to compare against and to look up on the devatas endpoint."},"name":{"type":"string","example":"Agni","description":"Display name of the devata, with the diacritics the transliteration carries."}},"required":["square","id","name"]},"description":"The devatas of the squares this direction covers, in the same order as the squares list."},"places":{"type":"string","example":"the apartment for the Devas","description":"What Brihat Samhita 53.118 puts on this side, in the chapter own terms. Present on the four intercardinal quarters, which are the only ones that verse places anything on."},"water":{"type":"object","properties":{"effect":{"type":"string","example":"Sons.","description":"What 53.119 says follows from standing water in this quarter, as original prose."},"auspiciousness":{"type":"string","example":"auspicious","description":"Whether that effect is a gain or a harm. Only the north and the north-east are gains. Always English."}},"required":["effect","auspiciousness"],"description":"What the chapter says about standing water here, which it gives for all eight directions."},"sources":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","example":"Brihat Samhita","description":"The primary text this verdict rests on, or the literal value convention where no verse states the rule. Always English, safe to compare against."},"chapter":{"type":"number","example":53,"description":"Chapter of the primary text. Absent on a convention, which has no chapter to cite."},"verse":{"type":"string","example":"118","description":"Verse or verse range inside the chapter. Absent on a convention. A range is written with a hyphen, as in 115-117."},"translation":{"type":"string","example":"N. Chidambaram Iyer","description":"Translator of the edition the verse was read in. Absent on a convention."},"year":{"type":"number","example":1884,"description":"Publication year of that edition. Absent on a convention."},"publicDomain":{"type":"boolean","example":true,"description":"Whether the cited edition is in the public domain. True on the 1884 Brihat Samhita edition, whose verses are quoted. False on the 1933 Manasara edition behind the Ayadi formulas, from which only the multipliers, divisors and names are taken, never a sentence."},"basis":{"type":"string","example":"the south-west placement of the principal bedroom is later Vastu practice; chapter 53 places no bedroom","description":"Why a convention rule says what it says. Present only when text is convention, and it names the tradition the rule comes from rather than a verse."}},"required":["text"],"description":"Where a verdict comes from: a chapter and verse of a named public-domain edition, or the literal convention with the practice it rests on. Every verdict in this domain carries one."},"description":"The verses behind each part of this entry, and the convention label on the element where no verse gives one."}},"required":["id","dikpala","kind","squares","devatas","water","sources"]},"description":"The directions on this page, in compass order from North."}},"required":["total","limit","offset","directions"]}}}},"400":{"description":"Validation error. `issues[]` lists every failed field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"First issue summary."},"code":{"type":"string","enum":["validation_error"]},"issues":{"type":"array","description":"Every validation failure. Use this to rebuild a valid request.","items":{"type":"object","properties":{"path":{"type":"string","description":"Dot-separated field path, or \"(root)\" for top-level."},"message":{"type":"string"},"code":{"type":"string","description":"Zod issue code (invalid_type, too_small, too_big, invalid_string, ...)."},"expected":{"type":"string","description":"Expected type for invalid_type."},"minimum":{"description":"Minimum bound for too_small issues.","oneOf":[{"type":"number"},{"type":"string"}]},"maximum":{"description":"Maximum bound for too_big issues.","oneOf":[{"type":"number"},{"type":"string"}]},"inclusive":{"type":"boolean"},"format":{"type":"string","description":"Format name for string issues (regex, email, url, uuid)."},"pattern":{"type":"string","description":"Regex pattern when format is regex."}},"required":["path","message"]}}},"required":["error","code","issues"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}},"405":{"description":"Method not allowed. The path exists but only responds to the methods listed in `allow[]` and the `Allow` response header.","headers":{"Allow":{"description":"Comma-separated list of allowed methods (RFC 9110).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["method_not_allowed"]},"allow":{"type":"array","items":{"type":"string"},"description":"Allowed HTTP methods for this path. Mirrors the Allow response header."},"docs":{"type":"string","description":"Link to the product page for this domain."}},"required":["error","code","allow"]}}}},"429":{"description":"Monthly rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}}}}},"/directions/{id}":{"get":{"operationId":"getDikpalaDirection","tags":["Vastu"],"summary":"Look up one direction - Vastu dikpala reference API","description":"Look up one Vastu direction: its dikpala, the mandala squares it covers with their devatas, what the chapter places there, and what standing water in that quarter brings. Case and punctuation in the id are folded, so north-east, northeast and NorthEast all resolve to the same entry, and the id space is the one the feng shui and I Ching endpoints use.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["North","Northeast","East","Southeast","South","Southwest","West","Northwest"],"example":"Northeast","description":"Direction id, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Case and punctuation are folded."},"required":true,"description":"Direction id, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Case and punctuation are folded.","name":"id","in":"path"},{"schema":{"type":"string","enum":["en","tr","de","es","hi","pt","fr","ru","zh-Hans","zh-Hant"],"default":"en","example":"en","description":"Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English."},"required":false,"description":"Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.","name":"lang","in":"query"}],"responses":{"200":{"description":"One direction with its dikpala, devatas and water effect","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"Northeast","description":"Compass sector, one of North, Northeast, East, Southeast, South, Southwest, West, Northwest. Always English, whatever the lang parameter says, so it stays safe to compare against and against the same value on the feng shui and I Ching endpoints."},"dikpala":{"type":"string","example":"Isana","description":"The lord of this quarter of the horizon, per Brihat Samhita 54.3. Always English transliteration, safe to compare against. These are NOT the 45 mandala devatas and the two sets must not be merged: Agni is the north-east mandala square and the south-east dikpala."},"kind":{"type":"string","example":"intercardinal","description":"Whether this is one of the four cardinal directions or one of the four intercardinal quarters. Always English."},"element":{"type":"string","example":"water","description":"The element conventionally assigned to this quarter: fire, earth, air or water. Present only on the four intercardinal quarters, because the cardinal ones carry none in this scheme, and it is labelled convention because the Brihat Samhita assigns no element to any direction at all."},"squares":{"type":"array","items":{"type":"number"},"example":[1,2,10,11,21],"description":"The squares of the 81 pada grid this direction covers. For a cardinal direction those are its eight perimeter squares in the order the verses enumerate them; for an intercardinal quarter they are the corner square and the four single pada squares gathered around it."},"devatas":{"type":"array","items":{"type":"object","properties":{"square":{"type":"number","example":1,"description":"Square number in the 81 pada grid."},"id":{"type":"string","example":"agni","description":"Identifier of the devata holding it. Always English transliteration, safe to compare against and to look up on the devatas endpoint."},"name":{"type":"string","example":"Agni","description":"Display name of the devata, with the diacritics the transliteration carries."}},"required":["square","id","name"]},"description":"The devatas of the squares this direction covers, in the same order as the squares list."},"places":{"type":"string","example":"the apartment for the Devas","description":"What Brihat Samhita 53.118 puts on this side, in the chapter own terms. Present on the four intercardinal quarters, which are the only ones that verse places anything on."},"water":{"type":"object","properties":{"effect":{"type":"string","example":"Sons.","description":"What 53.119 says follows from standing water in this quarter, as original prose."},"auspiciousness":{"type":"string","example":"auspicious","description":"Whether that effect is a gain or a harm. Only the north and the north-east are gains. Always English."}},"required":["effect","auspiciousness"],"description":"What the chapter says about standing water here, which it gives for all eight directions."},"sources":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","example":"Brihat Samhita","description":"The primary text this verdict rests on, or the literal value convention where no verse states the rule. Always English, safe to compare against."},"chapter":{"type":"number","example":53,"description":"Chapter of the primary text. Absent on a convention, which has no chapter to cite."},"verse":{"type":"string","example":"118","description":"Verse or verse range inside the chapter. Absent on a convention. A range is written with a hyphen, as in 115-117."},"translation":{"type":"string","example":"N. Chidambaram Iyer","description":"Translator of the edition the verse was read in. Absent on a convention."},"year":{"type":"number","example":1884,"description":"Publication year of that edition. Absent on a convention."},"publicDomain":{"type":"boolean","example":true,"description":"Whether the cited edition is in the public domain. True on the 1884 Brihat Samhita edition, whose verses are quoted. False on the 1933 Manasara edition behind the Ayadi formulas, from which only the multipliers, divisors and names are taken, never a sentence."},"basis":{"type":"string","example":"the south-west placement of the principal bedroom is later Vastu practice; chapter 53 places no bedroom","description":"Why a convention rule says what it says. Present only when text is convention, and it names the tradition the rule comes from rather than a verse."}},"required":["text"],"description":"Where a verdict comes from: a chapter and verse of a named public-domain edition, or the literal convention with the practice it rests on. Every verdict in this domain carries one."},"description":"The verses behind each part of this entry, and the convention label on the element where no verse gives one."}},"required":["id","dikpala","kind","squares","devatas","water","sources"]}}}},"400":{"description":"Validation error. `issues[]` lists every failed field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"First issue summary."},"code":{"type":"string","enum":["validation_error"]},"issues":{"type":"array","description":"Every validation failure. Use this to rebuild a valid request.","items":{"type":"object","properties":{"path":{"type":"string","description":"Dot-separated field path, or \"(root)\" for top-level."},"message":{"type":"string"},"code":{"type":"string","description":"Zod issue code (invalid_type, too_small, too_big, invalid_string, ...)."},"expected":{"type":"string","description":"Expected type for invalid_type."},"minimum":{"description":"Minimum bound for too_small issues.","oneOf":[{"type":"number"},{"type":"string"}]},"maximum":{"description":"Maximum bound for too_big issues.","oneOf":[{"type":"number"},{"type":"string"}]},"inclusive":{"type":"boolean"},"format":{"type":"string","description":"Format name for string issues (regex, email, url, uuid)."},"pattern":{"type":"string","description":"Regex pattern when format is regex."}},"required":["path","message"]}}},"required":["error","code","issues"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}},"404":{"description":"No direction with that id","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Resource not found","description":"Human-readable error message. The wording may change, so do not parse it programmatically. Switch on the stable code instead."},"code":{"type":"string","example":"not_found","description":"Machine-readable error code. Stable identifier for programmatic error handling."}},"required":["error","code"]}}}},"405":{"description":"Method not allowed. The path exists but only responds to the methods listed in `allow[]` and the `Allow` response header.","headers":{"Allow":{"description":"Comma-separated list of allowed methods (RFC 9110).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["method_not_allowed"]},"allow":{"type":"array","items":{"type":"string"},"description":"Allowed HTTP methods for this path. Mirrors the Allow response header."},"docs":{"type":"string","description":"Link to the product page for this domain."}},"required":["error","code","allow"]}}}},"429":{"description":"Monthly rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}}}}},"/devatas":{"get":{"operationId":"listDevatas","tags":["Vastu"],"summary":"List the 45 devatas - Vastu Purusha Mandala reference API","description":"Reference table of the 45 devatas of the Vastu Purusha Mandala: which squares of the 81 pada grid each one holds, which ring and which side, how many padas, and the verses that place it. A pure reference endpoint with no plot required, for building a mandala diagram or a glossary. Where the sources contradict each other, and they do on several rows, the row says so instead of quietly picking a side.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["en","tr","de","es","hi","pt","fr","ru","zh-Hans","zh-Hant"],"default":"en","example":"en","description":"Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English."},"required":false,"description":"Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.","name":"lang","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":45,"default":45,"example":45,"description":"Maximum items to return per page. Range: 1-45, default 45."},"required":false,"description":"Maximum items to return per page. Range: 1-45, default 45.","name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0,"example":0,"description":"Number of items to skip for pagination. Default 0."},"required":false,"description":"Number of items to skip for pagination. Default 0.","name":"offset","in":"query"}],"responses":{"200":{"description":"The devatas of the mandala with their squares, class and verses","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number","example":45,"description":"How many devatas there are in all. Always 45 squares held, though the chapter prints only 44 distinct names because Indra appears twice."},"limit":{"type":"number","example":45,"description":"How many were requested per page."},"offset":{"type":"number","example":0,"description":"How many were skipped."},"devatas":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"jayanta","description":"Identifier of the devata, lower case transliteration. Always English, safe to compare against. Indra appears twice in the chapter, on the east perimeter and on the inner ring, so those two carry the ids indra-outer and indra-inner, which are ours: no source read for this package prints a distinguishing name for either."},"name":{"type":"string","example":"Jayanta","description":"Display name of the devata, with the diacritics the transliteration carries. A Sanskrit proper noun, so it stays as it is in every language."},"class":{"type":"string","example":"perimeter","description":"Which ring of the mandala the devata belongs to: perimeter for the outer 32, innerRing for the eight around Brahma, innerCorner for the four on the inner diagonals, center for Brahma alone. 32 plus 8 plus 4 plus 1 is 45. Always English."},"group":{"type":"string","example":"dvipada","description":"How many squares the devata holds under 53.49 to 50: padika for one, dvipada for two, tripada for three. Absent for Brahma, whom those verses leave outside the scheme while enumerating 44 devatas."},"side":{"type":"string","example":"East","description":"Which side of the perimeter the devata sits on. Present only on the outer 32, which are the ones the verses enumerate side by side."},"quadrant":{"type":"string","example":"Northeast","description":"Which quarter of the mandala the devata occupies, where it sits in one. Absent for a devata spread along a side rather than gathered in a corner."},"squares":{"type":"array","items":{"type":"number"},"example":[3,12],"description":"Which of the 81 squares the devata holds. The verses name one square per devata and fix the pada count of each, and the remaining squares follow from that count: a dvipada takes its named square plus the one a step inward, a tripada the three cell cardinal run of the second ring."},"cells":{"type":"array","items":{"type":"object","properties":{"rowFromNorth":{"type":"number","example":3,"description":"Row of the grid, 1 at the northern edge and 9 at the southern one."},"columnFromWest":{"type":"number","example":9,"description":"Column of the grid, 1 at the western edge and 9 at the eastern one."}},"required":["rowFromNorth","columnFromWest"]},"description":"The same squares as row and column pairs, which is what you draw with. The corners of the grid are 1 north-east, 9 south-east, 73 north-west and 81 south-west."},"padaCount":{"type":"number","example":2,"description":"How many squares the devata holds: one, two or three for the 44 enumerated devatas, and nine for Brahma."},"entrancePada":{"type":"number","example":3,"description":"The entrance pada this devata governs, 1 to 32. Present only on the outer 32, since only a perimeter square can hold a main door."},"role":{"type":"string","example":"The devata Jayanta holds 2 of the eighty one squares on the East side of the mandala.","description":"What the devata holds, as a sentence composed from the sourced structure. There is deliberately no meaning field: no source read for this package gives a devata a meaning, and inventing one would be unsourced content on a route that sells a citation per verdict. Translated in place when lang is set."},"verses":{"type":"array","items":{"type":"string"},"example":["53.43","53.44","53.45","53.49","53.50"],"description":"Which verses of chapter 53 place this devata and fix its pada count, so a report can print the citation."},"note":{"type":"string","example":"Iyer prints Indra for BOTH this square and the other; the printed text therefore yields 44 distinct names for 45 padas.","description":"Where the sources disagree or contradict themselves about this row, and where Brahma sits outside the pada-count scheme. Present on the six rows that carry a recorded divergence: the two Indras, the north-east and south-east corner devatas where the Manasara differs from the Brihat Samhita, Prthvidhara, whom the chapter places on two different squares in two different verses, and Brahma. Original prose, translated in place when lang is set."},"source":{"type":"object","properties":{"text":{"type":"string","example":"Brihat Samhita","description":"The primary text this verdict rests on, or the literal value convention where no verse states the rule. Always English, safe to compare against."},"chapter":{"type":"number","example":53,"description":"Chapter of the primary text. Absent on a convention, which has no chapter to cite."},"verse":{"type":"string","example":"118","description":"Verse or verse range inside the chapter. Absent on a convention. A range is written with a hyphen, as in 115-117."},"translation":{"type":"string","example":"N. Chidambaram Iyer","description":"Translator of the edition the verse was read in. Absent on a convention."},"year":{"type":"number","example":1884,"description":"Publication year of that edition. Absent on a convention."},"publicDomain":{"type":"boolean","example":true,"description":"Whether the cited edition is in the public domain. True on the 1884 Brihat Samhita edition, whose verses are quoted. False on the 1933 Manasara edition behind the Ayadi formulas, from which only the multipliers, divisors and names are taken, never a sentence."},"basis":{"type":"string","example":"the south-west placement of the principal bedroom is later Vastu practice; chapter 53 places no bedroom","description":"Why a convention rule says what it says. Present only when text is convention, and it names the tradition the rule comes from rather than a verse."}},"required":["text"],"description":"Where a verdict comes from: a chapter and verse of a named public-domain edition, or the literal convention with the practice it rests on. Every verdict in this domain carries one."}},"required":["id","name","class","squares","cells","padaCount","role","verses","source"]},"description":"The devatas on this page, in the order the verses enumerate them: the east perimeter, then south, west and north, then inward to Brahma."}},"required":["total","limit","offset","devatas"]}}}},"400":{"description":"Validation error. `issues[]` lists every failed field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"First issue summary."},"code":{"type":"string","enum":["validation_error"]},"issues":{"type":"array","description":"Every validation failure. Use this to rebuild a valid request.","items":{"type":"object","properties":{"path":{"type":"string","description":"Dot-separated field path, or \"(root)\" for top-level."},"message":{"type":"string"},"code":{"type":"string","description":"Zod issue code (invalid_type, too_small, too_big, invalid_string, ...)."},"expected":{"type":"string","description":"Expected type for invalid_type."},"minimum":{"description":"Minimum bound for too_small issues.","oneOf":[{"type":"number"},{"type":"string"}]},"maximum":{"description":"Maximum bound for too_big issues.","oneOf":[{"type":"number"},{"type":"string"}]},"inclusive":{"type":"boolean"},"format":{"type":"string","description":"Format name for string issues (regex, email, url, uuid)."},"pattern":{"type":"string","description":"Regex pattern when format is regex."}},"required":["path","message"]}}},"required":["error","code","issues"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}},"405":{"description":"Method not allowed. The path exists but only responds to the methods listed in `allow[]` and the `Allow` response header.","headers":{"Allow":{"description":"Comma-separated list of allowed methods (RFC 9110).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["method_not_allowed"]},"allow":{"type":"array","items":{"type":"string"},"description":"Allowed HTTP methods for this path. Mirrors the Allow response header."},"docs":{"type":"string","description":"Link to the product page for this domain."}},"required":["error","code","allow"]}}}},"429":{"description":"Monthly rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}}}}},"/devatas/{id}":{"get":{"operationId":"getDevata","tags":["Vastu"],"summary":"Look up one devata - Vastu mandala devata reference API","description":"Look up one devata of the Vastu Purusha Mandala: the squares it holds, its ring and side, its pada count, the entrance pada it governs where it sits on the perimeter, and the verses that place it. Case and punctuation in the id are folded, so indra-outer, Indra_Outer and INDRA OUTER all resolve.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","enum":["agni","parjanya","jayanta","indra-outer","surya","satya","bhrisa","antariksha","vayu","pusha","vitatha","brihatkshata","yama","gandharva","bhringaraja","mriga","pitri","dauvarika","sugriva","kusumadanta","varuna","asura","sosha","papayakshma","roga","ahi","mukhya","bhallata","soma","bhujaga","aditi","diti","aryaman","savita","vivasvan","indra-inner","mitra","rajayakshma","prthvidhara","apavatsa","apa","savitra","jaya","rudra","brahma"],"example":"jayanta","description":"Devata id, lower case transliteration. The two Indras are indra-outer for the east perimeter square and indra-inner for the inner ring one. Case and punctuation are folded."},"required":true,"description":"Devata id, lower case transliteration. The two Indras are indra-outer for the east perimeter square and indra-inner for the inner ring one. Case and punctuation are folded.","name":"id","in":"path"},{"schema":{"type":"string","enum":["en","tr","de","es","hi","pt","fr","ru","zh-Hans","zh-Hant"],"default":"en","example":"en","description":"Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English."},"required":false,"description":"Response language (BCP 47). Supported: en, tr, de, es, hi, pt, fr, ru, zh-Hans, zh-Hant. Defaults to en. Coverage varies by domain, and a field with no translation in the requested language returns English.","name":"lang","in":"query"}],"responses":{"200":{"description":"One devata with its squares, class, entrance pada and verses","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"jayanta","description":"Identifier of the devata, lower case transliteration. Always English, safe to compare against. Indra appears twice in the chapter, on the east perimeter and on the inner ring, so those two carry the ids indra-outer and indra-inner, which are ours: no source read for this package prints a distinguishing name for either."},"name":{"type":"string","example":"Jayanta","description":"Display name of the devata, with the diacritics the transliteration carries. A Sanskrit proper noun, so it stays as it is in every language."},"class":{"type":"string","example":"perimeter","description":"Which ring of the mandala the devata belongs to: perimeter for the outer 32, innerRing for the eight around Brahma, innerCorner for the four on the inner diagonals, center for Brahma alone. 32 plus 8 plus 4 plus 1 is 45. Always English."},"group":{"type":"string","example":"dvipada","description":"How many squares the devata holds under 53.49 to 50: padika for one, dvipada for two, tripada for three. Absent for Brahma, whom those verses leave outside the scheme while enumerating 44 devatas."},"side":{"type":"string","example":"East","description":"Which side of the perimeter the devata sits on. Present only on the outer 32, which are the ones the verses enumerate side by side."},"quadrant":{"type":"string","example":"Northeast","description":"Which quarter of the mandala the devata occupies, where it sits in one. Absent for a devata spread along a side rather than gathered in a corner."},"squares":{"type":"array","items":{"type":"number"},"example":[3,12],"description":"Which of the 81 squares the devata holds. The verses name one square per devata and fix the pada count of each, and the remaining squares follow from that count: a dvipada takes its named square plus the one a step inward, a tripada the three cell cardinal run of the second ring."},"cells":{"type":"array","items":{"type":"object","properties":{"rowFromNorth":{"type":"number","example":3,"description":"Row of the grid, 1 at the northern edge and 9 at the southern one."},"columnFromWest":{"type":"number","example":9,"description":"Column of the grid, 1 at the western edge and 9 at the eastern one."}},"required":["rowFromNorth","columnFromWest"]},"description":"The same squares as row and column pairs, which is what you draw with. The corners of the grid are 1 north-east, 9 south-east, 73 north-west and 81 south-west."},"padaCount":{"type":"number","example":2,"description":"How many squares the devata holds: one, two or three for the 44 enumerated devatas, and nine for Brahma."},"entrancePada":{"type":"number","example":3,"description":"The entrance pada this devata governs, 1 to 32. Present only on the outer 32, since only a perimeter square can hold a main door."},"role":{"type":"string","example":"The devata Jayanta holds 2 of the eighty one squares on the East side of the mandala.","description":"What the devata holds, as a sentence composed from the sourced structure. There is deliberately no meaning field: no source read for this package gives a devata a meaning, and inventing one would be unsourced content on a route that sells a citation per verdict. Translated in place when lang is set."},"verses":{"type":"array","items":{"type":"string"},"example":["53.43","53.44","53.45","53.49","53.50"],"description":"Which verses of chapter 53 place this devata and fix its pada count, so a report can print the citation."},"note":{"type":"string","example":"Iyer prints Indra for BOTH this square and the other; the printed text therefore yields 44 distinct names for 45 padas.","description":"Where the sources disagree or contradict themselves about this row, and where Brahma sits outside the pada-count scheme. Present on the six rows that carry a recorded divergence: the two Indras, the north-east and south-east corner devatas where the Manasara differs from the Brihat Samhita, Prthvidhara, whom the chapter places on two different squares in two different verses, and Brahma. Original prose, translated in place when lang is set."},"source":{"type":"object","properties":{"text":{"type":"string","example":"Brihat Samhita","description":"The primary text this verdict rests on, or the literal value convention where no verse states the rule. Always English, safe to compare against."},"chapter":{"type":"number","example":53,"description":"Chapter of the primary text. Absent on a convention, which has no chapter to cite."},"verse":{"type":"string","example":"118","description":"Verse or verse range inside the chapter. Absent on a convention. A range is written with a hyphen, as in 115-117."},"translation":{"type":"string","example":"N. Chidambaram Iyer","description":"Translator of the edition the verse was read in. Absent on a convention."},"year":{"type":"number","example":1884,"description":"Publication year of that edition. Absent on a convention."},"publicDomain":{"type":"boolean","example":true,"description":"Whether the cited edition is in the public domain. True on the 1884 Brihat Samhita edition, whose verses are quoted. False on the 1933 Manasara edition behind the Ayadi formulas, from which only the multipliers, divisors and names are taken, never a sentence."},"basis":{"type":"string","example":"the south-west placement of the principal bedroom is later Vastu practice; chapter 53 places no bedroom","description":"Why a convention rule says what it says. Present only when text is convention, and it names the tradition the rule comes from rather than a verse."}},"required":["text"],"description":"Where a verdict comes from: a chapter and verse of a named public-domain edition, or the literal convention with the practice it rests on. Every verdict in this domain carries one."}},"required":["id","name","class","squares","cells","padaCount","role","verses","source"]}}}},"400":{"description":"Validation error. `issues[]` lists every failed field.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"First issue summary."},"code":{"type":"string","enum":["validation_error"]},"issues":{"type":"array","description":"Every validation failure. Use this to rebuild a valid request.","items":{"type":"object","properties":{"path":{"type":"string","description":"Dot-separated field path, or \"(root)\" for top-level."},"message":{"type":"string"},"code":{"type":"string","description":"Zod issue code (invalid_type, too_small, too_big, invalid_string, ...)."},"expected":{"type":"string","description":"Expected type for invalid_type."},"minimum":{"description":"Minimum bound for too_small issues.","oneOf":[{"type":"number"},{"type":"string"}]},"maximum":{"description":"Maximum bound for too_big issues.","oneOf":[{"type":"number"},{"type":"string"}]},"inclusive":{"type":"boolean"},"format":{"type":"string","description":"Format name for string issues (regex, email, url, uuid)."},"pattern":{"type":"string","description":"Regex pattern when format is regex."}},"required":["path","message"]}}},"required":["error","code","issues"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}},"404":{"description":"No devata with that id","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Resource not found","description":"Human-readable error message. The wording may change, so do not parse it programmatically. Switch on the stable code instead."},"code":{"type":"string","example":"not_found","description":"Machine-readable error code. Stable identifier for programmatic error handling."}},"required":["error","code"]}}}},"405":{"description":"Method not allowed. The path exists but only responds to the methods listed in `allow[]` and the `Allow` response header.","headers":{"Allow":{"description":"Comma-separated list of allowed methods (RFC 9110).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["method_not_allowed"]},"allow":{"type":"array","items":{"type":"string"},"description":"Allowed HTTP methods for this path. Mirrors the Allow response header."},"docs":{"type":"string","description":"Link to the product page for this domain."}},"required":["error","code","allow"]}}}},"429":{"description":"Monthly rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message. May change wording."},"code":{"type":"string","description":"Machine-readable error code. Stable identifier."}},"required":["error","code"]}}}}}}}},"webhooks":{}}