{"openapi":"3.1.0","info":{"title":"AI Creative Director API","version":"1.0.0"},"paths":{"/healthz":{"get":{"operationId":"health","responses":{"200":{"description":"进程可用","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"const":"ok"}},"additionalProperties":false}}}}}}},"/api/v1/analyze":{"post":{"operationId":"analyzeManuscriptV1","description":"同步分析完整文稿。UTF-8 JSON 请求体上限 524288 字节。段号从 1 开始，每段恰好一条 beats。事实性陈述表示稿件的主张，事实核查独立进行。","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeRequest"}}}},"responses":{"200":{"description":"通过结构与原文引文校验的内容分析","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeResponse"}}}},"400":{"description":"INVALID_JSON — 请求体必须是有效的 UTF-8 JSON。\nINVALID_INPUT — 请提交一篇非空文稿，最多 80000 个字符、120 段。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHORIZED — 需要有效的服务访问令牌。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND — 找不到该接口。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"METHOD_NOT_ALLOWED — 请求方法不受支持。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"PAYLOAD_TOO_LARGE — 请求体超过 512 KiB。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"UNSUPPORTED_MEDIA_TYPE — 请使用 application/json。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR — 服务内部出错。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"ANALYSIS_FAILED — 模型未生成可用的分析结果。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"BUSY — 分析服务繁忙，请稍后重试。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"AnalyzeRequest":{"type":"object","properties":{"manuscript":{"type":"string","minLength":1,"maxLength":80000,"pattern":"\\S","description":"全文，空行分段，最多 120 段。保留原文，不自动拆分或截断。"}},"required":["manuscript"],"additionalProperties":false},"AnalyzeResponse":{"type":"object","properties":{"apiVersion":{"type":"string","const":"v1"},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"runId":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"promptVersion":{"type":"string","minLength":1},"schemaVersion":{"type":"string","minLength":1},"analysis":{"type":"object","properties":{"summary":{"type":"string","minLength":1},"primaryTopic":{"type":"object","properties":{"label":{"type":"string","enum":["science","history","mystery","society","culture","other"]},"evidence":{"type":"object","properties":{"paragraph":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"quote":{"type":"string","minLength":1}},"required":["paragraph","quote"],"additionalProperties":false}},"required":["label","evidence"],"additionalProperties":false},"secondaryTopics":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","enum":["science","history","mystery","society","culture","other"]},"evidence":{"type":"object","properties":{"paragraph":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"quote":{"type":"string","minLength":1}},"required":["paragraph","quote"],"additionalProperties":false}},"required":["label","evidence"],"additionalProperties":false}},"primaryNarrative":{"type":"object","properties":{"label":{"type":"string","enum":["explanation","chronological_story","investigation","argument","other"]},"evidence":{"type":"object","properties":{"paragraph":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"quote":{"type":"string","minLength":1}},"required":["paragraph","quote"],"additionalProperties":false}},"required":["label","evidence"],"additionalProperties":false},"secondaryNarratives":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","enum":["explanation","chronological_story","investigation","argument","other"]},"evidence":{"type":"object","properties":{"paragraph":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"quote":{"type":"string","minLength":1}},"required":["paragraph","quote"],"additionalProperties":false}},"required":["label","evidence"],"additionalProperties":false}},"primaryTone":{"type":"object","properties":{"label":{"type":"string","enum":["curious","playful","suspenseful","solemn","reflective","neutral","other"]},"evidence":{"type":"object","properties":{"paragraph":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"quote":{"type":"string","minLength":1}},"required":["paragraph","quote"],"additionalProperties":false}},"required":["label","evidence"],"additionalProperties":false},"secondaryTones":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","enum":["curious","playful","suspenseful","solemn","reflective","neutral","other"]},"evidence":{"type":"object","properties":{"paragraph":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"quote":{"type":"string","minLength":1}},"required":["paragraph","quote"],"additionalProperties":false}},"required":["label","evidence"],"additionalProperties":false}},"beats":{"minItems":1,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["hook","context","clue","explanation","turning_point","reveal","conclusion","transition"]},"description":{"type":"string","minLength":1},"evidence":{"type":"object","properties":{"paragraph":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"quote":{"type":"string","minLength":1}},"required":["paragraph","quote"],"additionalProperties":false}},"required":["role","description","evidence"],"additionalProperties":false}},"claims":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["factual_assertion","subjective_judgment","speculation"]},"statement":{"type":"string","minLength":1},"evidence":{"type":"object","properties":{"paragraph":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"quote":{"type":"string","minLength":1}},"required":["paragraph","quote"],"additionalProperties":false}},"required":["kind","statement","evidence"],"additionalProperties":false}}},"required":["summary","primaryTopic","secondaryTopics","primaryNarrative","secondaryNarratives","primaryTone","secondaryTones","beats","claims"],"additionalProperties":false}},"required":["apiVersion","requestId","runId","model","promptVersion","schemaVersion","analysis"],"additionalProperties":false},"Error":{"type":"object","properties":{"apiVersion":{"type":"string","const":"v1"},"requestId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"error":{"type":"object","properties":{"code":{"type":"string","enum":["INVALID_JSON","INVALID_INPUT","UNAUTHORIZED","NOT_FOUND","METHOD_NOT_ALLOWED","PAYLOAD_TOO_LARGE","UNSUPPORTED_MEDIA_TYPE","INTERNAL_ERROR","ANALYSIS_FAILED","BUSY"]},"message":{"type":"string","minLength":1}},"required":["code","message"],"additionalProperties":false}},"required":["apiVersion","requestId","error"],"additionalProperties":false}}}}