Developer API
A deterministic chart calculation you can embed.
The public calculation endpoints require no API key or account cookie. They return structured chart facts: not AI interpretation, stored profiles or a compatibility score.
See the full calculatorDirect answer
Browser clients on any origin can call POST /v1/charts/calculate without credentials. The response is produced by the deterministic BaZi engine. This is a prototype rule profile, not a certified prediction or an uptime-guaranteed commercial SLA.
Public endpoints
Three keyless API operations
| Method and path | Purpose | Credentials |
|---|---|---|
| POST /v1/charts/calculate | Calculate a complete or three-pillar chart. | None |
| GET /v1/locations/search?q=... | Return offline city matches and IANA time zones. | None |
| POST /v1/compatibility/calculate | Compare Day Master and same-position branch structure. | None |
Minimal request
Date, local time and IANA zone
Use the birthplace’s IANA time-zone identifier. Add latitude and longitude only when requesting true solar time. For an unknown birth time, set unknownTime: true and omit time.
{
"date": "2026-10-27",
"time": "12:00",
"timeZone": "Asia/Hong_Kong"
}Embeddable example
Paste a keyless calculator into another site
This deliberately small example displays structured JSON. Add your own accessible layout, validation and error handling. The public CORS policy applies only to the three endpoints above, without cookies.
<form id="bazi-form">
<input id="date" type="date" required>
<input id="time" type="time" required>
<input id="zone" value="Europe/London" required>
<button type="submit">Calculate</button>
</form>
<pre id="result"></pre>
<script>
const form = document.querySelector("#bazi-form");
form.addEventListener("submit", async (event) => {
event.preventDefault();
const response = await fetch(
"https://api.baziroute.com/v1/charts/calculate",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
date: document.querySelector("#date").value,
time: document.querySelector("#time").value,
timeZone: document.querySelector("#zone").value
})
}
);
const data = await response.json();
document.querySelector("#result").textContent =
JSON.stringify(data.chart?.pillars ?? data, null, 2);
});
</script>What is intentionally excluded
- · Account, saved chart and billing operations.
- · AI interpretation and its quotas or budgets.
- · User-specific analytics and cookies.
- · Compatibility scores, event predictions or professional advice.
Operational boundaries
- · No API-key identity or support entitlement is created.
- · Capacity and rate controls may change to prevent abuse.
- · The current chart engine is still a reviewed-prototype, not a certified standard.
- · Do not send unnecessary personal or sensitive data to any public endpoint.
Need AI or saved-account integration?
Those endpoints use authenticated cookies, quotas and provider costs. They are not part of the wildcard-CORS public API. Contact BaziRoute if you have a specific integration proposal that respects the method and privacy boundaries.
Public API documentation updated 27 October 2026. The prototype rule set is described in the Methodology page. No uptime, accuracy certification or commercial SLA is implied.