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 ReferenceSend 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"
}'Explore by Category
Getting Started
REST API Reference
AI Agents & LLM Tools
Embeddable UI Widgets
No-Code Automations
Calculation Accuracy & Integrity
Powered by official lunar algorithms with True Solar Time adjustments and classical Ziping methodology.