{
  "openapi": "3.0.3",
  "info": {
    "title": "Jyotish API",
    "version": "1.0.0",
    "description": "Self-hosted Vedic astrology as a JSON API. Calls work in open demo mode without a key; send an OAuth2 Bearer token (from /token) to meter against your account."
  },
  "servers": [
    {
      "url": "https://hsksem.online/api/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "OAuth2 client-credentials access token from POST /token."
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    },
    {}
  ],
  "paths": {
    "/kundli": {
      "get": {
        "summary": "Vedic birth chart (nakshatra, rasi, mangal dosha, yogas, dasha).",
        "operationId": "kundli",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 2.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "datetime",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1990-01-31T14:20:00+05:30"
            },
            "description": "ISO birth date-time (bare time assumed IST)."
          },
          {
            "name": "coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "28.6139,77.2090"
            },
            "description": "Birth coordinates \"lat,lng\"."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Rahul"
            },
            "description": "Optional label."
          },
          {
            "name": "svg",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "1"
            },
            "description": "Set 1 for the North-Indian chart SVG."
          }
        ]
      }
    },
    "/chart": {
      "get": {
        "summary": "Full chart facts: planets, houses, nakshatra, dasha, transits.",
        "operationId": "chart",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 2.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "datetime",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1990-01-31T14:20:00+05:30"
            },
            "description": "ISO birth date-time (bare time assumed IST)."
          },
          {
            "name": "coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "28.6139,77.2090"
            },
            "description": "Birth coordinates \"lat,lng\"."
          }
        ]
      }
    },
    "/match": {
      "get": {
        "summary": "Ashtakoota guna milan (36-point compatibility).",
        "operationId": "match",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 2.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "girl_dob",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1995-06-15T10:30:00+05:30"
            },
            "description": "Girl ISO date-time."
          },
          {
            "name": "girl_coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "28.6139,77.2090"
            },
            "description": "Girl \"lat,lng\"."
          },
          {
            "name": "boy_dob",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1993-03-22T14:00:00+05:30"
            },
            "description": "Boy ISO date-time."
          },
          {
            "name": "boy_coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "19.0760,72.8777"
            },
            "description": "Boy \"lat,lng\"."
          }
        ]
      }
    },
    "/porutham": {
      "get": {
        "summary": "South-Indian 10-porutham matching.",
        "operationId": "porutham",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 2.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "girl_dob",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1995-06-15T10:30:00+05:30"
            },
            "description": "Girl ISO date-time."
          },
          {
            "name": "girl_coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "28.6139,77.2090"
            },
            "description": "Girl \"lat,lng\"."
          },
          {
            "name": "boy_dob",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1993-03-22T14:00:00+05:30"
            },
            "description": "Boy ISO date-time."
          },
          {
            "name": "boy_coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "19.0760,72.8777"
            },
            "description": "Boy \"lat,lng\"."
          }
        ]
      }
    },
    "/panchang": {
      "get": {
        "summary": "Tithi, nakshatra, yoga, karana, vaara, sun/moon timings.",
        "operationId": "panchang",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 1.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "28.6139,77.2090"
            },
            "description": "Birth coordinates \"lat,lng\"."
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-10-30"
            },
            "description": "YYYY-MM-DD; defaults to today."
          }
        ]
      }
    },
    "/muhurat": {
      "get": {
        "summary": "Auspicious/inauspicious periods (Rahu kalam, Abhijit, …).",
        "operationId": "muhurat",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 1.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "28.6139,77.2090"
            },
            "description": "Birth coordinates \"lat,lng\"."
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-10-30"
            },
            "description": "YYYY-MM-DD; defaults to today."
          }
        ]
      }
    },
    "/choghadiya": {
      "get": {
        "summary": "Day & night Choghadiya.",
        "operationId": "choghadiya",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 1.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "28.6139,77.2090"
            },
            "description": "Birth coordinates \"lat,lng\"."
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-10-30"
            },
            "description": "YYYY-MM-DD; defaults to today."
          }
        ]
      }
    },
    "/hora": {
      "get": {
        "summary": "Planetary Hora (24 sunrise-anchored hours).",
        "operationId": "hora",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 1.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "28.6139,77.2090"
            },
            "description": "Birth coordinates \"lat,lng\"."
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-10-30"
            },
            "description": "YYYY-MM-DD; defaults to today."
          }
        ]
      }
    },
    "/numerology": {
      "get": {
        "summary": "Pythagorean + Chaldean + Mulank/Bhagyank/Life Path.",
        "operationId": "numerology",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 1.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1990-01-31"
            },
            "description": "YYYY-MM-DD date of birth."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Rahul Sharma"
            },
            "description": "Full name for name numbers."
          }
        ]
      }
    },
    "/western": {
      "get": {
        "summary": "Western tropical natal chart + aspects.",
        "operationId": "western",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 2.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "datetime",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1990-01-31T14:20:00+05:30"
            },
            "description": "ISO birth date-time (bare time assumed IST)."
          },
          {
            "name": "coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "28.6139,77.2090"
            },
            "description": "Birth coordinates \"lat,lng\"."
          }
        ]
      }
    },
    "/kp": {
      "get": {
        "summary": "KP-style star lord + sub lord per planet/ascendant.",
        "operationId": "kp",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 2.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "datetime",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1990-01-31T14:20:00+05:30"
            },
            "description": "ISO birth date-time (bare time assumed IST)."
          },
          {
            "name": "coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "28.6139,77.2090"
            },
            "description": "Birth coordinates \"lat,lng\"."
          }
        ]
      }
    },
    "/calendar": {
      "get": {
        "summary": "Hindu calendar: paksha, tithi, lunar month, samvat.",
        "operationId": "calendar",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 1.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-10-30"
            },
            "description": "YYYY-MM-DD; defaults to today."
          }
        ]
      }
    },
    "/festivals": {
      "get": {
        "summary": "Major Hindu festivals for a year.",
        "operationId": "festivals",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 1.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026"
            },
            "description": "Defaults to current year."
          }
        ]
      }
    },
    "/planet-position": {
      "get": {
        "summary": "Sidereal planet positions + ascendant.",
        "operationId": "planet_position",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 1.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "datetime",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1990-01-31T14:20:00+05:30"
            },
            "description": "ISO birth date-time (bare time assumed IST)."
          },
          {
            "name": "coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "28.6139,77.2090"
            },
            "description": "Birth coordinates \"lat,lng\"."
          }
        ]
      }
    },
    "/dasha": {
      "get": {
        "summary": "Vimshottari dasha tree + current period.",
        "operationId": "dasha",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 1.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "datetime",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1990-01-31T14:20:00+05:30"
            },
            "description": "ISO birth date-time (bare time assumed IST)."
          },
          {
            "name": "coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "28.6139,77.2090"
            },
            "description": "Birth coordinates \"lat,lng\"."
          }
        ]
      }
    },
    "/divisional-chart": {
      "get": {
        "summary": "Varga chart (D1..D30).",
        "operationId": "divisional_chart",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 2.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "datetime",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1990-01-31T14:20:00+05:30"
            },
            "description": "ISO birth date-time (bare time assumed IST)."
          },
          {
            "name": "coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "28.6139,77.2090"
            },
            "description": "Birth coordinates \"lat,lng\"."
          },
          {
            "name": "varga",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "D9"
            },
            "description": "One of D1 D2 D3 D4 D7 D9 D10 D12 D30."
          }
        ]
      }
    },
    "/mangal-dosha": {
      "get": {
        "summary": "Manglik check (Lagna/Moon/Venus).",
        "operationId": "mangal_dosha",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 1.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "datetime",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1990-01-31T14:20:00+05:30"
            },
            "description": "ISO birth date-time (bare time assumed IST)."
          },
          {
            "name": "coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "28.6139,77.2090"
            },
            "description": "Birth coordinates \"lat,lng\"."
          }
        ]
      }
    },
    "/kaal-sarp-dosha": {
      "get": {
        "summary": "Kaal Sarp dosha + type.",
        "operationId": "kaal_sarp_dosha",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 1.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "datetime",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1990-01-31T14:20:00+05:30"
            },
            "description": "ISO birth date-time (bare time assumed IST)."
          },
          {
            "name": "coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "28.6139,77.2090"
            },
            "description": "Birth coordinates \"lat,lng\"."
          }
        ]
      }
    },
    "/sade-sati": {
      "get": {
        "summary": "Sade Sati status, phase, transit window.",
        "operationId": "sade_sati",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 1.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "datetime",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1990-01-31T14:20:00+05:30"
            },
            "description": "ISO birth date-time (bare time assumed IST)."
          },
          {
            "name": "coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "28.6139,77.2090"
            },
            "description": "Birth coordinates \"lat,lng\"."
          },
          {
            "name": "on",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-10-30"
            },
            "description": "Date to check; defaults to today."
          }
        ]
      }
    },
    "/guru-chandal": {
      "get": {
        "summary": "Guru Chandal yoga (Jupiter + Rahu/Ketu).",
        "operationId": "guru_chandal",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 1.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "datetime",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1990-01-31T14:20:00+05:30"
            },
            "description": "ISO birth date-time (bare time assumed IST)."
          },
          {
            "name": "coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "28.6139,77.2090"
            },
            "description": "Birth coordinates \"lat,lng\"."
          }
        ]
      }
    },
    "/pitra-dosha": {
      "get": {
        "summary": "Pitra Dosha (Sun/node afflictions).",
        "operationId": "pitra_dosha",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 1.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "datetime",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1990-01-31T14:20:00+05:30"
            },
            "description": "ISO birth date-time (bare time assumed IST)."
          },
          {
            "name": "coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "28.6139,77.2090"
            },
            "description": "Birth coordinates \"lat,lng\"."
          }
        ]
      }
    },
    "/transit": {
      "get": {
        "summary": "Current transits (gochar) + house-from-Moon.",
        "operationId": "transit",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 1.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "datetime",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1990-01-31T14:20:00+05:30"
            },
            "description": "ISO birth date-time (bare time assumed IST)."
          },
          {
            "name": "coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "28.6139,77.2090"
            },
            "description": "Birth coordinates \"lat,lng\"."
          },
          {
            "name": "on",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "2026-10-30"
            },
            "description": "Transit date; defaults to today."
          }
        ]
      }
    },
    "/synastry": {
      "get": {
        "summary": "Two-chart overlay + inter-aspects.",
        "operationId": "synastry",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 2.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "a_datetime",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1990-01-31T14:20:00+05:30"
            },
            "description": "Person A ISO date-time."
          },
          {
            "name": "a_coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "28.6139,77.2090"
            },
            "description": "Person A \"lat,lng\"."
          },
          {
            "name": "b_datetime",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1993-03-22T14:00:00+05:30"
            },
            "description": "Person B ISO date-time."
          },
          {
            "name": "b_coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "19.0760,72.8777"
            },
            "description": "Person B \"lat,lng\"."
          }
        ]
      }
    },
    "/varshaphal": {
      "get": {
        "summary": "Annual (solar-return) chart + Muntha.",
        "operationId": "varshaphal",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 2.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "datetime",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1990-01-31T14:20:00+05:30"
            },
            "description": "ISO birth date-time (bare time assumed IST)."
          },
          {
            "name": "coordinates",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "28.6139,77.2090"
            },
            "description": "Birth coordinates \"lat,lng\"."
          },
          {
            "name": "year",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "2026"
            },
            "description": "Year for the solar return."
          }
        ]
      }
    },
    "/horoscope": {
      "get": {
        "summary": "Daily horoscope by sign, grounded in today's transits.",
        "operationId": "horoscope",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 1.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "sign",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "aries"
            },
            "description": "aries … pisces."
          }
        ]
      }
    },
    "/geocode": {
      "get": {
        "summary": "Place search → coordinates (lat,lng).",
        "operationId": "geocode",
        "tags": [
          "Astrology"
        ],
        "description": "Free endpoint.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Mumbai"
            },
            "description": "City/place name."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "5"
            },
            "description": "Max results (default 5)."
          }
        ]
      }
    },
    "/report": {
      "post": {
        "summary": "Full Vedic report as a downloadable PDF.",
        "operationId": "report",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 5.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "datetime": "1990-01-31T14:20:00+05:30",
                "coordinates": "28.6139,77.2090",
                "name": "Rahul Sharma"
              }
            }
          }
        }
      }
    },
    "/batch-match": {
      "post": {
        "summary": "Score up to 500 guna-milan pairs in one call.",
        "operationId": "batch_match",
        "tags": [
          "Astrology"
        ],
        "description": "Credit cost: 2.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "pairs": [
                  {
                    "girl_dob": "...",
                    "girl_coordinates": "lat,lng",
                    "boy_dob": "...",
                    "boy_coordinates": "lat,lng"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "summary": "Service status and endpoint list.",
        "operationId": "health",
        "tags": [
          "Astrology"
        ],
        "description": "Free endpoint.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        }
      }
    }
  }
}