{
  "openapi": "3.1.0",
  "info": {
    "title": "CapitalBench Data API",
    "version": "1.0.0",
    "description": "Structured access to CapitalBench model portfolios, active positioning, cumulative allocation behavior, benchmark scores, asset universes, and proof metadata."
  },
  "servers": [
    {
      "url": "https://www.capitalbench.org/api",
      "description": "Production API on the public website"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Positioning",
      "description": "Where model capital is allocated across active and historical rounds."
    },
    {
      "name": "Rounds",
      "description": "Round metadata, portfolios, prices, and resolved scores."
    },
    {
      "name": "Models",
      "description": "Model records, holdings, and allocation behavior."
    },
    {
      "name": "Assets",
      "description": "Asset universe, asset metadata, and model-holder views."
    },
    {
      "name": "Leaderboards",
      "description": "Latest and cumulative model scores."
    },
    {
      "name": "Insights",
      "description": "Readable findings generated from CapitalBench benchmark data."
    },
    {
      "name": "Metadata",
      "description": "API metadata, generated data coverage, and source freshness."
    },
    {
      "name": "Raw Data",
      "description": "First-class access to generated allocation, return, interim performance, and proof tables."
    },
    {
      "name": "Evidence",
      "description": "Benchmark evidence, scoring caveats, and verification metadata."
    }
  ],
  "paths": {
    "/v1/positioning/active": {
      "get": {
        "tags": [
          "Positioning"
        ],
        "summary": "Active capital positioning",
        "description": "Current live model allocations across unresolved weekly and monthly rounds.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Track"
          },
          {
            "$ref": "#/components/parameters/GroupBy"
          },
          {
            "$ref": "#/components/parameters/AsOf"
          }
        ],
        "responses": {
          "200": {
            "description": "Active positioning response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositioningResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/positioning/cumulative": {
      "get": {
        "tags": [
          "Positioning"
        ],
        "summary": "Cumulative capital positioning",
        "description": "Historical model allocations across completed and active rounds.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Track"
          },
          {
            "$ref": "#/components/parameters/ModelId"
          },
          {
            "$ref": "#/components/parameters/GroupBy"
          }
        ],
        "responses": {
          "200": {
            "description": "Cumulative positioning response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositioningResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/positioning/consensus": {
      "get": {
        "tags": [
          "Positioning"
        ],
        "summary": "Consensus positioning",
        "description": "Assets and categories with the highest cross-model allocation concentration.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Track"
          },
          {
            "$ref": "#/components/parameters/Scope"
          }
        ],
        "responses": {
          "200": {
            "description": "Consensus positioning response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositioningResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/positioning/by-model/{model_id}": {
      "get": {
        "tags": [
          "Positioning"
        ],
        "summary": "Positioning by model",
        "description": "Active or cumulative allocations for one model.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ModelIdPath"
          },
          {
            "$ref": "#/components/parameters/Track"
          },
          {
            "$ref": "#/components/parameters/Scope"
          }
        ],
        "responses": {
          "200": {
            "description": "Model positioning response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositioningResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/positioning/by-asset/{option_id}": {
      "get": {
        "tags": [
          "Positioning"
        ],
        "summary": "Positioning by asset",
        "description": "Models currently or historically allocating to a specific asset option.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OptionIdPath"
          },
          {
            "$ref": "#/components/parameters/Track"
          },
          {
            "$ref": "#/components/parameters/Scope"
          }
        ],
        "responses": {
          "200": {
            "description": "Asset positioning response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositioningResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/positioning/by-category": {
      "get": {
        "tags": [
          "Positioning"
        ],
        "summary": "Positioning by asset category",
        "description": "Allocation grouped by asset class, region, sector, factor, or other CapitalBench categories.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Track"
          },
          {
            "$ref": "#/components/parameters/Scope"
          }
        ],
        "responses": {
          "200": {
            "description": "Category positioning response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositioningResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/positioning/changes": {
      "get": {
        "tags": [
          "Positioning"
        ],
        "summary": "Positioning changes",
        "description": "Change in allocation by asset, category, or model between recent rounds.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Track"
          },
          {
            "name": "window",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "latest"
              ],
              "default": "latest"
            },
            "description": "Comparison window. The public v1 API currently serves the latest round-over-round change."
          }
        ],
        "responses": {
          "200": {
            "description": "Positioning change response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositioningChangeResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/risk-appetite": {
      "get": {
        "tags": [
          "Positioning"
        ],
        "summary": "Current and historical AI Risk Appetite",
        "description": "Allocation-based 0-100 risk pulse from live weekly and monthly portfolios, including historical track readings, model agreement, regime mix, allocation drivers, and all unresolved portfolio exposure.",
        "responses": {
          "200": {
            "description": "Current and historical AI Risk Appetite response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RiskAppetiteResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/live/performance": {
      "get": {
        "tags": [
          "Positioning"
        ],
        "summary": "Live mark-to-market performance",
        "description": "Open tests marked to the latest available close. These are interim values, not official final scores.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Track"
          }
        ],
        "responses": {
          "200": {
            "description": "Live performance response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LivePerformanceResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/insights": {
      "get": {
        "tags": [
          "Insights"
        ],
        "summary": "List insights",
        "description": "Ranked insight feed with category filters, round context, evidence links, calculations, and confidence metadata.",
        "parameters": [
          {
            "$ref": "#/components/parameters/InsightCategory"
          },
          {
            "$ref": "#/components/parameters/InsightTier"
          },
          {
            "$ref": "#/components/parameters/InsightConfidence"
          },
          {
            "$ref": "#/components/parameters/Track"
          },
          {
            "$ref": "#/components/parameters/InsightMaturity"
          },
          {
            "$ref": "#/components/parameters/InsightView"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "Insight list response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/insights/{insight_id}": {
      "get": {
        "tags": [
          "Insights"
        ],
        "summary": "Get insight",
        "description": "One insight with round context, supporting calculations, and source evidence.",
        "parameters": [
          {
            "$ref": "#/components/parameters/InsightIdPath"
          }
        ],
        "responses": {
          "200": {
            "description": "Insight response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Insight"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/market-environments": {
      "get": {
        "tags": [
          "Insights"
        ],
        "summary": "Market environment benchmark",
        "description": "Resolved weekly and monthly model performance grouped by S&P 500 environment, including sample maturity, balanced scores, and deterministic signals.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Track"
          }
        ],
        "responses": {
          "200": {
            "description": "Market environment response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketEnvironmentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/rounds": {
      "get": {
        "tags": [
          "Rounds"
        ],
        "summary": "List rounds",
        "description": "Round metadata with track, status, dates, universe version, and proof links.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Track"
          },
          {
            "$ref": "#/components/parameters/Status"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "Round list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Round"
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "next_cursor"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/rounds/{round_id}": {
      "get": {
        "tags": [
          "Rounds"
        ],
        "summary": "Get round",
        "description": "Round metadata, input hashes, model count, track, status, and timing.",
        "parameters": [
          {
            "$ref": "#/components/parameters/RoundIdPath"
          }
        ],
        "responses": {
          "200": {
            "description": "Round details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Round"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/rounds/{round_id}/portfolios": {
      "get": {
        "tags": [
          "Rounds"
        ],
        "summary": "Round portfolios",
        "description": "Saved model allocations for a round.",
        "parameters": [
          {
            "$ref": "#/components/parameters/RoundIdPath"
          }
        ],
        "responses": {
          "200": {
            "description": "Round portfolio response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortfolioListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/rounds/{round_id}/concentration": {
      "get": {
        "tags": [
          "Rounds"
        ],
        "summary": "Round concentration",
        "description": "Run-level consensus allocation, category mix, and concentration summary for one round.",
        "parameters": [
          {
            "$ref": "#/components/parameters/RoundIdPath"
          }
        ],
        "responses": {
          "200": {
            "description": "Round concentration response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoundConcentrationResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/rounds/{round_id}/live-performance": {
      "get": {
        "tags": [
          "Rounds"
        ],
        "summary": "Round live performance",
        "description": "Interim mark-to-market rows for an unresolved round, plus the latest live snapshot by model.",
        "parameters": [
          {
            "$ref": "#/components/parameters/RoundIdPath"
          }
        ],
        "responses": {
          "200": {
            "description": "Round live performance response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LivePerformanceResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/rounds/{round_id}/results": {
      "get": {
        "tags": [
          "Rounds"
        ],
        "summary": "Round results",
        "description": "Resolved returns, benchmark comparison, and scoring prices for a completed round.",
        "parameters": [
          {
            "$ref": "#/components/parameters/RoundIdPath"
          }
        ],
        "responses": {
          "200": {
            "description": "Round results response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoundResultResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/leaderboards/latest": {
      "get": {
        "tags": [
          "Leaderboards"
        ],
        "summary": "Latest leaderboard",
        "description": "Most recent resolved round leaderboard for the requested weekly or monthly track.",
        "parameters": [
          {
            "$ref": "#/components/parameters/LeaderboardTrack"
          }
        ],
        "responses": {
          "200": {
            "description": "Latest leaderboard response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeaderboardResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/leaderboards/cumulative": {
      "get": {
        "tags": [
          "Leaderboards"
        ],
        "summary": "Cumulative leaderboard",
        "description": "All available resolved model results by weekly track or monthly track. Weekly and monthly scoreboards are not combined.",
        "parameters": [
          {
            "$ref": "#/components/parameters/LeaderboardTrack"
          }
        ],
        "responses": {
          "200": {
            "description": "Cumulative leaderboard response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeaderboardResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/leaderboards/benchmark-sets": {
      "get": {
        "tags": [
          "Leaderboards"
        ],
        "summary": "Benchmark comparison sets",
        "description": "Living equal-run comparison sets, including the current weekly and monthly benchmarks.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Track"
          }
        ],
        "responses": {
          "200": {
            "description": "Benchmark comparison sets response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BenchmarkSetsResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/leaderboards/benchmark-sets/{set_id}": {
      "get": {
        "tags": [
          "Leaderboards"
        ],
        "summary": "Benchmark comparison set",
        "description": "One comparison set with model roster, included rounds, excluded rounds, and CapitalBench Scores.",
        "parameters": [
          {
            "$ref": "#/components/parameters/BenchmarkSetIdPath"
          }
        ],
        "responses": {
          "200": {
            "description": "Benchmark comparison set response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BenchmarkSet"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/models": {
      "get": {
        "tags": [
          "Models"
        ],
        "summary": "List models",
        "description": "Models included in CapitalBench rounds with provider metadata and active status.",
        "responses": {
          "200": {
            "description": "Model list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Model"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/models/{model_id}": {
      "get": {
        "tags": [
          "Models"
        ],
        "summary": "Get model",
        "description": "Model profile, record, provider, and proof links.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ModelIdPath"
          }
        ],
        "responses": {
          "200": {
            "description": "Model details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Model"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/models/{model_id}/holdings": {
      "get": {
        "tags": [
          "Models"
        ],
        "summary": "Model holdings",
        "description": "Active and historical holdings for one model, split by weekly and monthly tests.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ModelIdPath"
          },
          {
            "$ref": "#/components/parameters/Track"
          },
          {
            "$ref": "#/components/parameters/Scope"
          }
        ],
        "responses": {
          "200": {
            "description": "Model holdings response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllocationListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/models/{model_id}/live-performance": {
      "get": {
        "tags": [
          "Models"
        ],
        "summary": "Model live performance",
        "description": "One model's interim return across open weekly or monthly tests.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ModelIdPath"
          },
          {
            "$ref": "#/components/parameters/Track"
          }
        ],
        "responses": {
          "200": {
            "description": "Model live performance response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LivePerformanceResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/models/{model_id}/market-environments": {
      "get": {
        "tags": [
          "Models",
          "Insights"
        ],
        "summary": "Model market environment performance",
        "description": "One model's returns, scores, sample counts, and related signals across resolved weekly and monthly S&P 500 environments.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ModelIdPath"
          },
          {
            "$ref": "#/components/parameters/Track"
          }
        ],
        "responses": {
          "200": {
            "description": "Model market environment response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelMarketEnvironmentResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/models/{model_id}/style": {
      "get": {
        "tags": [
          "Models"
        ],
        "summary": "Model style profile",
        "description": "Allocation fingerprint including cash use, equity weight, thematic concentration, country exposure, and risk appetite score.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ModelIdPath"
          }
        ],
        "responses": {
          "200": {
            "description": "Model style response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelStyle"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/models/behavior": {
      "get": {
        "tags": [
          "Models"
        ],
        "summary": "Model behavior profiles",
        "description": "Canonical deterministic model behavior profiles with archetype labels, risk-taking score, concentration, turnover, peer similarity, resolved performance context, and the dynamic pattern report.",
        "responses": {
          "200": {
            "description": "Model behavior profile collection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelBehaviorResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/models/patterns": {
      "get": {
        "tags": [
          "Models"
        ],
        "summary": "Model behavior pattern report",
        "description": "Direct access to the dynamic model behavior pattern report used by the public comparison page.",
        "responses": {
          "200": {
            "description": "Model behavior pattern report",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelPatternReport"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/models/{model_id}/behavior": {
      "get": {
        "tags": [
          "Models"
        ],
        "summary": "One model behavior profile",
        "description": "One model's deterministic behavior profile, including allocation style, sample size, peer similarity, turnover, and methodology link.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ModelIdPath"
          }
        ],
        "responses": {
          "200": {
            "description": "Model behavior profile",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelBehaviorProfile"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/universe/current": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Current asset universe",
        "description": "Current ETF, cash, commodity, currency, and crypto-proxy options available to models.",
        "responses": {
          "200": {
            "description": "Current universe response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "universe_version": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Asset"
                      }
                    }
                  },
                  "required": [
                    "universe_version",
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/assets/{option_id}": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Get asset",
        "description": "Asset metadata, category tags, current universe status, and ticker mapping.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OptionIdPath"
          }
        ],
        "responses": {
          "200": {
            "description": "Asset details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Asset"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/assets/{option_id}/model-holders": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Model holders for asset",
        "description": "Models with active or cumulative allocation to a selected asset.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OptionIdPath"
          },
          {
            "$ref": "#/components/parameters/Track"
          },
          {
            "$ref": "#/components/parameters/Scope"
          }
        ],
        "responses": {
          "200": {
            "description": "Asset holders response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositioningResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/metadata": {
      "get": {
        "tags": [
          "Metadata"
        ],
        "summary": "API metadata",
        "description": "Generated read-model metadata, source freshness, dataset counts, and endpoint discovery helpers.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "API metadata response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetadataResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/live/performance/history": {
      "get": {
        "tags": [
          "Raw Data"
        ],
        "summary": "Live performance history",
        "description": "Raw interim mark-to-market rows across rounds and models, with optional filters.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Track"
          },
          {
            "$ref": "#/components/parameters/RoundIdQuery"
          },
          {
            "$ref": "#/components/parameters/ModelId"
          },
          {
            "$ref": "#/components/parameters/Published"
          },
          {
            "$ref": "#/components/parameters/UsableOnly"
          },
          {
            "$ref": "#/components/parameters/PriceStatus"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "Live performance history response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LivePerformanceHistoryResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/returns": {
      "get": {
        "tags": [
          "Raw Data"
        ],
        "summary": "List asset returns",
        "description": "Raw official-run asset return rows, including benchmark and cash rows where available.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Track"
          },
          {
            "$ref": "#/components/parameters/RoundIdQuery"
          },
          {
            "$ref": "#/components/parameters/OptionIdQuery"
          },
          {
            "$ref": "#/components/parameters/IsBenchmark"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "List asset returns response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/allocations": {
      "get": {
        "tags": [
          "Raw Data"
        ],
        "summary": "List allocation rows",
        "description": "Raw official-run allocation rows with track, scope, round, model, and asset filters.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Track"
          },
          {
            "$ref": "#/components/parameters/Scope"
          },
          {
            "$ref": "#/components/parameters/RoundIdQuery"
          },
          {
            "$ref": "#/components/parameters/ModelId"
          },
          {
            "$ref": "#/components/parameters/OptionIdQuery"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "List allocation rows response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllocationListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/proof": {
      "get": {
        "tags": [
          "Evidence"
        ],
        "summary": "List proof records",
        "description": "Official-run proof records with file hashes and round audit URLs.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Track"
          },
          {
            "$ref": "#/components/parameters/Status"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "List proof records response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProofListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/rounds/{round_id}/proof": {
      "get": {
        "tags": [
          "Evidence"
        ],
        "summary": "Round proof",
        "description": "Official proof record for one round, including hashes and public audit URL.",
        "parameters": [
          {
            "$ref": "#/components/parameters/RoundIdPath"
          }
        ],
        "responses": {
          "200": {
            "description": "Round proof response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoundProofResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/benchmark-evidence": {
      "get": {
        "tags": [
          "Evidence"
        ],
        "summary": "Benchmark evidence",
        "description": "Current benchmark evidence report with qualification thresholds, protocol mix, score-scale caveats, and track maturity metadata.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Benchmark evidence response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BenchmarkEvidenceResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/v1/models/{model_id}/portfolios": {
      "get": {
        "tags": [
          "Models"
        ],
        "summary": "Model portfolios",
        "description": "Portfolio-level records for one model, including rationale summaries, key risks, parsed proof paths, and allocations.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ModelIdPath"
          },
          {
            "$ref": "#/components/parameters/Track"
          },
          {
            "$ref": "#/components/parameters/Scope"
          }
        ],
        "responses": {
          "200": {
            "description": "Model portfolios response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortfolioListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/assets": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "List assets",
        "description": "All generated asset metadata, optionally filtered to current or inactive universe membership.",
        "parameters": [
          {
            "$ref": "#/components/parameters/CurrentAssetFilter"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "List assets response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetListResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API key"
      }
    },
    "parameters": {
      "Track": {
        "name": "track",
        "in": "query",
        "schema": {
          "type": "string",
          "enum": [
            "weekly",
            "monthly",
            "all"
          ],
          "default": "all"
        },
        "description": "Benchmark track."
      },
      "LeaderboardTrack": {
        "name": "track",
        "in": "query",
        "schema": {
          "type": "string",
          "enum": [
            "weekly",
            "monthly"
          ],
          "default": "weekly"
        },
        "description": "Leaderboard track. Weekly and monthly scoreboards remain separate."
      },
      "Scope": {
        "name": "scope",
        "in": "query",
        "schema": {
          "type": "string",
          "enum": [
            "active",
            "cumulative"
          ],
          "default": "active"
        },
        "description": "Whether to use live unresolved rounds or all historical rounds."
      },
      "Status": {
        "name": "status",
        "in": "query",
        "schema": {
          "type": "string",
          "enum": [
            "active",
            "resolved",
            "overdue",
            "all"
          ],
          "default": "all"
        },
        "description": "Round status filter."
      },
      "GroupBy": {
        "name": "group_by",
        "in": "query",
        "schema": {
          "type": "string",
          "enum": [
            "asset",
            "category",
            "model"
          ],
          "default": "asset"
        },
        "description": "Aggregation dimension."
      },
      "ModelId": {
        "name": "model_id",
        "in": "query",
        "schema": {
          "type": "string"
        },
        "description": "Optional model identifier."
      },
      "ModelIdPath": {
        "name": "model_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "CapitalBench model identifier."
      },
      "OptionIdPath": {
        "name": "option_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "CapitalBench asset option identifier."
      },
      "RoundIdPath": {
        "name": "round_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "CapitalBench round identifier."
      },
      "BenchmarkSetIdPath": {
        "name": "set_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "CapitalBench benchmark comparison set identifier."
      },
      "InsightIdPath": {
        "name": "insight_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "CapitalBench insight identifier."
      },
      "InsightCategory": {
        "name": "category",
        "in": "query",
        "schema": {
          "type": "string"
        },
        "description": "Optional insight category filter."
      },
      "InsightTier": {
        "name": "tier",
        "in": "query",
        "schema": {
          "type": "string",
          "enum": [
            "global",
            "category",
            "detail",
            "all"
          ],
          "default": "all"
        },
        "description": "Publication tier filter."
      },
      "InsightConfidence": {
        "name": "confidence",
        "in": "query",
        "schema": {
          "type": "string",
          "enum": [
            "high",
            "medium",
            "low",
            "all"
          ],
          "default": "all"
        },
        "description": "Evidence-confidence filter."
      },
      "InsightMaturity": {
        "name": "maturity",
        "in": "query",
        "schema": {
          "type": "string",
          "enum": [
            "ready",
            "forming",
            "all"
          ],
          "default": "all"
        },
        "description": "Statistical maturity filter for insights that expose maturity metadata."
      },
      "InsightView": {
        "name": "view",
        "in": "query",
        "schema": {
          "type": "string",
          "enum": [
            "featured",
            "all"
          ],
          "default": "all"
        },
        "description": "Return the category-balanced featured feed or the complete feed."
      },
      "AsOf": {
        "name": "as_of",
        "in": "query",
        "schema": {
          "type": "string",
          "format": "date-time"
        },
        "description": "Optional timestamp for reproducible active-position snapshots."
      },
      "Limit": {
        "name": "limit",
        "in": "query",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 250,
          "default": 100
        },
        "description": "Maximum records to return."
      },
      "Cursor": {
        "name": "cursor",
        "in": "query",
        "schema": {
          "type": "string"
        },
        "description": "Pagination cursor returned by the previous response."
      },
      "CurrentAssetFilter": {
        "name": "current",
        "in": "query",
        "schema": {
          "type": "string",
          "enum": [
            "true",
            "false",
            "all"
          ],
          "default": "all"
        },
        "description": "Filter assets by current investable-universe membership."
      },
      "RoundIdQuery": {
        "name": "round_id",
        "in": "query",
        "schema": {
          "type": "string"
        },
        "description": "Optional CapitalBench round identifier filter."
      },
      "OptionIdQuery": {
        "name": "option_id",
        "in": "query",
        "schema": {
          "type": "string"
        },
        "description": "Optional CapitalBench asset option identifier filter."
      },
      "Published": {
        "name": "published",
        "in": "query",
        "schema": {
          "type": "boolean"
        },
        "description": "Optional filter for published interim performance rows."
      },
      "UsableOnly": {
        "name": "usable_only",
        "in": "query",
        "schema": {
          "type": "boolean",
          "default": false
        },
        "description": "When true, returns only interim rows eligible for latest live-performance aggregation."
      },
      "PriceStatus": {
        "name": "price_status",
        "in": "query",
        "schema": {
          "type": "string"
        },
        "description": "Optional interim pricing status filter, such as complete or unavailable."
      },
      "IsBenchmark": {
        "name": "is_benchmark",
        "in": "query",
        "schema": {
          "type": "boolean"
        },
        "description": "Optional filter for the benchmark asset return row."
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The request contains an invalid parameter.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing or invalid API key.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "Requested object was not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "API key does not have the required scope.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Round": {
        "type": "object",
        "properties": {
          "round_id": {
            "type": "string",
            "examples": [
              "CB-2026-05-28-1W"
            ]
          },
          "track": {
            "type": "string",
            "enum": [
              "weekly",
              "monthly"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "resolved"
            ]
          },
          "start_at": {
            "type": "string",
            "format": "date-time"
          },
          "end_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "universe_version": {
            "type": "string"
          },
          "model_count": {
            "type": "integer"
          },
          "benchmark_option_id": {
            "type": "string"
          },
          "proof": {
            "$ref": "#/components/schemas/Proof"
          }
        },
        "required": [
          "round_id",
          "track",
          "status",
          "start_at",
          "universe_version",
          "model_count"
        ]
      },
      "Model": {
        "type": "object",
        "properties": {
          "model_id": {
            "type": "string",
            "examples": [
              "openai-gpt-5"
            ]
          },
          "label": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "first_round_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "latest_round_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "model_id",
          "label",
          "provider",
          "active"
        ]
      },
      "Asset": {
        "type": "object",
        "properties": {
          "option_id": {
            "type": "string",
            "examples": [
              "SEMICONDUCTORS"
            ]
          },
          "label": {
            "type": "string",
            "examples": [
              "Semiconductors"
            ]
          },
          "ticker": {
            "type": [
              "string",
              "null"
            ],
            "examples": [
              "SMH"
            ]
          },
          "asset_class": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "risk_score_1_5": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5
          },
          "risk_on_loading": {
            "type": "number",
            "minimum": -1,
            "maximum": 1
          },
          "risk_regime_group": {
            "type": "string"
          },
          "defensive": {
            "type": "boolean"
          },
          "technology": {
            "type": "boolean"
          },
          "in_current_universe": {
            "type": "boolean"
          }
        },
        "required": [
          "option_id",
          "label",
          "asset_class",
          "category",
          "in_current_universe"
        ]
      },
      "Allocation": {
        "type": "object",
        "properties": {
          "round_id": {
            "type": "string"
          },
          "model_id": {
            "type": "string"
          },
          "option_id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "ticker": {
            "type": [
              "string",
              "null"
            ]
          },
          "allocation_pct": {
            "type": "number",
            "description": "Portfolio weight in percentage points."
          },
          "track": {
            "type": "string",
            "enum": [
              "weekly",
              "monthly"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "resolved"
            ]
          }
        },
        "required": [
          "round_id",
          "model_id",
          "option_id",
          "label",
          "allocation_pct",
          "track",
          "status"
        ]
      },
      "PositioningRow": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "allocation_pct": {
            "type": "number"
          },
          "model_count": {
            "type": "integer"
          },
          "round_count": {
            "type": "integer"
          },
          "tracks": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "weekly",
                "monthly"
              ]
            }
          },
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelWeight"
            }
          }
        },
        "required": [
          "key",
          "label",
          "allocation_pct",
          "model_count",
          "round_count",
          "tracks"
        ]
      },
      "PositioningResponse": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "scope": {
            "type": "string",
            "enum": [
              "active",
              "cumulative"
            ]
          },
          "track": {
            "type": "string",
            "enum": [
              "weekly",
              "monthly",
              "all"
            ]
          },
          "group_by": {
            "type": "string",
            "enum": [
              "asset",
              "category",
              "model"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PositioningRow"
            }
          }
        },
        "required": [
          "as_of",
          "scope",
          "track",
          "group_by",
          "data"
        ]
      },
      "PositioningChangeResponse": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "window": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "allocation_pct": {
                  "type": "number"
                },
                "prior_allocation_pct": {
                  "type": "number"
                },
                "change_pp": {
                  "type": "number"
                }
              },
              "required": [
                "key",
                "label",
                "allocation_pct",
                "prior_allocation_pct",
                "change_pp"
              ]
            }
          }
        },
        "required": [
          "as_of",
          "window",
          "data"
        ]
      },
      "RiskAppetiteTrack": {
        "type": "object",
        "properties": {
          "round_id": {
            "type": "string"
          },
          "decision_date": {
            "type": "string",
            "format": "date"
          },
          "decision_deadline_utc": {
            "type": "string",
            "format": "date-time"
          },
          "track": {
            "type": "string",
            "enum": [
              "weekly",
              "monthly"
            ]
          },
          "score": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100
          },
          "label": {
            "type": "string"
          },
          "model_count": {
            "type": "integer"
          },
          "portfolio_count": {
            "type": "integer"
          }
        },
        "required": [
          "round_id",
          "track",
          "score",
          "label",
          "model_count",
          "portfolio_count"
        ]
      },
      "RiskAppetiteHistoryPoint": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "combined_score": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100
          },
          "label": {
            "type": "string"
          },
          "weekly_score": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100
          },
          "monthly_score": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100
          },
          "weekly_round_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "monthly_round_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "model_count": {
            "type": "integer"
          },
          "agreement_label": {
            "type": "string",
            "enum": [
              "Tight",
              "Mixed",
              "Divided",
              "Not available"
            ]
          },
          "agreement_standard_deviation": {
            "type": [
              "number",
              "null"
            ]
          },
          "agreement_range": {
            "type": "object",
            "properties": {
              "minimum": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 100
              },
              "maximum": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 100
              }
            },
            "required": [
              "minimum",
              "maximum"
            ]
          },
          "top_regime": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "key": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "allocation_pct": {
                "type": "number"
              }
            }
          },
          "top_assets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "option_id": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "ticker": {
                  "type": "string"
                },
                "allocation_pct": {
                  "type": "number"
                },
                "risk_on_loading": {
                  "type": "number",
                  "minimum": -1,
                  "maximum": 1
                },
                "regime_group": {
                  "type": "string"
                }
              },
              "required": [
                "option_id",
                "label",
                "allocation_pct",
                "risk_on_loading",
                "regime_group"
              ]
            }
          },
          "regime_exposure": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "allocation_pct": {
                  "type": "number"
                }
              },
              "required": [
                "key",
                "label",
                "allocation_pct"
              ]
            }
          }
        },
        "required": [
          "date",
          "combined_score",
          "label",
          "weekly_score",
          "monthly_score",
          "weekly_round_id",
          "monthly_round_id",
          "model_count",
          "agreement_label",
          "agreement_standard_deviation",
          "agreement_range",
          "top_regime",
          "top_assets",
          "regime_exposure"
        ]
      },
      "RiskAppetiteOutstandingHistoryPoint": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "score": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100
          },
          "label": {
            "type": "string"
          },
          "weekly_score": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100
          },
          "monthly_score": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100
          },
          "portfolio_count": {
            "type": "integer"
          },
          "round_count": {
            "type": "integer"
          },
          "weekly_portfolio_count": {
            "type": "integer"
          },
          "monthly_portfolio_count": {
            "type": "integer"
          },
          "weekly_round_count": {
            "type": "integer"
          },
          "monthly_round_count": {
            "type": "integer"
          }
        },
        "required": [
          "date",
          "score",
          "label",
          "weekly_score",
          "monthly_score",
          "portfolio_count",
          "round_count",
          "weekly_portfolio_count",
          "monthly_portfolio_count",
          "weekly_round_count",
          "monthly_round_count"
        ]
      },
      "RiskAppetiteResponse": {
        "type": "object",
        "properties": {
          "methodology_version": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "live_allocations_not_investment_advice"
            ]
          },
          "current_decision_pulse": {
            "type": "object",
            "properties": {
              "score": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 100
              },
              "label": {
                "type": "string"
              },
              "regime": {
                "type": "string"
              },
              "weekly": {
                "$ref": "#/components/schemas/RiskAppetiteTrack"
              },
              "monthly": {
                "$ref": "#/components/schemas/RiskAppetiteTrack"
              },
              "change_from_previous": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "previous_score": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 100
              },
              "agreement": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "enum": [
                      "Tight",
                      "Mixed",
                      "Divided",
                      "Not available"
                    ]
                  },
                  "standard_deviation": {
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "required": [
                  "label",
                  "standard_deviation"
                ]
              },
              "top_assets": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "option_id": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "ticker": {
                      "type": "string"
                    },
                    "allocation_pct": {
                      "type": "number"
                    },
                    "risk_on_loading": {
                      "type": "number",
                      "minimum": -1,
                      "maximum": 1
                    },
                    "regime_group": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "option_id",
                    "label",
                    "allocation_pct",
                    "risk_on_loading",
                    "regime_group"
                  ]
                }
              },
              "regime_exposure": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "allocation_pct": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "key",
                    "label",
                    "allocation_pct"
                  ]
                }
              }
            },
            "required": [
              "score",
              "label",
              "regime",
              "weekly",
              "monthly",
              "agreement",
              "top_assets",
              "regime_exposure"
            ]
          },
          "outstanding_live_book": {
            "type": "object",
            "properties": {
              "score": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 100
              },
              "label": {
                "type": "string"
              },
              "portfolio_count": {
                "type": "integer"
              },
              "round_count": {
                "type": "integer"
              }
            },
            "required": [
              "score",
              "label",
              "portfolio_count",
              "round_count"
            ]
          },
          "history": {
            "type": "object",
            "properties": {
              "decision_pulse": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/RiskAppetiteHistoryPoint"
                }
              },
              "outstanding_live_book": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/RiskAppetiteOutstandingHistoryPoint"
                }
              }
            },
            "required": [
              "decision_pulse",
              "outstanding_live_book"
            ]
          },
          "scale": {
            "type": "object",
            "properties": {
              "minimum": {
                "type": "number"
              },
              "maximum": {
                "type": "number"
              },
              "bands": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "minimum": {
                      "type": "number"
                    },
                    "maximum": {
                      "type": "number"
                    },
                    "label": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "minimum",
                    "maximum",
                    "label"
                  ]
                }
              }
            },
            "required": [
              "minimum",
              "maximum",
              "bands"
            ]
          }
        },
        "required": [
          "methodology_version",
          "status",
          "current_decision_pulse",
          "outstanding_live_book",
          "history",
          "scale"
        ]
      },
      "LivePerformanceResponse": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "track": {
            "type": "string",
            "enum": [
              "weekly",
              "monthly",
              "all"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "live_not_final"
            ]
          },
          "latest_price_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "round_count": {
            "type": "integer"
          },
          "model_count": {
            "type": "integer"
          },
          "snapshot_count": {
            "type": "integer"
          },
          "benchmark": {
            "type": "object",
            "properties": {
              "label": {
                "type": "string"
              },
              "return_pct": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "round_count": {
                "type": "integer"
              }
            },
            "required": [
              "label",
              "return_pct",
              "round_count"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LivePerformanceRow"
            }
          }
        },
        "required": [
          "as_of",
          "track",
          "status",
          "latest_price_date",
          "round_count",
          "model_count",
          "snapshot_count",
          "benchmark",
          "data"
        ]
      },
      "LivePerformanceRow": {
        "type": "object",
        "properties": {
          "rank": {
            "type": "integer"
          },
          "model_id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "portfolio_return_pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "sp500_return_pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "alpha_pp": {
            "type": [
              "number",
              "null"
            ],
            "description": "Portfolio Minus S&P 500, in percentage points."
          },
          "live_round_count": {
            "type": "integer"
          },
          "latest_price_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "rounds": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "round_id": {
                  "type": "string"
                },
                "track": {
                  "type": "string",
                  "enum": [
                    "weekly",
                    "monthly"
                  ]
                },
                "price_date": {
                  "type": "string",
                  "format": "date"
                },
                "portfolio_return_pct": {
                  "type": "number"
                },
                "sp500_return_pct": {
                  "type": "number"
                },
                "alpha_pp": {
                  "type": "number",
                  "description": "Portfolio Minus S&P 500, in percentage points."
                }
              },
              "required": [
                "round_id",
                "track",
                "price_date",
                "portfolio_return_pct",
                "sp500_return_pct",
                "alpha_pp"
              ]
            }
          }
        },
        "required": [
          "rank",
          "model_id",
          "label",
          "provider",
          "portfolio_return_pct",
          "sp500_return_pct",
          "alpha_pp",
          "live_round_count"
        ]
      },
      "InsightListResponse": {
        "type": "object",
        "properties": {
          "engine_version": {
            "type": [
              "string",
              "null"
            ]
          },
          "generated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "data_as_of": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "insight_count": {
            "type": "integer"
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "filters": {
            "type": "object",
            "additionalProperties": true,
            "description": "Normalized filters applied to this insight response."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Insight"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "engine_version",
          "generated_at",
          "data_as_of",
          "insight_count",
          "categories",
          "filters",
          "data",
          "next_cursor"
        ]
      },
      "Insight": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "category": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "why_it_matters": {
            "type": "string"
          },
          "confidence": {
            "type": "string",
            "enum": [
              "high",
              "medium",
              "low"
            ]
          },
          "source_type": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "importance_score": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "publication_tier": {
            "type": "string",
            "enum": [
              "global",
              "category",
              "detail"
            ]
          },
          "publication_reason": {
            "type": "string"
          },
          "data_as_of": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "context": {
            "$ref": "#/components/schemas/InsightContext"
          },
          "audiences": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "calculations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InsightCalculation"
            }
          },
          "evidence": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InsightEvidence"
            }
          },
          "related": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InsightEvidence"
            }
          }
        },
        "required": [
          "id",
          "date",
          "category",
          "title",
          "summary",
          "why_it_matters",
          "confidence",
          "source_type",
          "status",
          "importance_score",
          "publication_tier",
          "context",
          "calculations",
          "evidence"
        ]
      },
      "InsightContext": {
        "type": "object",
        "description": "Human-readable benchmark context for the insight, including whether it is weekly/monthly, live/resolved, and which round or oracle asset it references.",
        "properties": {
          "scope": {
            "type": "string"
          },
          "track": {
            "type": "string"
          },
          "track_label": {
            "type": "string"
          },
          "round_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "run_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "primary_label": {
            "type": "string"
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "status_label": {
            "type": [
              "string",
              "null"
            ]
          },
          "decision_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "entry_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "exit_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "data_as_of": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "model_count": {
            "type": [
              "integer",
              "null"
            ]
          },
          "result_count": {
            "type": [
              "integer",
              "null"
            ]
          },
          "asset_count": {
            "type": [
              "integer",
              "null"
            ]
          },
          "round_count": {
            "type": [
              "integer",
              "null"
            ]
          },
          "round_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "decision_dates": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date"
            }
          },
          "median_confidence": {
            "type": [
              "number",
              "null"
            ]
          },
          "oracle_asset": {
            "$ref": "#/components/schemas/InsightAssetContext"
          },
          "model": {
            "$ref": "#/components/schemas/InsightModelContext"
          }
        },
        "required": [
          "scope",
          "primary_label"
        ]
      },
      "InsightAssetContext": {
        "type": "object",
        "properties": {
          "option_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "ticker": {
            "type": [
              "string",
              "null"
            ]
          },
          "display": {
            "type": [
              "string",
              "null"
            ]
          },
          "return_pct": {
            "type": [
              "number",
              "null"
            ]
          }
        }
      },
      "InsightModelContext": {
        "type": "object",
        "properties": {
          "model_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "InsightCalculation": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": [
              "number",
              "string",
              "null"
            ]
          },
          "unit": {
            "type": [
              "string",
              "null"
            ]
          },
          "formula": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "name",
          "value"
        ]
      },
      "InsightEvidence": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "href": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "label"
        ]
      },
      "PortfolioResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Allocation"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "RoundConcentrationResponse": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "round_id": {
            "type": "string"
          },
          "run_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "track": {
            "type": "string",
            "enum": [
              "weekly",
              "monthly"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "resolved"
            ]
          },
          "model_count": {
            "type": "integer"
          },
          "portfolio_count": {
            "type": "integer"
          },
          "summary": {
            "$ref": "#/components/schemas/ConcentrationSummary"
          },
          "assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConcentrationAsset"
            }
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConcentrationCategory"
            }
          }
        },
        "required": [
          "as_of",
          "round_id",
          "run_id",
          "track",
          "status",
          "model_count",
          "portfolio_count",
          "summary",
          "assets",
          "categories"
        ]
      },
      "ConcentrationSummary": {
        "type": "object",
        "properties": {
          "top_asset_share_pct": {
            "type": "number"
          },
          "top_three_share_pct": {
            "type": "number"
          },
          "effective_asset_count": {
            "type": "number",
            "description": "One divided by the sum of squared asset shares."
          }
        },
        "required": [
          "top_asset_share_pct",
          "top_three_share_pct",
          "effective_asset_count"
        ]
      },
      "ConcentrationAsset": {
        "type": "object",
        "properties": {
          "option_id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "ticker": {
            "type": [
              "string",
              "null"
            ]
          },
          "category": {
            "type": "string"
          },
          "allocation_pct": {
            "type": "number"
          },
          "model_count": {
            "type": "integer"
          },
          "models": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConcentrationModelWeight"
            }
          }
        },
        "required": [
          "option_id",
          "label",
          "ticker",
          "category",
          "allocation_pct",
          "model_count",
          "models"
        ]
      },
      "ConcentrationCategory": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "allocation_pct": {
            "type": "number"
          },
          "asset_count": {
            "type": "integer"
          }
        },
        "required": [
          "key",
          "label",
          "allocation_pct",
          "asset_count"
        ]
      },
      "ConcentrationModelWeight": {
        "type": "object",
        "properties": {
          "model_id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "provider": {
            "type": [
              "string",
              "null"
            ]
          },
          "allocation_pct": {
            "type": "number"
          }
        },
        "required": [
          "model_id",
          "label",
          "provider",
          "allocation_pct"
        ]
      },
      "RoundResultResponse": {
        "type": "object",
        "properties": {
          "round_id": {
            "type": "string"
          },
          "benchmark_return_pct": {
            "type": "number"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LeaderboardRow"
            }
          }
        },
        "required": [
          "round_id",
          "benchmark_return_pct",
          "data"
        ]
      },
      "BenchmarkSetsResponse": {
        "type": "object",
        "properties": {
          "policy": {
            "$ref": "#/components/schemas/BenchmarkSetPolicy"
          },
          "current": {
            "type": "object",
            "properties": {
              "weekly": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "monthly": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "sets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BenchmarkSet"
            }
          }
        },
        "required": [
          "policy",
          "current",
          "sets"
        ]
      },
      "BenchmarkSetPolicy": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "qualification_thresholds": {
            "type": "object",
            "properties": {
              "weekly": {
                "type": "integer"
              },
              "monthly": {
                "type": "integer"
              }
            }
          }
        },
        "required": [
          "version",
          "qualification_thresholds"
        ]
      },
      "BenchmarkSet": {
        "type": "object",
        "properties": {
          "set_id": {
            "type": "string"
          },
          "track": {
            "type": "string",
            "enum": [
              "weekly",
              "monthly"
            ]
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "started_round_id": {
            "type": "string"
          },
          "model_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "qualification_threshold": {
            "type": "integer"
          },
          "is_qualified": {
            "type": "boolean"
          },
          "is_current": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "enum": [
              "current",
              "qualified",
              "forming",
              "waiting"
            ]
          },
          "comparison": {
            "$ref": "#/components/schemas/BenchmarkSetComparison"
          },
          "excluded_rounds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BenchmarkSetExcludedRound"
            }
          },
          "leader": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BenchmarkSetRow"
              },
              {
                "type": "null"
              }
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BenchmarkSetRow"
            }
          }
        },
        "required": [
          "set_id",
          "track",
          "label",
          "model_ids",
          "qualification_threshold",
          "is_qualified",
          "is_current",
          "status",
          "comparison",
          "excluded_rounds",
          "data"
        ]
      },
      "BenchmarkSetComparison": {
        "type": "object",
        "description": "Shared-round metadata for an equal-run comparison set.",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "comparison_set"
            ]
          },
          "completed_round_count": {
            "type": "integer"
          },
          "completed_round_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "comparison_round_count": {
            "type": "integer"
          },
          "comparison_round_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "excluded_round_count": {
            "type": "integer"
          },
          "excluded_round_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "comparison_model_count": {
            "type": "integer"
          },
          "qualification_threshold": {
            "type": "integer"
          },
          "is_qualified": {
            "type": "boolean"
          },
          "is_current": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "mode",
          "completed_round_count",
          "completed_round_ids",
          "comparison_round_count",
          "comparison_round_ids",
          "excluded_round_ids",
          "comparison_model_count",
          "qualification_threshold",
          "is_qualified",
          "is_current",
          "status"
        ]
      },
      "BenchmarkSetExcludedRound": {
        "type": "object",
        "properties": {
          "round_id": {
            "type": "string"
          },
          "missing_model_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "present_model_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "round_id",
          "missing_model_ids",
          "present_model_ids",
          "reason"
        ]
      },
      "BenchmarkSetRow": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LeaderboardRow"
          },
          {
            "type": "object",
            "properties": {
              "provider": {
                "type": "string"
              },
              "provider_label": {
                "type": "string"
              },
              "total_portfolio_return_pct": {
                "type": "number"
              },
              "total_max_possible_return_pct": {
                "type": "number"
              },
              "included_round_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        ]
      },
      "LeaderboardResponse": {
        "type": "object",
        "properties": {
          "track": {
            "type": "string",
            "enum": [
              "weekly",
              "monthly",
              "all"
            ]
          },
          "comparison": {
            "$ref": "#/components/schemas/CumulativeComparison"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LeaderboardRow"
            }
          }
        },
        "required": [
          "track",
          "data"
        ]
      },
      "CumulativeComparison": {
        "type": "object",
        "description": "Metadata for cumulative leaderboards that combine all resolved tests in the selected track.",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "all_resolved_rounds"
            ]
          },
          "completed_round_count": {
            "type": "integer"
          },
          "completed_round_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "comparison_round_count": {
            "type": "integer"
          },
          "comparison_round_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "excluded_round_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "comparison_model_count": {
            "type": "integer"
          },
          "is_early_cohort": {
            "type": "boolean"
          }
        },
        "required": [
          "mode",
          "completed_round_count",
          "completed_round_ids",
          "comparison_round_count",
          "comparison_round_ids",
          "excluded_round_ids",
          "comparison_model_count",
          "is_early_cohort"
        ]
      },
      "LeaderboardRow": {
        "type": "object",
        "properties": {
          "rank": {
            "type": "integer"
          },
          "model_id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "portfolio_return_pct": {
            "type": "number"
          },
          "benchmark_return_pct": {
            "type": "number"
          },
          "alpha_pp": {
            "type": "number",
            "description": "Portfolio Minus S&P 500, in percentage points."
          },
          "max_possible_return_pct": {
            "type": [
              "number",
              "null"
            ],
            "description": "Highest realized return among scored options in the saved universe, in percentage points."
          },
          "capitalbench_score": {
            "type": [
              "number",
              "null"
            ],
            "description": "Oracle-relative score where 100 matches the maximum possible return, 0 means no return, and negative values represent losses. Cumulative rows divide total model return by total oracle return."
          },
          "round_count": {
            "type": "integer"
          },
          "tests_required": {
            "type": "integer",
            "description": "Number of resolved tests in this cumulative comparison."
          },
          "tests_included": {
            "type": "integer",
            "description": "Number of resolved tests included for this row."
          },
          "is_rank_eligible": {
            "type": "boolean",
            "description": "Whether this row can lead the cumulative scorecard."
          },
          "sample_status": {
            "type": "string",
            "enum": [
              "eligible",
              "provisional"
            ]
          },
          "win_rate_pct": {
            "type": [
              "number",
              "null"
            ],
            "description": "Share of included tests where the model ranked first."
          },
          "positive_alpha_rate_pct": {
            "type": [
              "number",
              "null"
            ],
            "description": "Share of included tests where the model beat the S&P 500 benchmark."
          }
        },
        "required": [
          "rank",
          "model_id",
          "label",
          "portfolio_return_pct",
          "benchmark_return_pct",
          "alpha_pp"
        ]
      },
      "ModelWeight": {
        "type": "object",
        "properties": {
          "model_id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "allocation_pct": {
            "type": "number"
          }
        },
        "required": [
          "model_id",
          "label",
          "allocation_pct"
        ]
      },
      "ModelStyle": {
        "type": "object",
        "properties": {
          "model_id": {
            "type": "string"
          },
          "risk_appetite_score": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 1,
            "maximum": 5
          },
          "risk_appetite_label": {
            "type": "string"
          },
          "cash_allocation_pct": {
            "type": "number"
          },
          "equity_allocation_pct": {
            "type": "number"
          },
          "thematic_allocation_pct": {
            "type": "number"
          },
          "top_category": {
            "type": [
              "string",
              "null"
            ]
          },
          "sample_round_count": {
            "type": "integer"
          }
        },
        "required": [
          "model_id",
          "risk_appetite_score",
          "risk_appetite_label",
          "sample_round_count"
        ]
      },
      "ModelBehaviorResponse": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "data_as_of": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "methodology_href": {
            "type": "string"
          },
          "summary": {
            "type": "object"
          },
          "profiles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelBehaviorProfile"
            }
          },
          "pattern_report": {
            "$ref": "#/components/schemas/ModelPatternReport"
          },
          "pairwise_similarity": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "left_model_id": {
                  "type": "string"
                },
                "right_model_id": {
                  "type": "string"
                },
                "average_similarity": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "maximum": 1
                },
                "shared_round_count": {
                  "type": "integer"
                }
              },
              "required": [
                "left_model_id",
                "right_model_id",
                "average_similarity",
                "shared_round_count"
              ]
            }
          }
        },
        "required": [
          "version",
          "profiles",
          "pairwise_similarity"
        ]
      },
      "ModelPatternReport": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "data_as_of": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "data_fingerprint": {
            "type": "string"
          },
          "summary": {
            "type": "object"
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "model_id": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "provider_label": {
                  "type": "string"
                },
                "archetype": {
                  "type": "object"
                },
                "sample_status": {
                  "type": "string"
                },
                "sample_caveat": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sample": {
                  "type": "object"
                },
                "behavior_summary": {
                  "type": "string"
                },
                "traits": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "evidence": {
                        "type": "string"
                      },
                      "metric_keys": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "key",
                      "label",
                      "evidence",
                      "metric_keys"
                    ]
                  }
                },
                "key_numbers": {
                  "type": "object",
                  "additionalProperties": {
                    "type": [
                      "number",
                      "integer",
                      "null"
                    ]
                  }
                },
                "top_assets": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "option_id": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "ticker": {
                        "type": "string"
                      },
                      "display": {
                        "type": "string"
                      },
                      "average_allocation_pct": {
                        "type": "number"
                      },
                      "frequency_pct": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "option_id",
                      "label",
                      "display"
                    ]
                  }
                },
                "closest_peer": {
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "methodology_href": {
                  "type": "string"
                }
              },
              "required": [
                "model_id",
                "label",
                "behavior_summary",
                "traits",
                "key_numbers",
                "top_assets",
                "methodology_href"
              ]
            }
          },
          "comparative_findings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "body": {
                  "type": "string"
                },
                "model_ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "supported_metric_keys": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "key",
                "title",
                "body",
                "model_ids",
                "supported_metric_keys"
              ]
            }
          },
          "metric_definitions": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "sample_rules": {
            "type": "object"
          },
          "llm_provenance": {
            "type": "object"
          },
          "llm_input_contract": {
            "type": "object"
          }
        },
        "required": [
          "version",
          "rows",
          "comparative_findings",
          "metric_definitions",
          "sample_rules"
        ]
      },
      "ModelBehaviorProfile": {
        "type": "object",
        "properties": {
          "model_id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "provider_label": {
            "type": "string"
          },
          "archetype": {
            "type": "object",
            "properties": {
              "label": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "confidence": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high"
                ]
              }
            },
            "required": [
              "label",
              "description",
              "confidence"
            ]
          },
          "sample": {
            "type": "object",
            "properties": {
              "portfolio_count": {
                "type": "integer"
              },
              "weekly_portfolio_count": {
                "type": "integer"
              },
              "monthly_portfolio_count": {
                "type": "integer"
              },
              "active_portfolio_count": {
                "type": "integer"
              },
              "resolved_round_count": {
                "type": "integer"
              }
            }
          },
          "metrics": {
            "type": "object",
            "properties": {
              "average_risk_pulse": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 100
              },
              "average_risk_score_1_5": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 1,
                "maximum": 5
              },
              "high_risk_pct": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "defensive_pct": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "tech_pct": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "average_holding_count": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "average_top_allocation_pct": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 100
              },
              "concentration_hhi": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 1
              }
            }
          },
          "peer": {
            "type": "object",
            "properties": {
              "average_peer_similarity": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 1
              },
              "similarity_observation_count": {
                "type": "integer"
              },
              "outlier_round_count": {
                "type": "integer"
              },
              "closest_peer": {
                "type": [
                  "object",
                  "null"
                ]
              }
            }
          },
          "turnover": {
            "type": "object",
            "properties": {
              "average_turnover_pct": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 100
              },
              "weekly_turnover_pct": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 100
              },
              "monthly_turnover_pct": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0,
                "maximum": 100
              },
              "turnover_observation_count": {
                "type": "integer"
              }
            }
          },
          "performance": {
            "type": "object"
          },
          "recent": {
            "type": "object"
          },
          "top_assets": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "top_categories": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "peer_percentiles": {
            "type": "object"
          },
          "methodology_href": {
            "type": "string"
          }
        },
        "required": [
          "model_id",
          "label",
          "archetype",
          "sample",
          "metrics",
          "peer",
          "turnover",
          "methodology_href"
        ]
      },
      "Proof": {
        "type": "object",
        "properties": {
          "prompt_sha256": {
            "type": [
              "string",
              "null"
            ]
          },
          "report_sha256": {
            "type": [
              "string",
              "null"
            ]
          },
          "portfolio_file_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "round_page_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "message"
        ]
      },
      "MetadataResponse": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "api_version": {
            "type": "string"
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "current_universe_round_id": {
            "type": "string"
          },
          "data_counts": {
            "type": "object",
            "additionalProperties": {
              "type": [
                "integer",
                "number"
              ]
            }
          },
          "datasets": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "openapi_url": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "version",
          "generated_at",
          "current_universe_round_id",
          "data_counts",
          "datasets",
          "openapi_url"
        ]
      },
      "Portfolio": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "round_id": {
            "type": "string"
          },
          "run_id": {
            "type": "string"
          },
          "model_id": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "track": {
            "type": "string",
            "enum": [
              "weekly",
              "monthly"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "resolved"
            ]
          },
          "entry_date": {
            "type": "string",
            "format": "date"
          },
          "exit_date": {
            "type": "string",
            "format": "date"
          },
          "selected_option_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "holding_count": {
            "type": "integer"
          },
          "confidence": {
            "type": [
              "number",
              "null"
            ]
          },
          "rationale_summary": {
            "type": [
              "string",
              "null"
            ]
          },
          "portfolio_rationale": {
            "type": [
              "string",
              "null"
            ]
          },
          "key_risks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "parsed_file_path": {
            "type": [
              "string",
              "null"
            ]
          },
          "allocations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Allocation"
            }
          }
        },
        "required": [
          "round_id",
          "run_id",
          "model_id",
          "track",
          "status",
          "allocations"
        ]
      },
      "PortfolioListResponse": {
        "type": "object",
        "properties": {
          "round_id": {
            "type": "string"
          },
          "run_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "model_id": {
            "type": "string"
          },
          "track": {
            "type": "string",
            "enum": [
              "weekly",
              "monthly",
              "all"
            ]
          },
          "scope": {
            "type": "string",
            "enum": [
              "active",
              "cumulative"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Portfolio"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "AllocationListResponse": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "model_id": {
            "type": "string"
          },
          "track": {
            "type": "string",
            "enum": [
              "weekly",
              "monthly",
              "all"
            ]
          },
          "scope": {
            "type": "string",
            "enum": [
              "active",
              "cumulative"
            ]
          },
          "row_count": {
            "type": "integer"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Allocation"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data"
        ]
      },
      "ReturnRow": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "round_id": {
            "type": "string"
          },
          "run_id": {
            "type": "string"
          },
          "track": {
            "type": "string",
            "enum": [
              "weekly",
              "monthly"
            ]
          },
          "option_id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "ticker": {
            "type": [
              "string",
              "null"
            ]
          },
          "entry_price": {
            "type": [
              "number",
              "null"
            ]
          },
          "exit_price": {
            "type": [
              "number",
              "null"
            ]
          },
          "return_pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "rank": {
            "type": [
              "integer",
              "null"
            ]
          },
          "is_benchmark": {
            "type": "boolean"
          },
          "is_cash": {
            "type": "boolean"
          }
        },
        "required": [
          "round_id",
          "run_id",
          "track",
          "option_id",
          "return_pct"
        ]
      },
      "ReturnListResponse": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "track": {
            "type": "string",
            "enum": [
              "weekly",
              "monthly",
              "all"
            ]
          },
          "row_count": {
            "type": "integer"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnRow"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "as_of",
          "track",
          "row_count",
          "data",
          "next_cursor"
        ]
      },
      "InterimPerformanceRow": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "round_id": {
            "type": "string"
          },
          "run_id": {
            "type": "string"
          },
          "track": {
            "type": "string",
            "enum": [
              "weekly",
              "monthly"
            ]
          },
          "status": {
            "type": "string"
          },
          "model_id": {
            "type": "string"
          },
          "target_date": {
            "type": "string",
            "format": "date"
          },
          "price_date": {
            "type": "string",
            "format": "date"
          },
          "days_elapsed": {
            "type": "number"
          },
          "model_return_pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "sp500_return_pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "alpha_pp": {
            "type": [
              "number",
              "null"
            ]
          },
          "price_status": {
            "type": "string"
          },
          "published": {
            "type": "boolean"
          }
        },
        "required": [
          "round_id",
          "run_id",
          "track",
          "model_id",
          "target_date",
          "price_date"
        ]
      },
      "LivePerformanceHistoryResponse": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "track": {
            "type": "string",
            "enum": [
              "weekly",
              "monthly",
              "all"
            ]
          },
          "row_count": {
            "type": "integer"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InterimPerformanceRow"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "as_of",
          "track",
          "row_count",
          "data",
          "next_cursor"
        ]
      },
      "ProofRecord": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "round_id": {
            "type": "string"
          },
          "run_id": {
            "type": "string"
          },
          "track": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "hashes": {
            "type": "object"
          },
          "round_page_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          }
        },
        "required": [
          "round_id",
          "run_id"
        ]
      },
      "ProofListResponse": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "track": {
            "type": "string",
            "enum": [
              "weekly",
              "monthly",
              "all"
            ]
          },
          "status": {
            "type": "string"
          },
          "row_count": {
            "type": "integer"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProofRecord"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "as_of",
          "track",
          "status",
          "row_count",
          "data",
          "next_cursor"
        ]
      },
      "RoundProofResponse": {
        "type": "object",
        "properties": {
          "round_id": {
            "type": "string"
          },
          "run_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "proof": {
            "$ref": "#/components/schemas/ProofRecord"
          }
        },
        "required": [
          "round_id",
          "run_id",
          "proof"
        ]
      },
      "AssetListResponse": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "current_universe_round_id": {
            "type": "string"
          },
          "current_filter": {
            "type": "string",
            "enum": [
              "true",
              "false",
              "all"
            ]
          },
          "row_count": {
            "type": "integer"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Asset"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "as_of",
          "current_universe_round_id",
          "current_filter",
          "row_count",
          "data",
          "next_cursor"
        ]
      },
      "BenchmarkEvidenceResponse": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "version": {
            "type": "string"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "policy": {
            "type": "object"
          },
          "tracks": {
            "type": "object"
          }
        },
        "required": [
          "version",
          "tracks"
        ]
      },
      "MarketEnvironmentResponse": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "version": {
            "type": "string"
          },
          "engine_version": {
            "type": [
              "string",
              "null"
            ]
          },
          "generated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "data_as_of": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "thresholds": {
            "type": "object"
          },
          "tracks": {
            "type": "object"
          },
          "data": {
            "type": "object"
          }
        },
        "required": [
          "version",
          "status",
          "thresholds"
        ]
      },
      "ModelMarketEnvironmentResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MarketEnvironmentResponse"
          },
          {
            "type": "object",
            "properties": {
              "model_id": {
                "type": "string"
              },
              "model_name": {
                "type": "string"
              },
              "track": {
                "type": "string",
                "enum": [
                  "weekly",
                  "monthly",
                  "all"
                ]
              }
            },
            "required": [
              "model_id",
              "track",
              "tracks"
            ]
          }
        ]
      }
    }
  }
}
