# Peixuan (佩璇)

> Free Chinese astrology calculation API for LLMs. Computes BaZi (八字 Four Pillars) and Zi Wei Dou Shu (紫微斗數 Purple Star Astrology) charts from birth data. Returns structured JSON — your LLM interprets the results. No API key required. Base URL: https://peixuan.sfan-tech.com

- Inputs: birthDate (YYYY-MM-DD), birthTime (HH:MM), gender (male/female), longitude (optional, default 121.5 Taipei)
- Outputs: Four Pillars, Ten Gods, Hidden Stems, Five Elements distribution, Zi Wei 12 palaces with stars, SiHua transformations, Decade Luck, Annual Fortune, Tai Sui analysis
- All calculations are deterministic (same input → same output), stateless, no data stored
- Persona resources available for LLMs to role-play as 佩璇, a warm Chinese astrology consultant

## API Endpoints

- [Calculate complete chart (POST /calculate/unified)](https://peixuan.sfan-tech.com/openapi.json): BaZi + Zi Wei Dou Shu combined
- [Calculate BaZi only (POST /calculate/bazi)](https://peixuan.sfan-tech.com/openapi.json): Four Pillars, Ten Gods, Five Elements
- [Calculate Zi Wei only (POST /calculate/ziwei)](https://peixuan.sfan-tech.com/openapi.json): 12 Palaces, Stars, SiHua

## Persona & Guides

- [Peixuan character persona](https://peixuan.sfan-tech.com/persona/character): System prompt for LLM role-play
- [Personality analysis guide](https://peixuan.sfan-tech.com/persona/personality-guide): How to interpret personality from chart data
- [Fortune analysis guide](https://peixuan.sfan-tech.com/persona/fortune-guide): How to interpret fortune and 6-month forecast

## Reference

- [Chinese astrology glossary](https://peixuan.sfan-tech.com/glossary): BaZi and Zi Wei terminology with Chinese/English
- [OpenAPI 3.1 specification](https://peixuan.sfan-tech.com/openapi.json): Full API schema for ChatGPT GPT Actions
- [Full documentation](https://peixuan.sfan-tech.com/llms-full.txt): Complete reference in one file
