I built a BaZi/flying-star API where every answer is replayable (SHA-256)
Описание и применение
Создан API для традиционных китайских календарей, который возвращает все возможные варианты расчётов, прикрепляет к каждому ответу доказательства воспроизводимости и позволяет верифицировать результаты через SHA‑256.
Задача
Online BaZi calculators return inconsistent year pillars for the same birth date because they silently adopt different conventions (Lichun instant, Chinese New Year, January 1).
Результат
The API delivers deterministic, replayable results with explicit provenance, resolves convention ambiguities, and provides a verifiable audit trail, enabling reliable integration into apps and AI agents.
Рабочий процесс
- 1. Send a request to /v1/ganzhi, /v1/calendar, /v1/kua, or /v1/flying-star with date (and hour/gender as needed).
- 2. Receive JSON response containing results for all relevant conventions and provenance fields.
- 3. To verify later, POST the same request to /v1/replay with the input_digest; the API returns MATCH or MISMATCH.
- 4. For agent integration, register the MCP endpoint via "claude mcp add --transport http fengshui https://fengshuicalculator.com/v1/mcp" and use the listed tools (calendar, ganzhi, etc.).
Доказательства
Ask three online BaZi calculators for the same January birth date and you can get three different year pillars.
Every response carries provenance: engine version, ruleset id, and a SHA-256 input_digest computed over the JCS-canonicalised request.
Conventions are returned side by side. /v1/ganzhi returns all four year-convention × day-boundary combinations rather than guessing which one you meant.
- Дата записи: 2026-10-23T10:11:35.066Z