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

# Create Experiment

> Create a new experiment.



## OpenAPI

````yaml /openapi.json post /v1/experiments
openapi: 3.1.0
info:
  description: Customer-owned evaluation lifecycle API.
  title: HeyBee Public API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.heybee.app
security: []
paths:
  /v1/experiments:
    post:
      tags:
        - Experiments
      summary: Create Experiment
      description: Create a new experiment.
      operationId: create_experiment_v1_experiments_post
      parameters:
        - in: header
          name: Idempotency-Key
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Idempotency-Key
        - in: header
          name: authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - in: header
          name: X-API-Key
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExperimentCreate'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExperimentResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - BearerAuth: []
        - ApiKeyAuth: []
components:
  schemas:
    ExperimentCreate:
      description: Request to create a new experiment.
      example:
        anchor_field: prompt
        description: Comparing different TTS models on the same prompts
        name: TTS Voice Comparison
        parameter_schema:
          - name: temperature
            required: true
            type: continuous
          - name: checkpoint
            required: true
            type: categorical
            values:
              - ft_v1
              - ft_v2
        type: audio
      properties:
        allow_playback_speed:
          default: false
          title: Allow Playback Speed
          type: boolean
        allow_public_voting:
          default: false
          title: Allow Public Voting
          type: boolean
        anchor_definition:
          anyOf:
            - $ref: '#/components/schemas/AnchorDefinition'
            - type: 'null'
          description: Structured anchor definition (new API path)
        anchor_field:
          anyOf:
            - maxLength: 64
              minLength: 1
              type: string
            - type: 'null'
          description: Field name used to group samples for comparison
          title: Anchor Field
        axes:
          anyOf:
            - items:
                $ref: '#/components/schemas/AxisDefinition'
              type: array
            - type: 'null'
          description: >-
            Voting criteria (per-axis). Omit/empty for a single default axis
            (today's behavior).
          title: Axes
        comparison_policy:
          anyOf:
            - $ref: '#/components/schemas/ComparisonPolicy'
            - type: 'null'
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        enforce_playback:
          default: false
          title: Enforce Playback
          type: boolean
        is_discoverable:
          default: false
          title: Is Discoverable
          type: boolean
        is_public_readable:
          default: false
          title: Is Public Readable
          type: boolean
        kind:
          $ref: '#/components/schemas/ExperimentKind'
          default: simple
          description: simple | advanced
        min_playback_percent:
          default: 0
          maximum: 100
          minimum: 0
          title: Min Playback Percent
          type: integer
        min_viewing_seconds:
          default: 0
          minimum: 0
          title: Min Viewing Seconds
          type: integer
        name:
          maxLength: 255
          minLength: 1
          title: Name
          type: string
        objective:
          anyOf:
            - $ref: '#/components/schemas/ExperimentObjective'
            - type: 'null'
          description: benchmark | optimization | rlhf_loop
        parameter_schema:
          anyOf:
            - items:
                $ref: '#/components/schemas/ParameterDefinition'
              type: array
            - type: 'null'
          description: Schema defining the parameters for samples (JSON array)
          title: Parameter Schema
        require_feedback:
          default: false
          title: Require Feedback
          type: boolean
        requires_anchor:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Requires Anchor
        rlhf_policy:
          anyOf:
            - $ref: '#/components/schemas/RlhfPolicy'
            - type: 'null'
        team_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Team Id
        type:
          $ref: '#/components/schemas/ExperimentType'
      required:
        - name
        - type
      title: ExperimentCreate
      type: object
    ExperimentResponse:
      description: Experiment response.
      properties:
        access_role:
          $ref: '#/components/schemas/ExperimentAccessRole'
          default: owner
        access_scope:
          $ref: '#/components/schemas/ExperimentAccessScope'
          default: personal
        allow_playback_speed:
          default: false
          title: Allow Playback Speed
          type: boolean
        allow_public_voting:
          default: false
          title: Allow Public Voting
          type: boolean
        anchor_field:
          anyOf:
            - type: string
            - type: 'null'
          title: Anchor Field
        axes:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Axes
        budget_cap_credits:
          anyOf:
            - type: integer
            - type: 'null'
          title: Budget Cap Credits
        budget_remaining_credits:
          anyOf:
            - type: integer
            - type: 'null'
          title: Budget Remaining Credits
        budget_spent_credits:
          default: 0
          title: Budget Spent Credits
          type: integer
        can_manage_experiment:
          default: false
          title: Can Manage Experiment
          type: boolean
        can_run_experiment:
          default: false
          title: Can Run Experiment
          type: boolean
        can_view_analysis:
          default: false
          title: Can View Analysis
          type: boolean
        can_view_api:
          default: false
          title: Can View Api
          type: boolean
        can_view_votes:
          default: false
          title: Can View Votes
          type: boolean
        comparison_policy:
          additionalProperties: true
          title: Comparison Policy
          type: object
        confidence_score:
          anyOf:
            - type: number
            - type: 'null'
          default: 0
          title: Confidence Score
        created_at:
          format: date-time
          title: Created At
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        enforce_playback:
          default: false
          title: Enforce Playback
          type: boolean
        id:
          format: uuid
          title: Id
          type: string
        is_active:
          title: Is Active
          type: boolean
        is_discoverable:
          default: false
          title: Is Discoverable
          type: boolean
        is_public_readable:
          default: false
          title: Is Public Readable
          type: boolean
        kind:
          $ref: '#/components/schemas/ExperimentKind'
        min_playback_percent:
          default: 0
          title: Min Playback Percent
          type: integer
        min_viewing_seconds:
          default: 0
          title: Min Viewing Seconds
          type: integer
        name:
          title: Name
          type: string
        objective:
          $ref: '#/components/schemas/ExperimentObjective'
        parameter_schema:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Parameter Schema
        policy_version:
          default: v1
          title: Policy Version
          type: string
        purchased_comparisons:
          default: 0
          title: Purchased Comparisons
          type: integer
        readiness_errors:
          items:
            additionalProperties: true
            type: object
          title: Readiness Errors
          type: array
        readiness_state:
          $ref: '#/components/schemas/ReadinessState'
          default: ready
        remaining_comparisons:
          default: 0
          title: Remaining Comparisons
          type: integer
        require_feedback:
          default: false
          title: Require Feedback
          type: boolean
        requires_anchor:
          default: true
          title: Requires Anchor
          type: boolean
        rlhf_policy:
          anyOf:
            - $ref: '#/components/schemas/RlhfPolicy'
            - type: 'null'
        sample_count:
          anyOf:
            - type: integer
            - type: 'null'
          default: 0
          title: Sample Count
        score_count:
          default: 0
          title: Score Count
          type: integer
        servable_pair_count:
          anyOf:
            - type: integer
            - type: 'null'
          default: 0
          title: Servable Pair Count
        status:
          $ref: '#/components/schemas/ExperimentStatus'
          default: paused
        team_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Team Id
        team_member_count:
          default: 0
          title: Team Member Count
          type: integer
        team_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Team Name
        total_votes:
          anyOf:
            - type: integer
            - type: 'null'
          default: 0
          title: Total Votes
        type:
          $ref: '#/components/schemas/ExperimentType'
        updated_at:
          format: date-time
          title: Updated At
          type: string
        used_comparisons:
          default: 0
          title: Used Comparisons
          type: integer
        user_id:
          format: uuid
          title: User Id
          type: string
        vote_cost_credits:
          default: 1
          title: Vote Cost Credits
          type: integer
      required:
        - id
        - user_id
        - team_id
        - name
        - description
        - kind
        - objective
        - type
        - anchor_field
        - parameter_schema
        - comparison_policy
        - is_active
        - created_at
        - updated_at
      title: ExperimentResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    AnchorDefinition:
      description: Optional anchor metadata supplied at experiment creation.
      properties:
        name:
          maxLength: 64
          minLength: 1
          title: Name
          type: string
        type:
          $ref: '#/components/schemas/ExperimentType'
      required:
        - name
        - type
      title: AnchorDefinition
      type: object
    AxisDefinition:
      description: A named voting criterion (axis). Lives immutably on the experiment.
      properties:
        axis_key:
          description: Stable slug id for the criterion.
          maxLength: 64
          minLength: 1
          pattern: ^[a-zA-Z0-9_-]+$
          title: Axis Key
          type: string
        description:
          anyOf:
            - maxLength: 280
              type: string
            - type: 'null'
          description: One-line guidance shown to voters.
          title: Description
        label:
          description: Display name shown to voters.
          maxLength: 128
          minLength: 1
          title: Label
          type: string
        parameter_groups:
          description: Parameter groups this axis primes (cares about).
          items:
            type: string
          title: Parameter Groups
          type: array
        scale:
          anyOf:
            - $ref: '#/components/schemas/AxisScale'
            - type: 'null'
          description: >-
            Optional numeric scale. When present the axis is scored on an
            absolute slider (numeric response type) instead of pairwise A/B
            outcomes. Omit for today's A/B behavior.
        weight:
          default: 1
          description: Relative weight in the combined recommended config.
          minimum: 0
          title: Weight
          type: number
      required:
        - axis_key
        - label
      title: AxisDefinition
      type: object
    ComparisonPolicy:
      description: Pairing policy contract for objective-specific serving rules.
      properties:
        coverage_strategy:
          default: balanced_edges
          title: Coverage Strategy
          type: string
        pairing_scope:
          default: cross_candidate_all
          title: Pairing Scope
          type: string
        require_distinct_candidates:
          default: true
          title: Require Distinct Candidates
          type: boolean
        require_same_anchor:
          default: true
          title: Require Same Anchor
          type: boolean
      title: ComparisonPolicy
      type: object
    ExperimentKind:
      description: Kinds of experiments (extensible).
      enum:
        - simple
        - advanced
      title: ExperimentKind
      type: string
    ExperimentObjective:
      description: User-facing objective for experiment behavior.
      enum:
        - benchmark
        - optimization
        - rlhf_loop
      title: ExperimentObjective
      type: string
    ParameterDefinition:
      description: Definition of a single parameter in the schema.
      properties:
        group:
          anyOf:
            - maxLength: 64
              type: string
            - type: 'null'
          description: >-
            Optional parameter group slug (e.g. 'high_expert'). Axes prime by
            group; one param maps to one group.
          title: Group
        max_value:
          anyOf:
            - type: number
            - type: 'null'
          description: Optional max bound for continuous parameters
          title: Max Value
        min_value:
          anyOf:
            - type: number
            - type: 'null'
          description: Optional min bound for continuous parameters
          title: Min Value
        name:
          maxLength: 64
          minLength: 1
          title: Name
          type: string
        required:
          default: true
          title: Required
          type: boolean
        type:
          $ref: '#/components/schemas/ParameterType'
          description: continuous | categorical
        values:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            For categorical parameters: list of possible values (optional but
            recommended)
          title: Values
      required:
        - name
        - type
      title: ParameterDefinition
      type: object
    RlhfPolicy:
      additionalProperties: false
      properties:
        baseline_prior:
          $ref: '#/components/schemas/RlhfBaselinePriorPolicy'
        budget_cap_credits:
          anyOf:
            - minimum: 0
              type: integer
            - type: 'null'
          title: Budget Cap Credits
        collection_mode:
          default: pairwise
          enum:
            - pairwise
            - numeric
            - multi_axis
          title: Collection Mode
          type: string
        hidden_exam:
          $ref: '#/components/schemas/RlhfHiddenExamPolicy'
        participant_notes:
          anyOf:
            - maxLength: 4000
              type: string
            - type: 'null'
          title: Participant Notes
        queue:
          $ref: '#/components/schemas/RlhfQueuePolicy'
        round:
          $ref: '#/components/schemas/RlhfRoundPolicy'
        version:
          const: 1
          default: 1
          title: Version
          type: integer
      title: RlhfPolicy
      type: object
    ExperimentType:
      description: Types of experiments.
      enum:
        - image
        - audio
        - text
        - video
      title: ExperimentType
      type: string
    ExperimentAccessRole:
      enum:
        - owner
        - manager
        - collaborator
        - voter
      title: ExperimentAccessRole
      type: string
    ExperimentAccessScope:
      enum:
        - personal
        - team
      title: ExperimentAccessScope
      type: string
    ReadinessState:
      description: Readiness state for serving pairs.
      enum:
        - draft
        - ready
        - invalid
        - blocked
      title: ReadinessState
      type: string
    ExperimentStatus:
      description: Lifecycle state for experiment operations.
      enum:
        - draft
        - active
        - paused
        - completed
        - archived
      title: ExperimentStatus
      type: string
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    AxisScale:
      description: >-
        Numeric response scale for an axis. Presence flips the axis from A/B
        pairwise

        outcome to absolute per-clip scoring. Purely additive: axes with no
        scale keep

        today's A/B behavior byte-for-byte.
      properties:
        max:
          description: Highest score value on the slider.
          title: Max
          type: number
        min:
          description: Lowest score value on the slider.
          title: Min
          type: number
        step:
          default: 1
          description: Slider granularity; must be > 0.
          exclusiveMinimum: 0
          title: Step
          type: number
      required:
        - min
        - max
      title: AxisScale
      type: object
    ParameterType:
      description: |-
        Types of parameters in the schema.

        The controller's analysis stack currently treats:
        - continuous as numeric (float/int)
        - categorical as discrete labels (strings / enums)
      enum:
        - continuous
        - categorical
      title: ParameterType
      type: string
    RlhfBaselinePriorPolicy:
      additionalProperties: false
      properties:
        enabled:
          default: false
          title: Enabled
          type: boolean
        strength:
          anyOf:
            - maximum: 1000
              minimum: 1
              type: integer
            - type: 'null'
          title: Strength
      title: RlhfBaselinePriorPolicy
      type: object
    RlhfHiddenExamPolicy:
      additionalProperties: false
      properties:
        enabled:
          default: false
          title: Enabled
          type: boolean
        frequency:
          default: 0
          maximum: 1
          minimum: 0
          title: Frequency
          type: number
      title: RlhfHiddenExamPolicy
      type: object
    RlhfQueuePolicy:
      additionalProperties: false
      properties:
        max_concurrent_assignments:
          default: 1
          maximum: 1000
          minimum: 1
          title: Max Concurrent Assignments
          type: integer
        strategy:
          default: balanced
          enum:
            - balanced
            - uncertainty
            - manual
          title: Strategy
          type: string
      title: RlhfQueuePolicy
      type: object
    RlhfRoundPolicy:
      additionalProperties: false
      properties:
        max_rounds:
          anyOf:
            - maximum: 10000
              minimum: 1
              type: integer
            - type: 'null'
          title: Max Rounds
        min_decisive_pairs_per_axis:
          default: 50
          maximum: 1000000
          minimum: 1
          title: Min Decisive Pairs Per Axis
          type: integer
      title: RlhfRoundPolicy
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: Supabase JWT
      scheme: bearer
      type: http
    ApiKeyAuth:
      in: header
      name: X-API-Key
      type: apiKey

````