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

# Init Experiment

> Initialize experiment endpoint.

Args:
    user (User): User authenticated with api key.
    data (ExperimentSubmitModel): New experiment data.

Returns:
    ExperimentModel: Information about the experiment.



## OpenAPI

````yaml https://api.haiqu.ai/openapi.json post /experiments/init
openapi: 3.1.0
info:
  title: Haiqu API
  summary: Haiqu RESTful API service.
  description: Cloud service providing the access to Haiqu cloud runtime
  contact:
    name: Haiqu Inc.
    url: https://haiqu.ai/
    email: info@haiqu.ai
  version: 1.3.0
servers: []
security: []
paths:
  /experiments/init:
    post:
      summary: Init Experiment
      description: |-
        Initialize experiment endpoint.

        Args:
            user (User): User authenticated with api key.
            data (ExperimentSubmitModel): New experiment data.

        Returns:
            ExperimentModel: Information about the experiment.
      operationId: init_experiment_experiments_init_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExperimentSubmitModel'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExperimentModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyQuery: []
        - APIKeyHeader: []
components:
  schemas:
    ExperimentSubmitModel:
      properties:
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          default: ''
        tags:
          anyOf:
            - type: string
            - type: 'null'
          title: Tags
          default: ''
        metrics:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metrics
          default: {}
      type: object
      required:
        - name
      title: ExperimentSubmitModel
      description: Experiment submit payload data model.
    ExperimentModel:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        creation_date:
          type: string
          format: date-time
          title: Creation Date
        tags:
          anyOf:
            - type: string
            - type: 'null'
          title: Tags
          default: ''
        circuits_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Circuits Count
          default: 0
        jobs_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Jobs Count
          default: 0
        last_action_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Action Date
        user_id:
          type: integer
          title: User Id
        user:
          $ref: '#/components/schemas/UserModel'
        metrics:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metrics
          default: {}
      type: object
      required:
        - id
        - name
        - description
        - creation_date
        - user_id
        - user
      title: ExperimentModel
      description: |-
        Experiment model.

        Haiqu experiment is a parent/organizer entity for circuits and jobs.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    UserModel:
      properties:
        email:
          type: string
          title: Email
        username:
          type: string
          title: Username
        first_name:
          type: string
          title: First Name
        last_name:
          type: string
          title: Last Name
        api_access_key:
          type: string
          title: Api Access Key
      type: object
      required:
        - email
        - username
        - first_name
        - last_name
        - api_access_key
      title: UserModel
      description: |-
        User model.

        MVP: Haiqu user is created by Haiqu team, auth with username/password.
        V2: Haiqu API user is OAuth authenticated user from IBM, Google, etc.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyQuery:
      type: apiKey
      in: query
      name: HAIQU_API_KEY
    APIKeyHeader:
      type: apiKey
      in: header
      name: authorization

````