{"openapi":"3.0.0","info":{"title":"viivaev SI Engine API","version":"1.0.0","description":"面向电压互感器 (PT/VT)、电流互感器 (CT)、变压器及高低压电力设备的 9×6 矩阵动态超级智能 (SI) Prompt 编排与大模型长文生成企业级 API。","contact":{"name":"viivaev SI Engine Team","url":"https://viivaev.com"}},"servers":[{"url":"/","description":"Current Environment Server"}],"paths":{"/api/health":{"get":{"summary":"服务健康检查","description":"检测 Next.js App Router 引擎在线状态与运行时间。","responses":{"200":{"description":"服务正常","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"engine":{"type":"string","example":"GodsNumber SI Engine"},"framework":{"type":"string","example":"Next.js App Router"},"time":{"type":"string","format":"date-time"}}}}}}}}},"/api/v1/system-instruction":{"get":{"summary":"提取动态 System Instruction 与结构切片","description":"根据 9 位状态码（1-6 范围）即时编译高阶电气工程系统指令及结构拆解，支持毫秒级响应。","parameters":[{"name":"code","in":"query","required":true,"description":"9 位魔方状态码，如 645341264","schema":{"type":"string","example":"645341264"}},{"name":"articleTitle","in":"query","required":false,"description":"【互斥参数 A】文章拟定标题或工程主题，触发 1500 字深度长文指令（与 productName 互斥二选一）","schema":{"type":"string","example":"0.2S级高精度与抗铁磁谐振：从电磁学机理到变电站工程选型的全生命周期解构"}},{"name":"productName","in":"query","required":false,"description":"【互斥参数 B】设备产品全称及规格型号，触发 600 字设备规格导则指令（与 articleTitle 互斥二选一）","schema":{"type":"string","example":"10kV 环氧树脂浇注式电压互感器 (JDZ-10)"}}],"responses":{"200":{"description":"成功返回系统指令及 9 模块结构化解构","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"code":{"type":"string","example":"645341264"},"data":{"type":"object","properties":{"system_instruction":{"type":"string"},"structured_breakdown":{"type":"array"}}}}}}}}}}},"/api/v1/matrix":{"get":{"summary":"获取完整 9×6 矩阵元数据与 54 策略字典","description":"返回 9 大电气功能模块、54 个策略变体及其电磁理论基础与三维魔方映射。","responses":{"200":{"description":"成功返回矩阵定义"}}}},"/api/v1/matrix/validate":{"post":{"summary":"校验 9 位状态码有效性","description":"验证输入代码是否符合 9 位且数值在 1-6 之间的规范，并返回模块映射。","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","example":"645341264"}}}}}},"responses":{"200":{"description":"校验结果"}}}},"/api/v1/matrix/random":{"post":{"summary":"随机生成合规状态码（支持固定指定模块）","description":"快速生成随机状态码，可传入 fixed 参数指定特定模块固定变体。","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"fixed":{"type":"object","description":"固定指定模块 (key 为模块序号 1-9, value 为变体 1-6)","example":{"1":6,"8":1}},"productName":{"type":"string"},"articleTitle":{"type":"string"}}}}}},"responses":{"200":{"description":"成功生成"}}}},"/api/generate":{"post":{"summary":"Gemini 3.8 Flash 电气工程技术深度长文生成","description":"服务端直连 Google GenAI，结合动态系统指令生成完整长篇技术白皮书。","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"systemInstruction":{"type":"string"},"productName":{"type":"string"},"articleTitle":{"type":"string"},"customNotes":{"type":"string"}}}}}},"responses":{"200":{"description":"生成结果返回"}}}}}}