{"openapi":"3.1.0","info":{"title":"Fenpai Open Read API","version":"v1","description":"Read-only OpenAPI contract for bot/AI consumers. The first wave exposes stable analysis-friendly resources instead of raw mutable server state."},"servers":[{"url":"/","description":"Current Fenpai server"}],"security":[{"bearerAuth":[]}],"paths":{"/api/open/v1/meta/version":{"get":{"summary":"Get Open Read API version metadata","responses":{"200":{"description":"Open Read API metadata"}}}},"/api/open/v1/meta/capabilities":{"get":{"summary":"Get capability groups and first-wave endpoints","responses":{"200":{"description":"Open Read API capability metadata"}}}},"/api/open/v1/openapi.json":{"get":{"summary":"Download the machine-readable OpenAPI document","responses":{"200":{"description":"OpenAPI JSON document"}}}},"/api/open/v1/live/match":{"get":{"summary":"Read the current live match summary","responses":{"200":{"description":"Current match summary"}}}},"/api/open/v1/players":{"get":{"summary":"List canonical players for bot/AI lookup","responses":{"200":{"description":"Player listing"}}}},"/api/open/v1/players/{playerKey}":{"get":{"summary":"Read one player profile by canonical player key or display name","parameters":[{"name":"playerKey","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Player profile"}}}},"/api/open/v1/matches":{"get":{"summary":"List archived matches with lightweight summaries","responses":{"200":{"description":"Match list"}}}},"/api/open/v1/matches/{matchId}":{"get":{"summary":"Get one archived match by id","parameters":[{"name":"matchId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Match detail"}}}},"/api/open/v1/leaderboards/players":{"get":{"summary":"Get the global player leaderboard","responses":{"200":{"description":"Player leaderboard"}}}},"/api/open/v1/insights/head-to-head":{"get":{"summary":"Compare two players using historical head-to-head analysis","parameters":[{"name":"playerA","in":"query","required":true,"schema":{"type":"string"}},{"name":"playerB","in":"query","required":true,"schema":{"type":"string"}},{"name":"map","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Head-to-head insight"}}}},"/api/open/v1/overview":{"get":{"summary":"Read global history overview metrics","responses":{"200":{"description":"Global overview"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key"}},"schemas":{"SuccessEnvelope":{"type":"object","required":["ok","data","meta"],"properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object"},"meta":{"$ref":"#/components/schemas/Meta"},"links":{"type":"object"}}},"ErrorEnvelope":{"type":"object","required":["ok","error","meta"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object"}}},"meta":{"$ref":"#/components/schemas/Meta"}}},"Meta":{"type":"object","required":["apiVersion","generatedAt"],"properties":{"apiVersion":{"type":"string"},"generatedAt":{"type":"string","format":"date-time"},"analysisScope":{"type":"string"},"source":{"$ref":"#/components/schemas/SourceMeta"},"citations":{"type":"array","items":{"$ref":"#/components/schemas/Citation"}},"pagination":{"$ref":"#/components/schemas/PaginationMeta"}}},"SourceMeta":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"},"confidence":{"type":"number"}}},"Citation":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"}}},"PaginationMeta":{"type":["object","null"],"properties":{"offset":{"type":"integer"},"limit":{"type":["integer","null"]},"total":{"type":"integer"}}}}}}