# BaZi Four Pillars Calculator (四柱八字)

> BaZi Four Pillars Calculator (四柱八字) is a paid API for AI agents from api.cn402.com, paid per call via x402, $0.16/call, status unknown (last checked 2026-09-15).

Converts a Western birth datetime into the Four Pillars of Destiny (year, month, day, hour gan-zhi pairs) used in Chinese astrology

## Facts

- Endpoint: GET https://api.cn402.com/bazi/sizhu
- Price: $0.16/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-cn402-com-5695408d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3CSnBwifsaCiJNLk633_D

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability api-cn402-com-5695408d
```

Example prompt: Can you calculate the BaZi Four Pillars of Destiny for someone born on March 15, 1990 at 7:30 AM — I need the gan-zhi for all four pillars including the Day Master.

## When to prefer this

Use this endpoint when you need to compute the foundational Four Pillars (四柱) from a Western birth datetime as the basis for any Chinese astrology analysis — including Day Master strength, Ten Gods, Major Luck Cycles, or Shen Sha calculations. It is the essential first step before calling sibling endpoints that require gan-zhi input.

## Known failure modes

- Invalid or missing birth date returns a 400 error
- Birth time out of valid range (e.g. hour > 23) causes a validation error
- Dates before the supported historical range may return an error or unexpected results
- Missing required datetime fields returns a parameter error
- Payment not included or insufficient triggers a 402 Payment Required response

## How this service works

BaZi Four Pillars, 八字四柱, Chinese astrology birth chart, 生辰八字, heavenly stems earthly branches, 天干地支, year-month-day-hour pillars, Chinese natal chart, Ba Zi calculator, Day Master, 日主. Compute Four Pillars of Destiny (year/month/day/hour gan-zhi) from any Western birth datetime. Foundation of Chinese astrology analysis.

## Output

Returns the four gan-zhi pillar pairs (year, month, day, hour), each consisting of a Heavenly Stem (天干) and Earthly Branch (地支), plus the Day Master identification — forming the complete BaZi birth chart foundation used in Chinese astrology analysis.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "birth": {
   "type": "string",
   "description": "Birth (required)"
  },
  "gender": {
   "type": "string",
   "description": "Gender (optional)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-cn402-com-5695408d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.cn402.com](https://www.zero.xyz/host/api.cn402.com/llms.txt)
