> ## Documentation Index
> Fetch the complete documentation index at: https://docs.softmax.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Run Power Analysis



## OpenAPI

````yaml https://softmax.com/api/observatory/openapi.json post /v2/divisions/{division_id}/power-analysis
openapi: 3.1.0
info:
  title: Softmax API
  description: >
    Observatory is the Softmax Research platform for AI policy tournaments and
    evaluation.

    Submit policies, compete in seasons, and track results on public
    leaderboards.


    ---


    ## Authentication


    Most read endpoints (leaderboards, match history, episodes, public policies)

    work without auth. Submitting policies or accessing your own data requires

    a Bearer token:


    ```

    Authorization: Bearer <your-token>

    ```


    To get a token, install [cogames](https://pypi.org/project/cogames/) and
    run:


    ```bash

    cogames auth login

    ```


    A `401` response means no token was provided. A `403` means the token

    is invalid or expired.


    ### Verify your token


    ```bash

    curl -H "Authorization: Bearer <your-token>" \
      https://softmax.com/api/observatory/whoami
    ```


    Returns `{"user_email": "you@example.com"}` on success.
  version: 1.0.0
servers:
  - url: https://softmax.com/api/observatory
security: []
paths:
  /v2/divisions/{division_id}/power-analysis:
    post:
      tags:
        - v2
      summary: Run Power Analysis
      operationId: run_power_analysis_v2_divisions__division_id__power_analysis_post
      parameters:
        - name: division_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^div_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            title: Division Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PowerAnalysisRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PowerAnalysisResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    PowerAnalysisRequest:
      properties:
        policy_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Policy Ref
        elo_grid:
          items:
            type: number
            exclusiveMinimum: 0
          type: array
          minItems: 1
          title: Elo Grid
        alpha:
          type: number
          maximum: 0.999999
          minimum: 0.000001
          title: Alpha
          default: 0.05
        power:
          type: number
          maximum: 0.999999
          minimum: 0.000001
          title: Power
          default: 0.8
        max_episodes:
          type: integer
          maximum: 5000
          minimum: 1
          title: Max Episodes
          default: 1000
      additionalProperties: false
      type: object
      title: PowerAnalysisRequest
    PowerAnalysisResponse:
      properties:
        division_id:
          type: string
          title: Division Id
        anchor:
          anyOf:
            - $ref: '#/components/schemas/PowerAnalysisAnchor'
            - type: 'null'
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
        window:
          $ref: '#/components/schemas/PowerAnalysisWindow'
        mode_mix:
          $ref: '#/components/schemas/PowerAnalysisModeMix'
        modes:
          additionalProperties:
            $ref: '#/components/schemas/PowerAnalysisMode'
          type: object
          title: Modes
        league_pooled:
          additionalProperties:
            $ref: '#/components/schemas/PowerAnalysisMode'
          type: object
          title: League Pooled
        table:
          items:
            $ref: '#/components/schemas/PowerAnalysisTableRow'
          type: array
          title: Table
      additionalProperties: false
      type: object
      required:
        - division_id
        - anchor
        - note
        - window
        - mode_mix
        - modes
        - league_pooled
        - table
      title: PowerAnalysisResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PowerAnalysisAnchor:
      properties:
        policy_ref:
          type: string
          title: Policy Ref
        policy_version_id:
          type: string
          format: uuid
          title: Policy Version Id
      additionalProperties: false
      type: object
      required:
        - policy_ref
        - policy_version_id
      title: PowerAnalysisAnchor
    PowerAnalysisWindow:
      properties:
        rounds:
          type: integer
          title: Rounds
        episodes_scanned:
          type: integer
          title: Episodes Scanned
        oldest_round_at:
          type: string
          format: date-time
          title: Oldest Round At
      additionalProperties: false
      type: object
      required:
        - rounds
        - episodes_scanned
        - oldest_round_at
      title: PowerAnalysisWindow
    PowerAnalysisModeMix:
      properties:
        fractions:
          additionalProperties:
            type: number
          type: object
          title: Fractions
        source:
          type: string
          enum:
            - campaign_board
            - history
          title: Source
      additionalProperties: false
      type: object
      required:
        - fractions
        - source
      title: PowerAnalysisModeMix
    PowerAnalysisMode:
      properties:
        episodes_used:
          type: integer
          title: Episodes Used
        ally_episodes_excluded:
          type: integer
          title: Ally Episodes Excluded
        episodes_dropped_unclean:
          type: integer
          title: Episodes Dropped Unclean
        wins:
          type: integer
          title: Wins
        ties_mutual_loss:
          type: integer
          title: Ties Mutual Loss
        ties_zero:
          type: integer
          title: Ties Zero
        losses:
          type: integer
          title: Losses
        operating_point:
          type: number
          title: Operating Point
        score_variance:
          type: number
          title: Score Variance
        pairs_detected:
          type: integer
          title: Pairs Detected
        pair_correlation:
          type: number
          title: Pair Correlation
        design_effect:
          type: number
          title: Design Effect
        aleatoric:
          anyOf:
            - $ref: '#/components/schemas/PowerAnalysisAleatoric'
            - type: 'null'
        flags:
          items:
            type: string
          type: array
          title: Flags
      additionalProperties: false
      type: object
      required:
        - episodes_used
        - ally_episodes_excluded
        - episodes_dropped_unclean
        - wins
        - ties_mutual_loss
        - ties_zero
        - losses
        - operating_point
        - score_variance
        - pairs_detected
        - pair_correlation
        - design_effect
        - flags
      title: PowerAnalysisMode
    PowerAnalysisTableRow:
      properties:
        elo:
          type: number
          title: Elo
        per_mode_n_per_arm:
          additionalProperties:
            anyOf:
              - type: integer
              - type: 'null'
          type: object
          title: Per Mode N Per Arm
        blended_n_per_arm:
          anyOf:
            - type: integer
            - type: 'null'
          title: Blended N Per Arm
        blended_n_range:
          anyOf:
            - prefixItems:
                - type: integer
                - type: integer
              type: array
              maxItems: 2
              minItems: 2
            - type: 'null'
          title: Blended N Range
        one_arm_n:
          anyOf:
            - type: integer
            - type: 'null'
          title: One Arm N
        anchor:
          type: string
          title: Anchor
      additionalProperties: false
      type: object
      required:
        - elo
        - per_mode_n_per_arm
        - blended_n_per_arm
        - blended_n_range
        - one_arm_n
        - anchor
      title: PowerAnalysisTableRow
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PowerAnalysisAleatoric:
      properties:
        noise_rmse:
          type: number
          title: Noise Rmse
        stability:
          type: number
          title: Stability
        profile_id:
          type: string
          format: uuid
          title: Profile Id
      additionalProperties: false
      type: object
      required:
        - noise_rmse
        - stability
        - profile_id
      title: PowerAnalysisAleatoric
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Bearer token issued by Softmax

````