> ## 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.

# Commit Ingestion Manifest

> Validate and commit ingestion payload atomically.



## OpenAPI

````yaml /openapi.json post /v1/experiments/{experiment_id}/ingestions/commit
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/{experiment_id}/ingestions/commit:
    post:
      tags:
        - Samples
      summary: Commit Ingestion Manifest
      description: Validate and commit ingestion payload atomically.
      operationId: >-
        commit_ingestion_manifest_v1_experiments__experiment_id__ingestions_commit_post
      parameters:
        - in: path
          name: experiment_id
          required: true
          schema:
            format: uuid
            title: Experiment Id
            type: string
        - 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/IngestionValidateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestionCommitResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - BearerAuth: []
        - ApiKeyAuth: []
components:
  schemas:
    IngestionValidateRequest:
      description: Validate manifest request.
      properties:
        add_to:
          const: experiment
          default: experiment
          title: Add To
          type: string
        idempotency_key:
          maxLength: 255
          minLength: 1
          title: Idempotency Key
          type: string
        mode:
          const: manifest
          default: manifest
          title: Mode
          type: string
        rows:
          items:
            $ref: '#/components/schemas/IngestionManifestRow'
          maxItems: 10000
          minItems: 1
          title: Rows
          type: array
      required:
        - idempotency_key
        - rows
      title: IngestionValidateRequest
      type: object
    IngestionCommitResponse:
      description: Commit response after ingestion processing.
      properties:
        created_anchors:
          title: Created Anchors
          type: integer
        created_candidates:
          title: Created Candidates
          type: integer
        created_sample_refs:
          items:
            $ref: '#/components/schemas/IngestionCreatedSampleRef'
          title: Created Sample Refs
          type: array
        created_samples:
          title: Created Samples
          type: integer
        ingestion_id:
          format: uuid
          title: Ingestion Id
          type: string
        readiness_state_after_commit:
          title: Readiness State After Commit
          type: string
        reused_samples:
          default: 0
          title: Reused Samples
          type: integer
        validation_report:
          $ref: '#/components/schemas/ValidationReport'
      required:
        - ingestion_id
        - created_anchors
        - created_candidates
        - created_samples
        - readiness_state_after_commit
        - validation_report
      title: IngestionCommitResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    IngestionManifestRow:
      description: Anchor row in the ingestion manifest.
      properties:
        anchor:
          $ref: '#/components/schemas/AnchorRef'
        experiment_ref:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Optional experiment reference (ID or name). Required for
            multi-experiment ingestion endpoints.
          title: Experiment Ref
        variants:
          items:
            $ref: '#/components/schemas/IngestionVariant'
          minItems: 2
          title: Variants
          type: array
      required:
        - anchor
        - variants
      title: IngestionManifestRow
      type: object
    IngestionCreatedSampleRef:
      properties:
        candidate_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Candidate Key
        id:
          format: uuid
          title: Id
          type: string
        source_manifest_row:
          title: Source Manifest Row
          type: integer
      required:
        - id
        - source_manifest_row
      title: IngestionCreatedSampleRef
      type: object
    ValidationReport:
      description: Validation result contract.
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ValidationIssue'
          title: Errors
          type: array
        total_rows:
          title: Total Rows
          type: integer
        valid_rows:
          title: Valid Rows
          type: integer
        warnings:
          items:
            $ref: '#/components/schemas/ValidationIssue'
          title: Warnings
          type: array
      required:
        - valid_rows
        - total_rows
        - errors
        - warnings
      title: ValidationReport
      type: object
    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
    AnchorRef:
      description: Inline anchor reference used by ingestion-compatible sample creation.
      properties:
        type:
          pattern: ^(text|image|audio|video)$
          title: Type
          type: string
        value:
          minLength: 1
          title: Value
          type: string
      required:
        - type
        - value
      title: AnchorRef
      type: object
    IngestionVariant:
      description: Candidate output for one anchor row.
      properties:
        asset:
          $ref: '#/components/schemas/IngestionAsset'
        candidate_key:
          maxLength: 128
          minLength: 1
          title: Candidate Key
          type: string
        candidate_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Candidate Label
        content_hash:
          anyOf:
            - maxLength: 128
              type: string
            - type: 'null'
          title: Content Hash
        is_exam_only:
          default: false
          title: Is Exam Only
          type: boolean
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        parameters:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Parameters
        source_sample_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Source Sample Id
      required:
        - candidate_key
        - asset
      title: IngestionVariant
      type: object
    ValidationIssue:
      description: Single validation issue.
      properties:
        code:
          title: Code
          type: string
        field:
          anyOf:
            - type: string
            - type: 'null'
          title: Field
        message:
          title: Message
          type: string
        row:
          anyOf:
            - type: integer
            - type: 'null'
          title: Row
      required:
        - code
        - message
      title: ValidationIssue
      type: object
    IngestionAsset:
      description: Single asset payload inside a manifest variant.
      properties:
        file_path:
          anyOf:
            - type: string
            - type: 'null'
          title: File Path
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        type:
          enum:
            - text
            - image
            - audio
            - video
          title: Type
          type: string
      required:
        - type
      title: IngestionAsset
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: Supabase JWT
      scheme: bearer
      type: http
    ApiKeyAuth:
      in: header
      name: X-API-Key
      type: apiKey

````