BaZi (Four Pillars) API
One birth moment into the whole classical apparatus: four pillars, the stems each branch shelters, na yin, the twelve life stages, element balance over all eight characters, a named-framework strength verdict, the symbolic stars, and the branch and stem interactions. One call, JSON out, 21 languages.
BaZi (Four Pillars) API
The endpoint resolves the birth to the exact Li Chun and 節 instants from the ephemeris rather than from a date table, so a birth within a day of a boundary lands in the right year and month. Day and hour follow the birthplace clock and roll at 23:00. From those four pillars it opens the branches: one to three hidden stems each, with the role and weight the tradition gives them, which is where most of a chart's elements actually live. It then derives the na yin of every pillar, the day master's stage against each branch, three separate element counts, the 扶抑 strength reading with its three classical criteria reported unweighted, the six symbolic stars computed from both the year and the day reference pillar, and every combination, clash, harm and punishment present.
POST/v1/bazi/chart
curl -X POST https://api.astroway.info/v1/bazi/chart \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json" \
-d '{
"date": "1990-05-15",
"time": "14:30:00",
"timezoneOffset": 8,
"language": "en"
}' {
"ok": true,
"data": {
"solarYear": 1990,
"pillars": [
{ "name": "year", "pillar": "Geng-Wu", "animalName": "Horse", "stemElementName": "Metal" },
{ "name": "month", "pillar": "Xin-Si", "animalName": "Snake", "stemElementName": "Metal" }
],
"dayMaster": { "stem": "Geng", "element": "Metal", "polarity": "Yang" },
"elementBalance": {
"weighted": { "Wood": 0.4, "Fire": 1.6, "Earth": 1.6, "Metal": 3.3, "Water": 1.1 },
"missingElements": []
},
"strength": { "verdict": "strong", "supportRatio": 0.557, "hasSeason": false, "hasRoot": true },
"symbolicStars": { "byDayPillar": [ { "english": "Canopy", "pillars": ["day"] } ] },
"interactions": [ { "english": "Six Harmony", "members": ["Wu","Wei"], "producesElement": "Earth" } ]
}
} Parameters
| name | type | Required | |
|---|---|---|---|
| date | string (YYYY-MM-DD) | yes | Birth date. |
| time | string (HH:MM:SS) | no | Local clock time at birth. Without it there is no hour pillar and the analysis runs on six characters, which every field of the response says. |
| timezoneOffset | number (hours) | no | The UTC offset the clock was actually running on. A 1988 Beijing birth ran on +9 under summer time; no arithmetic recovers that from the date. |
| longitude | number | no | Birth longitude, east positive. Inert unless trueSolarTime is set. |
| trueSolarTime | boolean | no | Cut the double-hour from the sun over the birth place. Reaches the day and hour only: the year and month turn on world instants. |
| stageSchool | string | no | classical (陽順陰逆, default) or unified (陰陽同生同死) for the twelve life stages. |
| language | string | no | Any of 21 codes. Animals, elements, polarity and stage names come back translated; stems and branches stay in pinyin. |
When to use it
Reach for this instead of seven round trips when you are rendering a chart. The single-purpose endpoints exist beside it for when you want one table. If your users are born far from their zone's meridian, pass longitude with trueSolarTime: China runs one zone across sixty degrees and a Kashgar birth sits nearly three hours from solar noon, which is a whole double-hour of the reading.
Notes
Where the transmissions genuinely differ, both readings ship and the response names the split rather than picking one silently: the yin-stem direction through the twelve stages, both yin-blade placements, the 庚 nobleman, the element of the 午未 harmony, and the strength thresholds, which are this API's convention and not a canonical rule. Our four convention answers are declared in the disclaimer of every response and were run against the Jade Almanac CC0 probe set; the results are on the conventions page.
Try the BaZi chart API
Grab a key and make your first call in under a minute.