{"openapi":"3.1.0","info":{"title":"Brain-API","description":"Coordination service for Bittensor Subnet 90 prediction resolution","version":"1.0.0"},"paths":{"/":{"get":{"summary":"Root","description":"Health check and service info","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/markets/pending":{"get":{"summary":"Get Pending Markets","description":"Get markets that need resolution (for validators)","operationId":"get_pending_markets_api_markets_pending_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/markets/{market_id}/responses":{"post":{"summary":"Submit Miner Responses","description":"Store miner responses and get official resolution from brainstorm","operationId":"submit_miner_responses_api_markets__market_id__responses_post","parameters":[{"name":"market_id","in":"path","required":true,"schema":{"type":"string","title":"Market Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidatorSubmission"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/resolutions":{"get":{"summary":"Get Resolutions","description":"Get all resolutions for frontend display","operationId":"get_resolutions_api_resolutions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/markets/{market_id}/breakdown":{"get":{"summary":"Get Market Breakdown","description":"Get detailed miner breakdown for a specific market","operationId":"get_market_breakdown_api_markets__market_id__breakdown_get","parameters":[{"name":"market_id","in":"path","required":true,"schema":{"type":"string","title":"Market Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/resolutions/{statement_id}":{"get":{"summary":"Get Resolution By Id","description":"Get resolution details for a specific statement","operationId":"get_resolution_by_id_api_resolutions__statement_id__get","parameters":[{"name":"statement_id","in":"path","required":true,"schema":{"type":"string","title":"Statement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/resolve":{"post":{"summary":"Resolve Statement","description":"Resolve a statement in real-time using the brainstorm engine","operationId":"resolve_statement_api_resolve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainstormRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/test/next-chunk":{"get":{"summary":"Get Next Test Chunk","description":"Get next chunk of test statements for validators (per-validator rate limiting)","operationId":"get_next_test_chunk_api_test_next_chunk_get","parameters":[{"name":"validator_id","in":"query","required":true,"schema":{"type":"string","title":"Validator Id"}},{"name":"chunk_size","in":"query","required":false,"schema":{"type":"integer","title":"Chunk Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/test/results/{chunk_id}":{"post":{"summary":"Submit Test Results","description":"Submit test results for comparison with expected resolutions","operationId":"submit_test_results_api_test_results__chunk_id__post","parameters":[{"name":"chunk_id","in":"path","required":true,"schema":{"type":"string","title":"Chunk Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidatorSubmission"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/test/progress":{"get":{"summary":"Get Test Progress","description":"Get testing progress and statistics","operationId":"get_test_progress_api_test_progress_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"BrainstormRequest":{"properties":{"statement":{"type":"string","title":"Statement"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"initialValue":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Initialvalue"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"}},"type":"object","required":["statement"],"title":"BrainstormRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"MinerResponse":{"properties":{"miner_id":{"type":"string","title":"Miner Id"},"resolution":{"type":"string","title":"Resolution"},"confidence":{"type":"number","title":"Confidence"},"summary":{"type":"string","title":"Summary"},"sources":{"items":{"type":"string"},"type":"array","title":"Sources"}},"type":"object","required":["miner_id","resolution","confidence","summary","sources"],"title":"MinerResponse"},"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"},"ValidatorSubmission":{"properties":{"validator_id":{"type":"string","title":"Validator Id"},"miner_responses":{"items":{"$ref":"#/components/schemas/MinerResponse"},"type":"array","title":"Miner Responses"}},"type":"object","required":["validator_id","miner_responses"],"title":"ValidatorSubmission"}}}}