{"openapi":"3.1.0","info":{"title":"临时文件传递 / AI File Transfer","description":"Upload with Bearer service password. Return code, download_url and expires_at to the user. Downloads need only the code. Files expire after 48 hours. Fourth consecutive credential/code failure permanently bans IP.","version":"1.0.0"},"paths":{"/api/login":{"post":{"summary":"Login","operationId":"login_api_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/logout":{"post":{"summary":"Logout","operationId":"logout_api_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/session":{"get":{"summary":"Session","operationId":"session_api_session_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/upload":{"post":{"summary":"Upload","operationId":"upload_api_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"type":"string","format":"binary"}},"type":"object","required":["file"]}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResult"}}}}},"security":[{"ServicePassword":[]}]}},"/d/{code}":{"get":{"summary":"Download","operationId":"download_d__code__get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/healthz":{"get":{"summary":"Health","operationId":"health_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ai.txt":{"get":{"summary":"Ai Instructions","operationId":"ai_instructions_ai_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/":{"get":{"summary":"Index","operationId":"index__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/static/{name}":{"get":{"summary":"Static","operationId":"static_static__name__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Login":{"properties":{"password":{"type":"string","title":"Password"}},"type":"object","required":["password"],"title":"Login"},"UploadResult":{"properties":{"code":{"type":"string","pattern":"^[1-9][0-9]{4}$","title":"Code","description":"Five-digit download code. Return this to the user."},"download_url":{"type":"string","title":"Download Url"},"filename":{"type":"string","title":"Filename"},"size_bytes":{"type":"integer","title":"Size Bytes"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"instructions":{"type":"string","title":"Instructions"}},"type":"object","required":["code","download_url","filename","size_bytes","expires_at","instructions"],"title":"UploadResult"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"ServicePassword":{"type":"http","scheme":"bearer","description":"Service password supplied by user. Fourth consecutive incorrect credential/code permanently bans the IP."}}}}