> ## 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 Huggingface Experiment Import

> Create a new experiment from a dataset and import into it (import-first UX).



## OpenAPI

````yaml /openapi.json post /v1/integrations/huggingface/imports
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/integrations/huggingface/imports:
    post:
      tags:
        - Hugging Face
      summary: Create Huggingface Experiment Import
      description: >-
        Create a new experiment from a dataset and import into it (import-first
        UX).
      operationId: >-
        create_huggingface_experiment_import_v1_integrations_huggingface_imports_post
      parameters:
        - 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/HuggingFaceCreateImportRequest'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HuggingFaceImportResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - BearerAuth: []
        - ApiKeyAuth: []
components:
  schemas:
    HuggingFaceCreateImportRequest:
      description: Create a NEW experiment from a dataset selection and import into it.
      properties:
        config_name:
          default: default
          minLength: 1
          title: Config Name
          type: string
        dataset_repo_id:
          minLength: 1
          title: Dataset Repo Id
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        experiment_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Experiment Id
        kind:
          default: simple
          enum:
            - simple
            - advanced
          title: Kind
          type: string
        mapping:
          anyOf:
            - $ref: '#/components/schemas/HuggingFaceImportMapping'
            - type: 'null'
        name:
          maxLength: 255
          minLength: 1
          title: Name
          type: string
        row_limit:
          default: 100
          exclusiveMinimum: 0
          title: Row Limit
          type: integer
        row_offset:
          default: 0
          minimum: 0
          title: Row Offset
          type: integer
        split_name:
          default: train
          minLength: 1
          title: Split Name
          type: string
        target_modality:
          anyOf:
            - enum:
                - text
                - image
                - audio
                - video
              type: string
            - type: 'null'
          title: Target Modality
      required:
        - dataset_repo_id
        - name
      title: HuggingFaceCreateImportRequest
      type: object
    HuggingFaceImportResponse:
      properties:
        candidate_modality:
          enum:
            - text
            - image
            - audio
            - video
          title: Candidate Modality
          type: string
        config_name:
          title: Config Name
          type: string
        created_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Created At
        dataset_repo_id:
          title: Dataset Repo Id
          type: string
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        experiment_id:
          format: uuid
          title: Experiment Id
          type: string
        failed_rows:
          default: 0
          title: Failed Rows
          type: integer
        id:
          format: uuid
          title: Id
          type: string
        reserved_rows:
          anyOf:
            - type: integer
            - type: 'null'
          title: Reserved Rows
        row_limit:
          title: Row Limit
          type: integer
        row_offset:
          title: Row Offset
          type: integer
        skipped_rows:
          default: 0
          title: Skipped Rows
          type: integer
        split_name:
          title: Split Name
          type: string
        status:
          title: Status
          type: string
        successful_rows:
          default: 0
          title: Successful Rows
          type: integer
        updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Updated At
      required:
        - id
        - experiment_id
        - dataset_repo_id
        - config_name
        - split_name
        - row_offset
        - row_limit
        - status
        - candidate_modality
      title: HuggingFaceImportResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    HuggingFaceImportMapping:
      properties:
        anchor:
          $ref: '#/components/schemas/HuggingFaceImportAnchorMapping'
        candidates:
          items:
            $ref: '#/components/schemas/HuggingFaceImportCandidateMapping'
          minItems: 2
          title: Candidates
          type: array
        metadata_columns:
          items:
            type: string
          title: Metadata Columns
          type: array
        mode:
          const: wide_benchmark
          default: wide_benchmark
          title: Mode
          type: string
        text_pair_patch:
          anyOf:
            - $ref: '#/components/schemas/HuggingFaceTextPairPatchMapping'
            - type: 'null'
      required:
        - anchor
        - candidates
      title: HuggingFaceImportMapping
      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
    HuggingFaceImportAnchorMapping:
      properties:
        column:
          minLength: 1
          title: Column
          type: string
        type:
          const: text
          title: Type
          type: string
      required:
        - type
        - column
      title: HuggingFaceImportAnchorMapping
      type: object
    HuggingFaceImportCandidateMapping:
      properties:
        candidate_key:
          maxLength: 128
          minLength: 1
          title: Candidate Key
          type: string
        candidate_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Candidate Label
        column:
          minLength: 1
          title: Column
          type: string
        type:
          enum:
            - text
            - image
            - audio
            - video
          title: Type
          type: string
      required:
        - type
        - column
        - candidate_key
      title: HuggingFaceImportCandidateMapping
      type: object
    HuggingFaceTextPairPatchMapping:
      properties:
        anchor_column:
          default: __derived_prompt
          minLength: 1
          title: Anchor Column
          type: string
        output_mode:
          default: suffix
          enum:
            - suffix
            - full
          title: Output Mode
          type: string
        source_columns:
          items:
            type: string
          maxItems: 2
          minItems: 2
          title: Source Columns
          type: array
        type:
          const: paired_text_common_prefix
          default: paired_text_common_prefix
          title: Type
          type: string
      required:
        - source_columns
      title: HuggingFaceTextPairPatchMapping
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: Supabase JWT
      scheme: bearer
      type: http
    ApiKeyAuth:
      in: header
      name: X-API-Key
      type: apiKey

````