{"openapi":"3.1.0","info":{"title":"后宫台本 API / Shiquan Script API","description":"精简 Galgame 台本 API。格式：角色「台词」+ 旁白。男主统一「祖宋」。AI 先读 / 或 /llms.txt。","version":"1.1.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/llms.txt":{"get":{"summary":"Get Llms Txt","operationId":"get_llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/":{"get":{"summary":"Root Html","operationId":"root_html__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/v1/games":{"get":{"summary":"List Games","operationId":"list_games_v1_games_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/games/{game_id}":{"get":{"summary":"Get Game","operationId":"get_game_v1_games__game_id__get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/games/{game_id}/acts":{"get":{"summary":"Get Acts","operationId":"get_acts_v1_games__game_id__acts_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/games/{game_id}/files":{"get":{"summary":"List Files","operationId":"list_files_v1_games__game_id__files_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/games/{game_id}/file":{"get":{"summary":"Get File","operationId":"get_file_v1_games__game_id__file_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"e.g. clean/ACT_A.txt","title":"Path"},"description":"e.g. clean/ACT_A.txt"},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|text)$","default":"json","title":"Format"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":50000,"minimum":1},{"type":"null"}],"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/games/{game_id}/dialogue":{"get":{"summary":"Get Dialogue","operationId":"get_dialogue_v1_games__game_id__dialogue_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"act","in":"query","required":false,"schema":{"type":"string","default":"ACT_A","title":"Act"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|text)$","default":"text","title":"Format"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":50000,"minimum":1},{"type":"null"}],"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/games/{game_id}/full":{"get":{"summary":"Get Full","operationId":"get_full_v1_games__game_id__full_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|text)$","default":"text","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/games/{game_id}/speakers":{"get":{"summary":"Speakers","operationId":"speakers_v1_games__game_id__speakers_get","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}},{"name":"top","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":40,"title":"Top"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/search":{"get":{"summary":"Search","operationId":"search_v1_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Q"}},{"name":"game","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":30,"title":"Limit"}},{"name":"context","in":"query","required":false,"schema":{"type":"integer","maximum":5,"minimum":0,"default":1,"title":"Context"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/male-lead":{"get":{"summary":"Male Lead","operationId":"male_lead_v1_male_lead_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}