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

# Interaction Create

> Create an interaction.

This endpoint allows you to create an interaction with the specified data.

Parameters:
- data: Input data for the interaction.
- api_key: API key for authentication.

Returns:
- List of action results.

Raises:
- HTTPException(401): If the provided API key is invalid.



## OpenAPI

````yaml post /api/interaction/create
openapi: 3.1.0
info:
  title: Apigene
  description: Apigene API
  version: 1.0.0
  contact:
    name: Apigene Support
    url: https://app.apigene.ai
    email: support@apigene.ai
servers:
  - url: https://app.apigene.ai
security:
  - BearerAuth: []
paths:
  /api/interaction/create:
    post:
      tags:
        - Interaction
      summary: Interaction Create
      description: >-
        Create an interaction.


        This endpoint allows you to create an interaction with the specified
        data.


        Parameters:

        - data: Input data for the interaction.

        - api_key: API key for authentication.


        Returns:

        - List of action results.


        Raises:

        - HTTPException(401): If the provided API key is invalid.
      operationId: interaction_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InteractionInput'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ActionResult'
                type: array
                title: Response Interaction Create
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    InteractionInput:
      properties:
        api_name:
          type: string
          title: Api Name
          description: Name of the API.
        user_input:
          type: string
          title: User Input
          description: User input data.
        context:
          additionalProperties: true
          type: object
          title: Context
          description: >-
            Additional context parameters that may include relevant info for the
            LLM
        response_format:
          type: string
          title: Response Format
          description: >-
            Control the response format available option are raw /
            formatted_html / formatted_md / formatted_text
          default: raw
        execution_mode:
          $ref: '#/components/schemas/ExecutionMode'
          description: >-
            Controls how the request is executed: dry_run_execution (returns
            request without sending), apigene_execution (Apigene handles
            execution with stored credentials), customer_execution (request is
            forwarded to customer's webhook where the customer is responsible
            for executing it with their own credentials)
          default: apigene_execution
        customer_execution_context:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Customer Execution Context
          description: >-
            Customer-specific context data for correlation and tracking in
            customer execution mode
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
          description: >-
            Overide the default model that will be used for executing this
            interaction
      type: object
      required:
        - api_name
        - user_input
      title: InteractionInput
    ActionResult:
      properties:
        action_name:
          type: string
          title: Action Name
          description: Name of the action.
          default: N/A
        status_code:
          type: integer
          title: Status Code
          description: The status code of the response.
          default: 555
        raw_data:
          anyOf:
            - {}
            - type: 'null'
          title: Raw Data
          description: Content of the request to relevant service.
        response_content:
          anyOf:
            - {}
            - type: 'null'
          title: Response Content
          description: Content of the response.
        context:
          anyOf:
            - {}
            - type: 'null'
          title: Context
          description: Addtional context information that is passed to the action
      type: object
      title: ActionResult
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ExecutionMode:
      type: string
      enum:
        - dry_run_execution
        - apigene_execution
        - customer_execution
      title: ExecutionMode
    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:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        'Authorization: Bearer {token}'

````