🪔 Udhyath
⚡ Interactive (Swagger) 📘 ReDoc ← Back to app

Overview

The Udhyath API gives you Swiss Ephemeris-grade Vedic astrology as simple JSON endpoints: rasi and all 16 divisional charts, KP sub lords, Ashtakavarga, bhava chalit, four dasha systems, panchanga and transits. All positions are sidereal (Lahiri ayanamsa by default; KP endpoints default to Krishnamurti).

Base URL: https://api.astrology.tejaswiservices.com

Prefer clicking over reading? The interactive Swagger UI lets you call every endpoint from the browser with your token.

Quickstart

  1. Create an account at the Udhyath app (top-right → Login / Sign up).
  2. Top up your wallet — + Add funds (UPI, cards, netbanking via Razorpay).
  3. Generate a token — API & MCP page → Generate token. Copy the udh_… value; it is shown once.
  4. Call the API:
curl -X POST $BASE/v1/birth-chart \
  -H "Authorization: Bearer udh_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "year": 1947, "month": 8, "day": 15, "hour": 0, "minute": 0,
    "latitude": 28.6139, "longitude": 77.2090, "tz_name": "Asia/Kolkata"
  }'

Authentication

Every request carries your token in the Authorization header:

Authorization: Bearer udh_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Tokens are created and revoked on the API & MCP page. A revoked token stops working immediately. Only a SHA-256 hash is stored on our side — if you lose a token, revoke it and generate a new one. Keep tokens server-side; never embed them in client-side code.

Billing & pricing

  • Every calculation call costs ₹0.10 (GET /v1/me is free).
  • Charges draw from your prepaid wallet — the same wallet as the agent. No subscriptions, no minimums, no expiry.
  • When the balance can't cover a call you get HTTP 402 and are not charged:
{
  "detail": {
    "error": "insufficient_balance",
    "message": "Top up your wallet at https://astrology.tejaswiservices.com ...",
    "call_fee": 0.1, "balance": 0.0, "currency": "INR"
  }
}

Track spend per token on the API & MCP page, or programmatically via GET /v1/me.

The birth object

All chart endpoints accept the same JSON body:

FieldTypeRequiredNotes
year, month, dayintLocal calendar date of birth
hour, minuteintLocal time, 24-hour clock
secondintDefault 0
latitude, longitudefloatDecimal degrees; east/north positive
tz_namestringone ofIANA name, e.g. Asia/Kolkata — handles historical DST correctly (recommended)
utc_offset_hoursfloatone ofFixed offset alternative, e.g. 5.5
ayanamsastringlahiri (default) · raman · kp · fagan_bradley · yukteshwar

Endpoints

FREE
GET/v1/me

Validate a token and check your wallet — useful as a health/config check.

Example response
{
  "token_name": "my-app", "token_prefix": "udh_AbCdEfG",
  "balance": 99.0, "currency": "INR", "call_fee": 0.1, "calls_made": 42
}
₹0.10 / call
POST/v1/birth-chart

The rasi (D-1) chart: every graha with sign, exact degree, nakshatra + pada, retrograde flag and whole-sign house; the ascendant (lagna); house-by-house occupancy; and the birth panchanga.

Example response (trimmed)
{
  "meta": { "utc_time": "1947-08-14T18:30:00+00:00", "ayanamsa": "lahiri",
            "ayanamsa_value_deg": 23.077537, "julian_day": 2432412.270833 },
  "ascendant": { "sign": "Taurus", "dms": "07°43'56\"", "sign_lord": "Venus", ... },
  "planets": {
    "Sun":  { "sign": "Cancer", "dms": "27°59'13\"", "nakshatra":
              { "name": "Ashlesha", "pada": 4 }, "house_whole_sign": 3,
              "retrograde": false, ... },
    "Moon": { "sign": "Cancer", "nakshatra": { "name": "Pushya", "pada": 4 }, ... },
    ... 7 more grahas ...
  },
  "houses": [ { "house": 1, "sign": "Taurus", "sign_lord": "Venus",
                "planets": ["Rahu"] }, ... 11 more ... ],
  "panchanga": { "tithi": { "name": "Chaturdashi", "paksha": "Krishna" },
                 "vara": "Friday", "nakshatra": { "name": "Pushya", "pada": 4 },
                 "yoga": { "name": "..." }, "karana": { "name": "..." } }
}
₹0.10 / call
POST/v1/varga-chart

One divisional chart. Add "varga" to the birth object: D1 D2 D3 D4 D7 D9 D10 D12 D16 D20 D24 D27 D30 D40 D45 D60.

Example response (trimmed)
{
  "varga": "D9",
  "signification": "Navamsa - spouse, marriage, dharma, inner strength",
  "ascendant_sign": "Pisces",
  "placements": {
    "Sun": { "sign": "Sagittarius", "house_from_varga_lagna": 10 },
    ... 8 more grahas ...
  }
}
₹0.10 / call
POST/v1/all-vargas

All 16 Shodasavarga charts in one compact call — planet → sign for each varga, plus the varga lagna. The best value if you need several divisional charts.

Example response (trimmed)
{
  "charts": {
    "D1":  { "Lagna": "Taurus", "Sun": "Cancer", "Moon": "Cancer", ... },
    "D9":  { "Lagna": "Pisces", "Sun": "Sagittarius", ... },
    ... D2..D60 ...
  }
}
₹0.10 / call
POST/v1/kp-chart

