Skip to main content
SDK & Integrations
Developer Documentation Hub

BaZi API Developer Documentation

Welcome to the official developer documentation for BaZi API — the high-precision Four Pillars (BaZi / 八字) calculation engine. Build applications, AI conversational agents, daily calendar automations, and compatibility workflows with sub-500ms response times and True Solar Time accuracy.

Instant Quickstart Request

Full API Reference

Send your first POST request to calculate the Four Pillars, Day Master, Ten Gods, and Five Elements distribution:

cURL Quickstart
Bash
curl -X POST https://api.baziapi.pro/api/v2/bazi/calculate \
  -H "x-api-key: bazi_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "birthDate": "1995-10-24",
    "birthTime": "08:15",
    "gender": "male",
    "timezone": "America/New_York",
    "language": "en"
  }'

Calculation Accuracy & Integrity

Powered by official lunar algorithms with True Solar Time adjustments and classical Ziping methodology.

Get Free API Key