# Chinese Calendar BaZi (Four Pillars) Calculator

> Chinese Calendar BaZi (Four Pillars) Calculator is a paid API for AI agents from chinese-culture.x402tookit.com, paid per call via x402, $0.03/call, status unknown (last checked 2026-11-02).

Generates a Four Pillars (BaZi) astrology chart for a given date and optional time, returning heavenly stems, earthly branches, zodiac animals, five-element counts, and day master details.

## Facts

- Endpoint: GET https://chinese-culture.x402tookit.com/bazi?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chinese-calendar-bazi-four-pillars-calculator-18c68013
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PVfHlazHoiI0a6dImfLCu

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 chinese-calendar-bazi-four-pillars-calculator-18c68013
```

Example prompt: Can you generate the Four Pillars BaZi chart for March 15, 1990 at 14:30, using UTC+8, showing the heavenly stems, earthly branches, zodiac animals, and five-element counts for each pillar?

## When to prefer this

Choose this endpoint when you need structured, machine-readable BaZi / Four Pillars data including stems, branches, animals, five-element counts, and day master for a specific Gregorian date and optional time. It is more suitable than a general Chinese calendar lookup when the use case is Chinese metaphysics, astrology, feng shui, or destiny analysis rather than simple lunar date conversion. It covers dates from 1930 to 2100 and supports configurable UTC offsets and day-start conventions (midnight or 23:00) for different BaZi schools.

## Known failure modes

- Date out of supported range (1930–2100) returns an error
- Malformed date format (not YYYY-MM-DD) causes a validation error
- Invalid time format (not HH:MM) causes a validation error
- UTC offset outside -12 to 14 returns a validation error
- Hour pillar omitted if time parameter is not supplied (expected behavior, not a failure)
- Network or payment errors may return 402 or 5xx responses

## How this service works

Four Pillars (BaZi) chart for a date and optional time: stems, branches, animals, five-element counts, day master.

## Output

Returns a structured BaZi chart object with four pillars (year, month, day, hour): each pillar includes Chinese character text, pinyin romanization, heavenly stem element and polarity, earthly branch element, and zodiac animal. Also includes aggregate five-element counts across all pillars, the day master (day stem identity), and metadata such as the source and calculation timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "date"
     ],
     "properties": {
      "date": {
       "type": "string",
       "description": "Civil date YYYY-MM-DD, 1930 to 2100"
      },
      "time": {
       "type": "string",
       "description": "Local clock time HH:MM; omit to skip the hour pillar"
      },
      "dayStarts": {
       "type": "string",
       "description": "midnight (default) or 23:00 for schools whose day begins at 23:00"
      },
      "utcOffset": {
       "type": "number",
       "description": "Clock offset from UTC in hours, -12 to 14, default 8 (China)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "pillars": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "day": {
         "type": [
          "null",
          "object"
         ],
         "properties": {
          "text": {
           "type": [
            "null",
            "string"
           ]
          },
          "pinyin": {
           "type": [
            "null",
            "string"
           ]
          },
          "stemElement": {
           "type": [
            "null",
            "string"
           ]
          },
          "branchAnimal": {
           "type": [
            "null",
            "string"
           ]
          },
          "stemPolarity": {
           "type": [
            "null",
            "string"
           ]
          },
          "branchElement": {
           "type": [
            "null",
            "string"
           ]
          }
         }
        },
        "hour": {
         "type": [
          "null",
          "object"
         ],
         "properties": {
          "text": {
           "type": [
            "nu
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chinese-calendar-bazi-four-pillars-calculator-18c68013/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chinese-culture.x402tookit.com](https://www.zero.xyz/host/chinese-culture.x402tookit.com/llms.txt)
