排盘 API 已上线
IZTRO 计算引擎 · Cloudflare Pages Functions · 支持 Key 校验与配额
接口
POST /api/chart
Content-Type: application/json
X-Api-Key: <你的 key>(配置了 API_KEYS 后必填)
{
"calendar": "solar", // solar 公历 | lunar 农历
"date": "1990-1-1", // 公历或农历日期
"timeIndex": 6, // 0=早子 … 12=晚子;也可传 "hour": 0-23
"gender": "男"
}
返回
{
"ok": true,
"meta": { "engine": "iztro", "version": "2.6.5", "mode": "open", "remaining": null },
"data": {
"solarDate": "1990-1-1", "lunarDate": "一九八九年十二月初五",
"chineseDate": "己巳 丁丑 辛卯 甲午",
"fiveElementsClass": "火六局", "soul": "…", "body": "…",
"palaces": [ { "name": "命宫", "heavenlyStem": "…", "majorStars": [...] } ]
}
}
入口