---
title: "Calculate BaZi (Four Pillars)"
method: POST
path: "/api/v1/chinese/bazi"
tags: ["Chinese", "chinese"]
---

# Calculate BaZi (Four Pillars)

`POST /api/v1/chinese/bazi`

## Request

- Base URL: `https://api.freeastroapi.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.freeastroapi.com/api/v1/chinese/bazi`
- Auth: none declared

Calculate Chinese BaZi (Four Pillars of Destiny) chart.
Includes:
- 4 Pillars (GanZhi) for Year, Month, Day, Hour
- 5 Element Analysis (Wu Xing)
- Solar Term indicators

Timezone handling:
- Uses "AUTO" by default to resolve valid LMT (Local Mean Time) for historical dates.

## Headers

- `x-api-key` string, nullable

## Request body

- BaziRequest
  - `year` integer, required
  - `month` integer, required
  - `day` integer, required
  - `hour` integer
  - `minute` integer
  - `lat` number, nullable
  - `lng` number, nullable
  - `city` string, nullable
  - `tz_str` string, nullable
  - `sex` 'M' | 'F'
  - `time_standard` 'civil' | 'true_solar' | 'true_solar_absolute'
  - `calendar` 'gregorian' | 'julian'
  - `include_ten_gods` boolean
  - `include_pinyin` boolean
  - `include_stars` boolean
  - `include_interactions` boolean
  - `include_professional` boolean
  - `include_debug` boolean
  - `include_current_flow` boolean
  - `lang` string

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/freeastroapi/apis/astroservice-api.md) · [All operations](https://skmtc.dev/freeastroapi/apis/astroservice-api/llms.txt) · [OpenAPI document](https://skmtc.dev/freeastroapi/apis/astroservice-api/revisions/0c9b4a759522?raw)