Krishnamurti Paddhati: sign lord → star lord → sub lord → sub-sub lord for all 9 grahas and the 12 Placidus house cusps. Defaults to the KP ayanamsa (override with "ayanamsa").

Example response (trimmed)
{
  "system": "KP (Krishnamurti Paddhati), Placidus cusps",
  "cusps": [
    { "cusp": 1, "sign": "Taurus", "sign_lord": "Venus", "star": "Krittika",
      "star_lord": "Sun", "sub_lord": "Venus", "sub_sub_lord": "Jupiter",
      "longitude": 37.83 },
    ... 11 more cusps ...
  ],
  "planets": {
    "Moon": { "sign": "Cancer", "star": "Pushya", "star_lord": "Saturn",
              "sub_lord": "Saturn", "sub_sub_lord": "Venus", ... },
    ... 8 more grahas ...
  }
}
₹0.10 / call
POST/v1/ashtakavarga

Bhinnashtakavarga bindus per sign for the 7 classical planets and the Sarvashtakavarga totals (337 bindus, classical Parashara tables).

Example response (trimmed)
{
  "bav": { "Sun": { "Aries": 4, "Taurus": 3, ... }, ... 6 more planets ... },
  "bav_totals": { "Sun": 48, "Moon": 49, "Mars": 39, "Mercury": 54,
                  "Jupiter": 56, "Venus": 52, "Saturn": 39 },
  "sav": { "Aries": 30, "Taurus": 28, ... },
  "sav_total": 337, "ascendant_sign": "Taurus"
}
₹0.10 / call
POST/v1/bhava-chalit

Sripati bhava chalit: each bhava's start and madhya (midpoint) plus the bhava each planet actually occupies — often different from the whole-sign house.

Example response (trimmed)
{
  "system": "Sripati (Porphyry madhya)",
  "bhava_madhya": [37.73, 64.95, ...],
  "bhava_start": [24.12, 51.34, ...],
  "placements": { "Sun": 3, "Moon": 3, "Saturn": 3, "Rahu": 1, ... }
}
₹0.10 / call
POST/v1/dashas

Dasha timeline. Extra fields on the birth object:

  • "system": vimshottari (default) · yogini · chara (Jaimini, K.N. Rao) · kalachakra (BPHS)
  • "levels" (vimshottari only): 1 = maha, 2 = +antar (default), 3 = +pratyantar
Example response (vimshottari, trimmed)
{
  "system": "Vimshottari", "birth_lord": "Saturn",
  "balance_years_at_birth": 18.07,
  "mahadashas": [
    { "lord": "Saturn", "start": "1946-09-10T...", "end": "1965-09-10T...",
      "years": 19,
      "antardashas": [
        { "lord": "Saturn", "start": "...", "end": "...",
          "sub_periods": [ { "lord": "Saturn", ... }, ... ] },
        ... 8 more ...
      ] },
    ... 8 more mahadashas ...
  ]
}
₹0.10 / call
POST/v1/current-dasha

Just the Vimshottari maha/antar/pratyantar lords running right now — cheaper to parse than the full tree.

Example response
{
  "at": "2026-07-11T09:12:00+00:00",
  "mahadasha":       { "lord": "Mars",   "start": "...", "end": "..." },
  "antardasha":      { "lord": "Rahu",   "start": "...", "end": "..." },
  "pratyantardasha": { "lord": "Saturn", "start": "...", "end": "..." }
}
₹0.10 / call
GET/v1/panchanga?tz_name=Asia/Kolkata

Panchanga of the present moment (tithi + paksha, vara, nakshatra + pada, yoga, karana) plus current transit positions. Optional query params: latitude, longitude, tz_name.

₹0.10 / call
GET/v1/transits?at_iso=2026-11-01T12:00:00

Sidereal positions of all 9 grahas — now, or at any ISO-8601 datetime (past or future). Optional: at_iso, ayanamsa.

Errors

StatusMeaningWhat to do
400Invalid input (bad date, unknown varga/system/ayanamsa)Fix the request; the detail string names the problem
401Missing, malformed or revoked tokenSend Authorization: Bearer udh_… with an active token
402Wallet can't cover the call (you were not charged)Top up, then retry — detail includes balance and fee
429Throttled at the gatewayBack off and retry with jitter

Rate limits

API Gateway throttles at 50 requests/second (burst 100) for the REST API and 20 rps for MCP. Need more? Reach out.

MCP server

The same 11 calculations are available as MCP tools for Claude Desktop, Claude Code, or any MCP client — authenticated with the same token, billed at the same ₹0.10/tool-call.

Hosted (Streamable HTTP):

{
  "mcpServers": {
    "udhyath": {
      "type": "http",
      "url": "https://mcp.astrology.tejaswiservices.com/mcp",
      "headers": { "Authorization": "Bearer udh_YOUR_TOKEN" }
    }
  }
}

Local (stdio) — run the server yourself; calls are billed through the hosted API:

{
  "mcpServers": {
    "udhyath": {
      "command": "python",
      "args": ["/path/to/mcp_server/server.py"],
      "env": {
        "UDHYATH_API_URL": "https://api.astrology.tejaswiservices.com",
        "UDHYATH_API_KEY": "udh_YOUR_TOKEN"
      }
    }
  }
}

Tools exposed: birth_chart, varga_chart, all_varga_charts, kp_chart, ashtakavarga, bhava_chalit_chart, dasha_periods, current_dasha, birth_panchanga, panchanga_today, transits.

🪔 Udhyath — Vedic astrology, computed precisely. Back to the app · Swagger · ReDoc