{"title":"Generate BaZi chart","fields":[{"key":"date","name":"date","kind":"date","required":true,"description":"Birth date in YYYY-MM-DD format. Sets the year, month and day pillars. The year pillar turns at Beginning of Spring rather than on 1 January, and the month pillar turns at each of the twelve minor solar terms rather than at a calendar month boundary.","example":"1990-06-15"},{"key":"time","name":"time","kind":"time","required":true,"description":"Birth time in 24-hour HH:MM:SS format. Sets the hour pillar, which is one of the four and carries the whole picture of later life and offspring. Each Earthly Branch covers two hours, so a birth within a few minutes of an odd hour can land in either. All four pillars are read in the local clock of the birth, and the day boundary is applied in that same clock; only the lunisolar calendar date itself is a world constant, fixed at UTC plus 8 so one instant has one Chinese date everywhere.","example":"14:30:00"},{"key":"timezone","name":"timezone","kind":"number","required":true,"description":"IANA name (e.g. \"America/New_York\", \"Europe/London\", \"UTC\"), decimal hours (e.g. -5 for EST, 1 for CET), or a fixed UTC offset (e.g. \"-05:00\", \"+01:00\"). Prefer the IANA name: it is resolved to the offset in force at the birth date and time, historical daylight-saving rules included, while a fixed offset or decimal is taken literally and will be wrong if it does not match the daylight-saving state at that moment. On a transition day a time in the repeated hour is read as its first occurrence and a time in the skipped hour is moved forward past the gap. Invalid timezones return 400 with a validation error.","min":-14,"max":14,"example":"America/New_York","role":"location"},{"key":"latitude","name":"latitude","kind":"number","required":false,"description":"Birth latitude in decimal degrees. Accepted for consistency with the other birth-data endpoints and does not affect any part of a BaZi chart. Defaults to 0.","min":-90,"max":90,"default":0,"example":0,"role":"location"},{"key":"longitude","name":"longitude","kind":"number","required":false,"description":"Birth longitude in decimal degrees. Positive is East, negative is West. Required when hourClock is \"local-mean\" or \"solar\", which shift the hour branch to the sun over the birth place; omitting it in either case returns 400. Ignored when hourClock is \"clock\".","min":-180,"max":180,"example":116.4,"role":"location"},{"key":"dayBoundary","name":"dayBoundary","kind":"tiles","required":false,"description":"Which instant starts the sexagenary DAY, which only matters for a birth between 23:00 and 23:59. \"midnight\" is the classical position of the Ming compendium San Ming Tong Hui: the day turns at 00:00 and 23:00 to 23:59 is the late zi hour of the day that is ending, so the hour stem is taken from that day. \"early-zi\" turns the whole day at 23:00, the practice in Hong Kong, Taiwan and much of South East Asia. \"split-zi\" is the compromise most software implements and the default here: the day still turns at 00:00, but the hour stem is taken from the next day. The three give three different answers for a late-evening birth and identical answers for every other birth.","enum":["split-zi","midnight","early-zi"],"default":"split-zi","example":"split-zi","fold":true},{"key":"yearBoundary","name":"yearBoundary","kind":"tiles","required":false,"description":"Which instant starts the sexagenary YEAR. \"li-chun\" is Beginning of Spring, around 4 February, and is the classical rule every BaZi text uses, so it is the default on this endpoint. \"lunar-new-year\" is the folk rule people mean when they say which animal they are, and it falls between late January and late February. The two disagree for any birth in the weeks between them: 14 February 2026 is a Wood Snake year under lunar-new-year and a Fire Horse year under li-chun.","enum":["li-chun","lunar-new-year"],"default":"li-chun","example":"li-chun","fold":true},{"key":"hourClock","name":"hourClock","kind":"tiles","required":false,"description":"Which clock the day boundary and the hour branch are read from, so a correction that carries a birth across midnight moves the day pillar with the hour. \"clock\" is civil time exactly as a birth certificate records it, which is what most calculators use and the default here. \"local-mean\" shifts to the mean sun over the birth longitude, a correction of up to 59 minutes at the edge of a wide time zone. \"solar\" adds the equation of time on top of that, up to a further 16 minutes. Both non-civil options need \"longitude\" in the request and return 400 without it.","enum":["clock","local-mean","solar"],"default":"clock","example":"clock","fold":true}],"hasLang":true,"groups":[{"location":{"fields":["latitude","longitude","timezone"],"required":true}}],"opensOnLoad":false}