{"openapi":"3.1.0","info":{"title":"释玄斋易通宝 · 玄学排盘 API","version":"2.0.0","summary":"28 项中国传统命理排盘能力，按调用量计费。支持 OpenAI function-calling 与 MCP。","description":"释玄斋第七代传人罗李华团队的玄学算法 API。覆盖八字命理、紫微斗数、奇门遁甲、大六壬、六爻占卜、塔罗、周公解梦、风水罗盘、金口诀、择日通胜、姓名分析、观音灵签、生肖运程、事项择日、合婚，以及小孩起名、公司起名、八宅排盘、玄空排盘、阴宅速查、鲁班尺、号码分析、星座解析、鬼谷定数、邵子神数、黄帝内经道医辩证、七政星盘、天文占星共 28 项功能。\n\n**计费方式**：预付费积分，按次扣减。单次 1~10 积分（1 积分 ≈ 0.2 元）。\n积分五档：1 分（查表类）/ 3 分（进阶排盘）/ 6 分（专家级：玄空·阴宅·鬼谷·邵子·黄帝内经·七政）/ 10 分（基础排盘主力档：八字·姓名·六爻·罗盘·金口诀·择日·八宅·天文占星）。\n**大师详批档（2 分）**：任意功能请求体加 `\"mode\": \"detail\"`，即以 2 积分获取完整长文解读，响应额外返回 `detailText` 与 `detailReport` 字段，适合直接喂给大模型或渲染解读页面。\n\n**三种接入方式**：\n1. REST：`POST {base}/v1/{feature}`，Header `Authorization: Bearer <API_KEY>`\n2. OpenAI function-calling：GET `{base}/v1/openai-tools` 取 tools 数组\n3. MCP：POST `{base}/mcp`，标准 JSON-RPC（tools/list、tools/call）\n\n**获取 API Key**：见 https://www.zjhl.fjzyi.com/api-docs.html\n\n**免责声明**：传统文化视角，仅供娱乐参考，不作绝对定论。","termsOfService":"https://www.zjhl.fjzyi.com/about.html","contact":{"name":"释玄斋易通宝","url":"https://www.zjhl.fjzyi.com/about.html"},"license":{"name":"商业授权","url":"https://www.zjhl.fjzyi.com/api-docs.html"}},"servers":[{"url":"https://www.zjhl.fjzyi.com/api/calc","description":"释玄斋玄学 API 平台"}],"tags":[{"name":"命理","description":"命理类排盘能力"},{"name":"命名","description":"命名类排盘能力"},{"name":"择吉","description":"择吉类排盘能力"},{"name":"占卜","description":"占卜类排盘能力"},{"name":"运势","description":"运势类排盘能力"},{"name":"术数","description":"术数类排盘能力"},{"name":"合婚","description":"合婚类排盘能力"},{"name":"风水","description":"风水类排盘能力"},{"name":"器物","description":"器物类排盘能力"},{"name":"号码","description":"号码类排盘能力"},{"name":"星座","description":"星座类排盘能力"},{"name":"医易","description":"医易类排盘能力"},{"name":"星命","description":"星命类排盘能力"}],"paths":{"/v1/bazi":{"post":{"tags":["命理"],"summary":"八字排盘","operationId":"sxz_bazi","description":"根据公历出生时间排定八字四柱（年柱、月柱、日柱、时柱），并给出日主、十神、纳音、藏干、五行计数、神煞。用于命理分析、性格/运势推断。\n\n**单次消耗 10 积分**（2 元参考成本）。\n\n示例入参：\n```json\n{\n  \"year\": 1990,\n  \"month\": 5,\n  \"day\": 20,\n  \"hour\": 14,\n  \"gender\": \"男\"\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"year":{"type":"integer","description":"出生年份，公历 1900-2100","minimum":1900,"maximum":2100},"month":{"type":"integer","description":"出生月份 1-12","minimum":1,"maximum":12},"day":{"type":"integer","description":"出生日 1-31","minimum":1,"maximum":31},"hour":{"type":"integer","description":"出生时辰 0-23（24小时制）","minimum":0,"maximum":23},"gender":{"type":"string","description":"性别","enum":["男","女"],"default":"男"},"isLunar":{"type":"boolean","description":"入参是否为农历（默认 false=公历）","default":false},"isLeapMonth":{"type":"boolean","description":"是否闰月","default":false}},"required":["year","month","day","hour"]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ceming":{"post":{"tags":["命名"],"summary":"姓名分析（测名/公司名）","operationId":"sxz_ceming","description":"分析姓名或公司名的五行搭配、三才五格、音形义吉凶，给出评分与改进建议。type 可选 person（人名）或 company（公司/品牌名）。\n\n**单次消耗 10 积分**（2 元参考成本）。\n\n示例入参：\n```json\n{\n  \"name\": \"罗李华\",\n  \"type\": \"person\",\n  \"gender\": \"男\"\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"待分析的名字（中文）"},"type":{"type":"string","description":"分析类型","enum":["person","company"],"default":"person"},"gender":{"type":"string","description":"人名时的性别","enum":["男","女"],"default":"男"}},"required":["name"]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/huangli":{"post":{"tags":["择吉"],"summary":"择日通胜（黄历宜忌）","operationId":"sxz_huangli","description":"给定公历日期，返回当日干支、生肖、冲煞、建除十二神，以及宜/忌事项清单，用于择吉、开业、婚嫁、动土等选日。\n\n**单次消耗 1 积分**（0.2 元参考成本）。\n\n示例入参：\n```json\n{\n  \"year\": 2026,\n  \"month\": 11,\n  \"day\": 18\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"year":{"type":"integer","description":"公历年份","minimum":1900,"maximum":2100},"month":{"type":"integer","description":"公历月份 1-12","minimum":1,"maximum":12},"day":{"type":"integer","description":"公历日 1-31","minimum":1,"maximum":31}},"required":["year","month","day"]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/guanyin":{"post":{"tags":["占卜"],"summary":"观音灵签","operationId":"sxz_guanyin","description":"抽取观音灵签（1-100 签），返回签号、签等（上上/上/中/下）、签诗、解曰、寓意与建议。lot 不填则随机抽一签。\n\n**单次消耗 1 积分**（0.2 元参考成本）。\n\n示例入参：\n```json\n{\n  \"lot\": 18\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"lot":{"type":"integer","description":"指定签号 1-100；不填则随机","default":0}},"required":[]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/shengxiao":{"post":{"tags":["运势"],"summary":"生肖运程","operationId":"sxz_shengxiao","description":"给定生肖（或出生年份），返回该生肖的性格特征、年度运势、三合六合贵人、相冲相害，以及开运建议。\n\n**单次消耗 1 积分**（0.2 元参考成本）。\n\n示例入参：\n```json\n{\n  \"zodiac\": \"龙\"\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"zodiac":{"type":"string","description":"生肖名（鼠牛虎兔龙蛇马羊猴鸡狗猪）；不填可用 year"},"year":{"type":"integer","description":"出生年份，用于推导生肖","minimum":1900,"maximum":2100}},"required":[]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/liuyao":{"post":{"tags":["占卜"],"summary":"六爻占卜","operationId":"sxz_liuyao","description":"依据传统六爻（文王六十四卦）起卦解卦：支持按时间起卦、手动摇卦(6枚硬币)、数字起卦、文字测字、随机起卦。返回本卦/变卦/互卦/错卦/综卦、六亲、六神与综合解读。\n\n**单次消耗 10 积分**（2 元参考成本）。\n\n示例入参：\n```json\n{\n  \"method\": \"random\"\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"method":{"type":"string","description":"起卦方式","enum":["time","coins","numbers","text","random"],"default":"random"},"year":{"type":"integer","description":"（method=time 时）起卦公历年份","minimum":1900,"maximum":2100},"month":{"type":"integer","description":"（method=time 时）月份 1-12","minimum":1,"maximum":12},"day":{"type":"integer","description":"（method=time 时）日 1-31","minimum":1,"maximum":31},"hour":{"type":"integer","description":"（method=time 时）时辰 0-23","minimum":0,"maximum":23},"coins":{"type":"array","description":"（method=coins 时）6 个数字，每项为 6/7/8/9"},"numbers":{"type":"string","description":"（method=numbers 时）6 个数字串，空格/逗号分隔，如 \"7 8 6 9 7 8\""},"text":{"type":"string","description":"（method=text 时）用于测字起卦的中文文字"}},"required":[]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/qimen":{"post":{"tags":["术数"],"summary":"奇门遁甲排盘","operationId":"sxz_qimen","description":"奇门遁甲转盘排盘：真太阳时换算、定局（拆补/置闰）、值符值使、天地人神四盘（九宫地盘、天盘九星、天盘干、八门、八神）、旬空与驿马。jia 可选时/日/月/年家奇门。\n\n**单次消耗 3 积分**（0.6000000000000001 元参考成本）。\n\n示例入参：\n```json\n{\n  \"year\": 2026,\n  \"month\": 11,\n  \"day\": 18,\n  \"hour\": 14,\n  \"jia\": \"时\",\n  \"method\": \"拆补\"\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"year":{"type":"integer","description":"公历年份","minimum":1900,"maximum":2100},"month":{"type":"integer","description":"公历月份 1-12","minimum":1,"maximum":12},"day":{"type":"integer","description":"公历日 1-31","minimum":1,"maximum":31},"hour":{"type":"integer","description":"时辰 0-23","minimum":0,"maximum":23},"minute":{"type":"integer","description":"分钟 0-59","default":0},"longitude":{"type":"number","description":"观测地经度（度），默认 120（中原时）","default":120},"jia":{"type":"string","description":"家奇门类型","enum":["时","日","月","年"],"default":"时"},"method":{"type":"string","description":"定局法","enum":["拆补","置闰"],"default":"拆补"},"useTrue":{"type":"boolean","description":"是否换算真太阳时（默认 true）","default":true}},"required":["year","month","day","hour"]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ziwei":{"post":{"tags":["命理"],"summary":"紫微斗数","operationId":"sxz_ziwei","description":"紫微斗数命盘：十二宫、十四主星、四化（禄权科忌）、乙级星/神煞、命宫/身宫、五行局。复用前端纯算法内核（ziweicore.js + ziweistar 常量，已剥离 jQuery/UI 依赖）。\n\n**单次消耗 3 积分**（0.6000000000000001 元参考成本）。\n\n示例入参：\n```json\n{\n  \"year\": 1990,\n  \"month\": 5,\n  \"day\": 20,\n  \"hour\": 14,\n  \"gender\": \"男\"\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"year":{"type":"integer","description":"公历年份","minimum":1900,"maximum":2100},"month":{"type":"integer","description":"月份 1-12","minimum":1,"maximum":12},"day":{"type":"integer","description":"日 1-31","minimum":1,"maximum":31},"hour":{"type":"integer","description":"时辰 0-23","minimum":0,"maximum":23},"gender":{"type":"string","description":"性别","enum":["男","女"],"default":"男"},"isLunar":{"type":"boolean","description":"生辰是否已为农历","default":false},"isLeapMonth":{"type":"boolean","description":"农历闰月标记","default":false}},"required":["year","month","day","hour"]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/hehun":{"post":{"tags":["合婚"],"summary":"八字合婚","operationId":"sxz_hehun","description":"男女双方八字合婚：年/月/日/时柱生肖与十神关系、五行互补、喜用神互补、神煞、三元命卦、星座配对综合分析与建议。输入 male/female 各自公历生辰即可。\n\n**单次消耗 3 积分**（0.6000000000000001 元参考成本）。\n\n示例入参：\n```json\n{\n  \"male\": {\n    \"year\": 1990,\n    \"month\": 5,\n    \"day\": 20,\n    \"hour\": 14,\n    \"gender\": \"男\"\n  },\n  \"female\": {\n    \"year\": 1992,\n    \"month\": 8,\n    \"day\": 12,\n    \"hour\": 10,\n    \"gender\": \"女\"\n  }\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"male":{"type":"object","description":"男方：{year,month,day,hour,gender}"},"female":{"type":"object","description":"女方：{year,month,day,hour,gender}"}},"required":["male","female"]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/taluo":{"post":{"tags":["占卜"],"summary":"塔罗占卜","operationId":"sxz_taluo","description":"塔罗牌阵占卜：支持单张牌、三张牌（过去/现在/未来）、凯尔特十字（10张）、关系/职业/决策/灵性/健康等 8 种牌阵。随机抽牌并给出正/逆位牌义与逐位释义。spread 可选 single/three/celtic/relationship/career/decision/spiritual/health。\n\n**单次消耗 1 积分**（0.2 元参考成本）。\n\n示例入参：\n```json\n{\n  \"spread\": \"three\"\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"spread":{"type":"string","description":"牌阵","enum":["single","three","celtic","relationship","career","decision","spiritual","health"],"default":"three"},"seed":{"type":"integer","description":"随机种子，用于复现同一抽牌结果"}},"required":[]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/zhougong":{"post":{"tags":["占卜"],"summary":"周公解梦","operationId":"sxz_zhougong","description":"输入梦境关键词（如「蛇」「结婚」「掉牙」），从传统梦境库匹配最相关条目，返回梦境寓意、吉凶、建议与心理学/传统/现代多维度解读。\n\n**单次消耗 1 积分**（0.2 元参考成本）。\n\n示例入参：\n```json\n{\n  \"keyword\": \"蛇\"\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keyword":{"type":"string","description":"梦境关键词，如「蛇」「结婚」「掉牙」「考试」"},"limit":{"type":"integer","description":"返回条数上限","default":10}},"required":["keyword"]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/luopan":{"post":{"tags":["风水"],"summary":"风水罗盘（坐向分金）","operationId":"sxz_luopan","description":"输入方位角（deg，北=0顺时针）或坐山名（mountain，如「子」「午」）或地支（branch），返回二十四山坐向、后天/先天卦、九星、二十八宿、纳音等罗盘信息。\n\n**单次消耗 10 积分**（2 元参考成本）。\n\n示例入参：\n```json\n{\n  \"deg\": 0\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"deg":{"type":"number","description":"方位角（度），北=0，顺时针。与 mountain/branch 三选一"},"mountain":{"type":"string","description":"坐山名（二十四山之一，如「子」「午」「艮」）"},"branch":{"type":"string","description":"地支（子丑寅卯…亥）"},"year":{"type":"integer","description":"用于查询该年纳音五行","minimum":1900,"maximum":2100}},"required":[]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/jinkoujue":{"post":{"tags":["术数"],"summary":"金口诀（四课三传）","operationId":"sxz_jinkoujue","description":"大六壬金口诀排盘：输入公历生辰、地分（difen，如「子」）与时辰，排出人元/贵神/将神/地分四课，给出月将、空亡、格局、五行分布、神煞、合冲与文字断语。可选真太阳时与中气过宫月将法。\n\n**单次消耗 10 积分**（2 元参考成本）。\n\n示例入参：\n```json\n{\n  \"year\": 2026,\n  \"month\": 11,\n  \"day\": 18,\n  \"hour\": 14,\n  \"difen\": \"子\"\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"year":{"type":"integer","description":"公历年份","minimum":1900,"maximum":2100},"month":{"type":"integer","description":"公历月份 1-12","minimum":1,"maximum":12},"day":{"type":"integer","description":"公历日 1-31","minimum":1,"maximum":31},"hour":{"type":"integer","description":"时辰 0-23（也可传 shichen 时辰地支或 timeStr）","default":12,"minimum":0,"maximum":23},"shichen":{"type":"string","description":"时辰地支，如「子」「午」"},"timeStr":{"type":"string","description":"时间串 \"HH:MM\""},"difen":{"type":"string","description":"地分地支（子丑寅卯…亥）","default":"子"},"fangIdx":{"type":"integer","description":"地分索引 0-11（与 difen 二选一）"},"useTrue":{"type":"boolean","description":"是否换算真太阳时","default":false},"jiangQu":{"type":"string","description":"月将法","enum":["liuhe","zhongqi"],"default":"liuhe"},"lon":{"type":"number","description":"观测地经度（度），useTrue=true 时生效"},"lat":{"type":"number","description":"观测地纬度（度）"},"placeText":{"type":"string","description":"地点备注"}},"required":["year","month","day"]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/zeri":{"post":{"tags":["择吉"],"summary":"事项择日（选吉日）","operationId":"sxz_zeri","description":"依据事项（结婚/开业/动土/搬家/出行/安葬/签约等）与日期范围，逐日查黄历宜忌，筛选该事项的吉日清单并标注每日建除十二神与宜忌。事项支持口语别名（如「结婚」自动匹配「嫁娶」）。\n\n**单次消耗 10 积分**（2 元参考成本）。\n\n示例入参：\n```json\n{\n  \"matter\": \"结婚\",\n  \"startDate\": \"2026-11-18\",\n  \"days\": 30\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"matter":{"type":"string","description":"事项名，如「结婚」「开业」「动土」「搬家」「出行」「安葬」「签约」"},"startDate":{"type":"string","description":"起始日期 yyyy-mm-dd"},"days":{"type":"integer","description":"查询天数（1-92，默认 30）","default":30}},"required":["matter","startDate"]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/dlr":{"post":{"tags":["术数"],"summary":"大六壬（天地盘·四课三传）","operationId":"sxz_dlr","description":"大六壬起课排盘：按公历时间（可选真太阳时）排出四柱干支、月将、天地盘、十二天将、四课、三传（初/中/末传及九宗门起法）、遁干、六亲、神煞，并给出课体释义（如「重审」「元首」，附《六壬大全·九宗门》原文详解与吉凶）。适用于占事、择时、人事吉凶判断。\n\n**单次消耗 3 积分**（0.6000000000000001 元参考成本）。\n\n示例入参：\n```json\n{\n  \"year\": 2026,\n  \"month\": 11,\n  \"day\": 18,\n  \"hour\": 14,\n  \"longitude\": 116.41\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"year":{"type":"integer","description":"公历年份（默认当前年）","minimum":1900,"maximum":2100},"month":{"type":"integer","description":"公历月份 1-12（默认当前月）","minimum":1,"maximum":12},"day":{"type":"integer","description":"公历日 1-31（默认当前日）","minimum":1,"maximum":31},"hour":{"type":"integer","description":"小时 0-23（默认当前时）","minimum":0,"maximum":23},"minute":{"type":"integer","description":"分钟（默认 0）","default":0},"longitude":{"type":"number","description":"观测地经度（度），真太阳时换算用，默认 116.41（北京）","default":116.41},"useTrueSolarTime":{"type":"boolean","description":"是否用真太阳时（默认 true）","default":true},"nightZiRule":{"type":"string","description":"子时换日规则：nextDay（夜子归次日，默认）| sameDay","enum":["nextDay","sameDay"],"default":"nextDay"},"guirenRule":{"type":"string","description":"贵人起例：traditional（默认）| 其它起例","default":"traditional"},"shehaiRule":{"type":"string","description":"涉害深浅取法：depth（默认）| 备选","default":"depth"},"yearBoundary":{"type":"string","description":"年界：lichun（立春，默认）| zhengyue（正月初一）","enum":["lichun","zhengyue"],"default":"lichun"},"yuejiang":{"type":"integer","description":"手动指定月将地支索引 0-11（子=0，丑=1…亥=11）；不传则按中气自动取"},"zhanshi":{"type":"integer","description":"手动指定占时地支索引 0-11；不传则按时辰自动取"}},"required":[]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/qiming":{"post":{"tags":["命名"],"summary":"小孩起名（喜用神取名）","operationId":"sxz_qiming","description":"按出生生辰排四柱、推喜用神与忌神，以五行用字池筛选字库并组合姓名，按五格数理、人格、三才、音律、字形综合评分排序推荐。提供每个候选名的笔画、五行、音调、五格数理与三才配置详解。适合家长为婴幼儿取名。\n\n**单次消耗 3 积分**（0.6000000000000001 元参考成本）。\n\n示例入参：\n```json\n{\n  \"surname\": \"张\",\n  \"gender\": \"男\",\n  \"year\": 2024,\n  \"month\": 6,\n  \"day\": 15,\n  \"hour\": 10,\n  \"limit\": 10\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"surname":{"type":"string","description":"姓氏（1-2 个汉字）"},"gender":{"type":"string","description":"性别：男/女","enum":["男","女"],"default":"男"},"year":{"type":"integer","description":"出生年（公历）；提供生辰则按喜用神筛选用字","minimum":1900,"maximum":2100},"month":{"type":"integer","description":"出生月（公历）","minimum":1,"maximum":12},"day":{"type":"integer","description":"出生日（公历）","minimum":1,"maximum":31},"hour":{"type":"integer","description":"出生时（0-23）","minimum":0,"maximum":23},"minute":{"type":"integer","description":"出生分","default":0},"calendarType":{"type":"string","description":"历法：solar=公历，lunar=农历","enum":["solar","lunar"],"default":"solar"},"isLeapMonth":{"type":"boolean","description":"农历是否闰月","default":false},"len":{"type":"integer","description":"名字字数：1 或 2","default":2},"limit":{"type":"integer","description":"返回推荐数量（1-50）","default":12}},"required":["surname"]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/gsqm":{"post":{"tags":["命名"],"summary":"公司起名（字号）","operationId":"sxz_gsqm","description":"按行业所属五行（科技/餐饮/金融/地产/文化/医疗/服装/物流/农业/法律/制造/传媒）取用字池，生成公司字号并按五格数理与三才配置评分排序，输出字号、全名笔画数理、吉凶等级与卦象含义。适合企业注册取名、品牌命名。\n\n**单次消耗 3 积分**（0.6000000000000001 元参考成本）。\n\n示例入参：\n```json\n{\n  \"industry\": \"科技\",\n  \"suffix\": \"有限公司\",\n  \"prefix\": \"北京\",\n  \"limit\": 10\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"industry":{"type":"string","description":"行业名称（科技/餐饮/金融/地产/文化/医疗/服装/物流/农业/法律/制造/传媒）"},"industryWx":{"type":"integer","description":"行业五行编码：0水 1木 2火 3土 4金（industry 传入时自动换算）"},"suffix":{"type":"string","description":"公司后缀，如 有限公司 / 股份有限公司 / 工作室","default":"有限公司"},"prefix":{"type":"string","description":"公司前缀，如 北京"},"len":{"type":"integer","description":"字号字数：1 或 2","default":2},"limit":{"type":"integer","description":"返回推荐数量（1-50）","default":12}},"required":[]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/bazhai":{"post":{"tags":["风水"],"summary":"八宅排盘","operationId":"sxz_bazhai","description":"八宅堪舆排盘：按房屋坐向（震巽离坤兑乾坎艮八宅）排出九宫八卦方位，标注每宫的八星（生气/天医/延年/伏位/绝命/五鬼/六煞/祸害）、九星（辅弼/文曲/巨门/廉贞/破军/禄存/贪狼/武曲）、五行与吉凶倾向，并给出卦位释义与布局建议。适用于家居风水与办公室调理。\n\n**单次消耗 10 积分**（2 元参考成本）。\n\n示例入参：\n```json\n{\n  \"direction\": \"震宅\"\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"direction":{"type":"string","description":"房屋坐向宅型（震宅/巽宅/离宅/坤宅/兑宅/乾宅/坎宅/艮宅）或编号 1-8"},"detail":{"type":"boolean","description":"是否返回卦位释义与布局建议全文","default":true}},"required":["direction"]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/xkfs":{"post":{"tags":["风水"],"summary":"玄空排盘（九运）","operationId":"sxz_xkfs","description":"玄空飞星排盘：按立向年份（1864-2043）定三元九运，取下卦或替卦起星，排出九宫运星/山星/向星分布，判定旺山旺向、上山下水、双星会坐、双星会向、伏吟反吟、五黄到山到向等格局，并给出九星旺生衰死状态与星曜详解。适用于家居与商业地产风水布局。\n\n**单次消耗 6 积分**（1.2000000000000002 元参考成本）。\n\n示例入参：\n```json\n{\n  \"year\": 2026,\n  \"direction\": \"子山午向\"\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"year":{"type":"integer","description":"立向公历年份（1864-2043）","minimum":1900,"maximum":2100},"direction":{"type":"string","description":"坐向（24 山之一，如 子山午向 / 午山子向）"},"tiGuaType":{"type":"string","description":"起星方式：xia=下卦，ti=替卦","enum":["xia","ti"],"default":"xia"},"detail":{"type":"boolean","description":"是否返回九星详解与宫位代表","default":true}},"required":["year","direction"]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/yinzhai":{"post":{"tags":["风水"],"summary":"阴宅速查（阴宅堪舆）","operationId":"sxz_yinzhai","description":"阴宅堪舆速查：按坐山（24 山）与兼向（正针/左兼/右兼）排定坐向、度数与四局，给出杨公十二水法原文解析与吉凶水口、大空亡与龟甲空亡判定、仙命合山生克判断（可传出生年或干支）、流年太岁岁破三煞紫白飞星，以及赖公拨砂消砂生克与二十八宿参考。适用于阴宅选址与安葬择吉。\n\n**单次消耗 6 积分**（1.2000000000000002 元参考成本）。\n\n示例入参：\n```json\n{\n  \"mountain\": \"壬\",\n  \"jian\": \"0\",\n  \"outlet\": \"向\",\n  \"year\": 2026\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mountain":{"type":"string","description":"坐山（24 山：壬子癸丑艮寅甲卯乙辰巽巳丙午丁未坤申庚酉辛戌乾亥）"},"jian":{"type":"string","description":"兼向分金：0=正针不兼，L=左兼，R=右兼","enum":["0","L","R"],"default":"0"},"outlet":{"type":"string","description":"水口方向（向 或十二长生位：长生/沐浴/冠带/临官/帝旺/衰/病/死/墓/绝/胎/养）"},"xianming":{"type":"string","description":"仙命出生年（4 位年份如 1950）或干支（如 庚寅）"},"year":{"type":"integer","description":"流年年份（1900-2100）","default":2026,"minimum":1900,"maximum":2100},"shas":{"type":"string","description":"砂峰列表 JSON 字符串，如 [{\"shan\":\"子\",\"shape\":\"文笔\"}]"}},"required":["mountain"]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/luban":{"post":{"tags":["器物"],"summary":"鲁班尺（门公尺·丁兰尺）","operationId":"sxz_luban","description":"按尺寸（厘米）换算台寸，并依《鲁班尺》门公尺与《丁兰尺》阴尺两套量法各查八寸/十寸吉凶断语（如「财至」「死别」「迎福」），给出双尺吉凶与综合判语。适用于家具、门��、床铺、桌案尺寸吉凶择取。\n\n**单次消耗 1 积分**（0.2 元参考成本）。\n\n示例入参：\n```json\n{\n  \"cm\": 81\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cm":{"type":"number","description":"尺寸（厘米）"}},"required":["cm"]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/shouji":{"post":{"tags":["号码"],"summary":"号码分析（手机号）","operationId":"sxz_shouji","description":"手机号码分析：查七星磁场（天医/生气/延年/绝命/六煞/五鬼/伏位）滑动分布与磁场强度，按数字五行统计旺衰与缺失，按后四位起易经卦象，综合五项基础分与磁场、连号、号段、地域加分给出百分制评分与等级，并输出财运、事业、健康、婚姻四维分析与幸运色、幸运数。\n\n**单次消耗 1 积分**（0.2 元参考成本）。\n\n示例入参：\n```json\n{\n  \"phone\": \"13800138000\"\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","description":"手机号码（11 位数字）"}},"required":["phone"]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/xingzuo":{"post":{"tags":["星座"],"summary":"星座解析（运程·合盘）","operationId":"sxz_xingzuo","description":"十二星座解析：输出基础性格画像、优缺点、星座配对与事业倾向，并按今日/本周/本月/本年四种周期给出九维运程评分与逐项解读，附幸运色/数字/宝石/花/方位/动物与开运建议；支持指定关系类型（爱情/友情/同事/家庭）查看与十二宫兼容度矩阵，并可指定对方星座做合盘详情。\n\n**单次消耗 1 积分**（0.2 元参考成本）。\n\n示例入参：\n```json\n{\n  \"zodiac\": \"白羊座\",\n  \"period\": \"daily\",\n  \"relationship\": \"love\"\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"zodiac":{"type":"string","description":"星座名称（白羊座/金牛座/双子座/巨蟹座/狮子座/处女座/天秤座/天蝎座/射手座/摩羯座/水瓶座/双鱼座）"},"period":{"type":"string","description":"运程周期：daily/weekly/monthly/yearly","enum":["daily","weekly","monthly","yearly"],"default":"daily"},"relationship":{"type":"string","description":"关系类型：love/friendship/colleague/family","enum":["love","friendship","colleague","family"],"default":"love"},"partner":{"type":"string","description":"配对星座（可选，用于合盘详情）"}},"required":["zodiac"]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/guigu":{"post":{"tags":["命理"],"summary":"鬼谷定数","operationId":"sxz_guigu","description":"鬼谷定数（前定数）推演：按生辰排四柱、命宫与空亡，以年干加时干共一百组查《鬼谷定数》命数，判出第几数、所属卦象、格局名（如「莺宿野林格」）与诗诀，并给出天将/天飞/天孤等星曜断语、判词原文与基业兄弟行藏婚姻子息六分节诗。适用于命理格局参研。\n\n**单次消耗 6 积分**（1.2000000000000002 元参考成本）。\n\n示例入参：\n```json\n{\n  \"year\": 1990,\n  \"month\": 5,\n  \"day\": 20,\n  \"hour\": 14,\n  \"gender\": \"男\"\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"姓名（可选）"},"gender":{"type":"string","description":"性别：男/女","enum":["男","女"],"default":"男"},"year":{"type":"integer","description":"出生年（公历）","minimum":1900,"maximum":2100},"month":{"type":"integer","description":"出生月（公历）","minimum":1,"maximum":12},"day":{"type":"integer","description":"出生日（公历）","minimum":1,"maximum":31},"hour":{"type":"integer","description":"出生时（0-23）","minimum":0,"maximum":23},"minute":{"type":"integer","description":"出生分","default":0}},"required":["year","month","day","hour"]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/shaozi":{"post":{"tags":["命理"],"summary":"邵子神数（批命）","operationId":"sxz_shaozi","description":"邵子神数批命：按生辰排四柱，逐柱给出干支五行、十神、纳音、十二长生旺衰与地支藏干十神；推出命宫（配天秘等二十八星命）、空亡、刻与时辰、节气与五行分布；起八步大运（顺逆、起运岁数与各步流年）；并给出本卦、元堂卦、互卦、变卦的卦名卦辞彖辞断语，以及元辰/纳音/日诗/时柱/天资/品性等邵子原典诗诀。\n\n**单次消耗 6 积分**（1.2000000000000002 元参考成本）。\n\n示例入参：\n```json\n{\n  \"year\": 1956,\n  \"month\": 10,\n  \"day\": 17,\n  \"hour\": 20,\n  \"minute\": 38,\n  \"gender\": \"女\"\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"姓名（可选）"},"gender":{"type":"string","description":"性别：男/女","enum":["男","女"],"default":"男"},"year":{"type":"integer","description":"出生年（公历）","minimum":1900,"maximum":2100},"month":{"type":"integer","description":"出生月（公历）","minimum":1,"maximum":12},"day":{"type":"integer","description":"出生日（公历）","minimum":1,"maximum":31},"hour":{"type":"integer","description":"出生时（0-23）","minimum":0,"maximum":23},"minute":{"type":"integer","description":"出生分","default":0},"calendarType":{"type":"string","description":"历法：solar=公历，lunar=农历","enum":["solar","lunar"],"default":"solar"},"isLeapMonth":{"type":"boolean","description":"农历是否闰月","default":false},"lateZi":{"type":"boolean","description":"是否晚子时（23:00 后）","default":false},"detail":{"type":"boolean","description":"是否返回邵子原典诗诀全文","default":true}},"required":["year","month","day","hour"]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/daoyi":{"post":{"tags":["医易"],"summary":"黄帝内经·道医辩证","operationId":"sxz_daoyi","description":"黄帝内经道医辩证：据症状清单与舌象、苔色苔质、脉象、寒热、汗出、二便、病程等四诊信息，匹配《黄帝内经》195 个证型，输出主证型、得分与症状匹配率、候选证型排序、精确匹配与别名关联症状、八纲辨证（表里寒热虚实阴阳）、症状自相矛盾与证型互斥提示、合病并病兼夹证分析，并给出经典医籍引用、经方针灸处方、情志调摄与起居饮食调护建议。\n\n**单次消耗 6 积分**（1.2000000000000002 元参考成本）。\n\n示例入参：\n```json\n{\n  \"symptoms\": \"发热,咳嗽,痰黄黏稠,咽痛\",\n  \"tongueColor\": \"红\",\n  \"coatingColor\": \"黄\",\n  \"pulseType\": \"数脉\",\n  \"coldHeat\": \"发热\",\n  \"duration\": \"急性\"\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"symptoms":{"type":"string","description":"症状列表（逗号分隔或 JSON 数组字符串），如 \"发热,咳嗽,痰黄黏稠\""},"tongueColor":{"type":"string","description":"舌色（红/淡白/绛红）"},"coatingColor":{"type":"string","description":"苔色（黄/白）"},"coatingThick":{"type":"string","description":"苔厚薄（厚/薄/少苔/剥落/光剥）"},"pulseType":{"type":"string","description":"脉象（数脉/弦脉/实脉/细脉/弱脉/代脉/伏脉/散脉/促脉）"},"tongueShape":{"type":"string","description":"舌形"},"complexion":{"type":"string","description":"面色"},"eyes":{"type":"string","description":"眼神"},"voice":{"type":"string","description":"声音"},"breath":{"type":"string","description":"气息"},"smell":{"type":"string","description":"气味"},"coldHeat":{"type":"string","description":"寒热（发热/恶寒/但寒不热/但热不寒/恶风/往来寒热）"},"sweat":{"type":"string","description":"汗出情况"},"taste":{"type":"string","description":"口味"},"bowelUrinary":{"type":"string","description":"二便"},"duration":{"type":"string","description":"病程（急性/亚急性/慢性）"},"detail":{"type":"boolean","description":"是否返回经方针灸与调摄建议全文","default":true}},"required":["symptoms"]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/qizheng":{"post":{"tags":["星命"],"summary":"七政星盘（七政四余）","operationId":"sxz_qizheng","description":"七政四余星盘：以 JPL Standish 轨道根数与 Meeus 月球公式计算真太阳时下的日月五星与罗睺、计都、月孛、紫炁（三王星可选）黄经黄纬赤经，排出十二宫（命宫至相貌）、宫主星与星曜分布，给出命宫身宫地支、二十八宿宿度与禽星、庙旺落陷、大限十二步、童限、四柱干支与神煞、朔望月相与日出日落。适用于七政四余命盘推演。\n\n**单次消耗 6 积分**（1.2000000000000002 元参考成本）。\n\n示例入参：\n```json\n{\n  \"year\": 1990,\n  \"month\": 5,\n  \"day\": 20,\n  \"hour\": 14.5,\n  \"longitude\": 118.06,\n  \"latitude\": 24.48\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"year":{"type":"integer","description":"出生年（公历）","minimum":1900,"maximum":2100},"month":{"type":"integer","description":"出生月（公历）","minimum":1,"maximum":12},"day":{"type":"integer","description":"出生日（公历）","minimum":1,"maximum":31},"hour":{"type":"number","description":"出生时刻（小时，可含小数，如 14.5 表示 14:30）","minimum":0,"maximum":23},"longitude":{"type":"number","description":"出生地经度（东经为正，如 118.06）"},"latitude":{"type":"number","description":"出生地纬度（北纬为正，如 24.48）"},"timezone":{"type":"number","description":"时区（东八区为 8）","default":8},"timeMode":{"type":"string","description":"时间制：beijing=钟表北京时间，local=地方平时，solar=真太阳时","enum":["beijing","local","solar"],"default":"beijing"},"coordinateMode":{"type":"string","description":"坐标制：ecliptic=黄道制，equator=赤道制","enum":["ecliptic","equator"],"default":"ecliptic"},"useOuterPlanets":{"type":"boolean","description":"是否含三王星（天王/海王/冥王）","default":true},"detail":{"type":"boolean","description":"是否返回二十八宿全表与格局","default":true}},"required":["year","month","day","hour","longitude","latitude"]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tianwen":{"post":{"tags":["星命"],"summary":"天文占星（西洋星盘）","operationId":"sxz_tianwen","description":"西洋占星星盘：按出生地经纬度与时区（含真太阳时校正、均时差）计算十大小天体黄经与日行速度（负值为逆行），排出上升点、天顶与十二宫宫头（普拉西德/等宫/波菲利三制），计算行星间合、六合、刑、拱、冲等相位与角距偏差，给出月相与月龄，并输出太阳/月亮/上升/天顶星座、性格内核、情感、事业、人际、健康、财务等结构化文字解读。\n\n**单次消耗 10 积分**（2 元参考成本）。\n\n示例入参：\n```json\n{\n  \"year\": 1990,\n  \"month\": 5,\n  \"day\": 20,\n  \"hour\": 14,\n  \"minute\": 30,\n  \"city\": \"泉州\"\n}\n```","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"year":{"type":"integer","description":"出生年（公历）","minimum":1900,"maximum":2100},"month":{"type":"integer","description":"出生月（公历）","minimum":1,"maximum":12},"day":{"type":"integer","description":"出生日（公历）","minimum":1,"maximum":31},"hour":{"type":"integer","description":"出生时（0-23）","minimum":0,"maximum":23},"minute":{"type":"integer","description":"出生分（0-59）","default":0},"longitude":{"type":"number","description":"经度（东经为正）；与 city 二选一"},"latitude":{"type":"number","description":"纬度（北纬为正）；与 city 二选一"},"city":{"type":"string","description":"城市名（如 泉州、北京）；提供后自动取经纬度"},"houseSystem":{"type":"string","description":"宫制：placidus/equal/porphyry","enum":["placidus","equal","porphyry"],"default":"placidus"},"timezone":{"type":"number","description":"时区（东八区为 8）","default":8},"daylightSaving":{"type":"boolean","description":"是否夏令时","default":false},"useTrueSolarTime":{"type":"boolean","description":"是否真太阳时校正","default":true},"name":{"type":"string","description":"姓名（可选，用于解读署名）"},"detail":{"type":"boolean","description":"是否返回文字解读全文","default":true}},"required":["year","month","day","hour"]}}}},"responses":{"200":{"description":"调用成功","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"tool":{"type":"string"},"data":{"type":"object","description":"该功能的排盘结果"},"creditsUsed":{"type":"integer"},"creditsRemaining":{"type":"integer"},"plan":{"type":"string"},"disclaimer":{"type":"string"}}}}}},"401":{"description":"缺少或无效的 API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分余额不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"触发限流","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/catalog":{"get":{"tags":["元信息"],"summary":"功能目录与套餐","operationId":"sxz_catalog","description":"列出全部已上线功能、参数规格、套餐额度与积分单价。无需鉴权。","responses":{"200":{"description":"目录"}}}},"/v1/openai-tools":{"get":{"tags":["大模型接入"],"summary":"OpenAI function-calling 工具清单","operationId":"sxz_openai_tools","description":"返回可直接传给 OpenAI / 通义 / 文心 / 豆包 / DeepSeek 等模型的 tools 数组（14+ 个玄学工具）。无需鉴权。","responses":{"200":{"description":"tools 数组"}}}},"/v1/usage":{"get":{"tags":["账户"],"summary":"查询本 Key 剩余积分","operationId":"sxz_usage","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"剩余积分与计费模式"}}}},"/v1/credit-plans":{"get":{"tags":["账户"],"summary":"积分套餐目录","operationId":"sxz_credit_plans","description":"返回可购买的积分套餐（服务端定价，前端不可篡改）。","responses":{"200":{"description":"套餐列表"}}}},"/v1/my-api-keys":{"get":{"tags":["账户"],"summary":"查询我的 API Key","operationId":"sxz_my_keys","description":"按 username 查询已购 API Key 与剩余积分。","responses":{"200":{"description":"Key 列表"}}}},"/v1/demo/{feature}":{"post":{"tags":["试用"],"summary":"免费试用（无需 Key，单功能限流）","operationId":"sxz_demo","description":"无需 API Key 即可试用一次排盘，用于模型测试与平台审核。限流按 IP 计算（默认每 IP 每小时 20 次）。","parameters":[{"name":"feature","in":"path","required":true,"schema":{"type":"string","enum":["bazi","ceming","huangli","guanyin","shengxiao","liuyao","qimen","ziwei","hehun","taluo","zhougong","luopan","jinkoujue","zeri","dlr","qiming","gsqm","bazhai","xkfs","yinzhai","luban","shouji","xingzuo","guigu","shaozi","daoyi","qizheng","tianwen"]}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"试用结果"},"429":{"description":"试用次数已用完（每 IP 每小时 20 次）"}}}},"/mcp":{"post":{"tags":["大模型接入"],"summary":"MCP JSON-RPC 端点","operationId":"sxz_mcp","description":"标准 Model Context Protocol JSON-RPC。支持 tools/list 与 tools/call。适用于 Claude Desktop / Cursor / Cline / Trae / Coze / Dify 等 MCP 客户端。","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"JSON-RPC 响应"}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","description":"API Key（形如 sxz_pro_xxxxxxxx）"}},"schemas":{"Error":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string"},"code":{"type":"string"}}}}}}