> ## Documentation Index
> Fetch the complete documentation index at: https://doc.evolution-api.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create OpenIA Bot

> Create an OpenAI bot with detailed configuration



## OpenAPI

````yaml openapi-v2 POST /openai/create/{instance}
openapi: 3.0.3
info:
  title: Evolution API
  version: 2.1.1
servers:
  - url: https://{server-url}
    variables:
      server-url:
        default: evolution-example
        description: The URL of your EvolutionAPI server
    description: Your instance domain
security: []
paths:
  /openai/create/{instance}:
    post:
      tags:
        - OpenIA Controller
      summary: Create OpenAI
      description: Create an OpenAI bot with detailed configuration
      operationId: createBotOpenAI
      parameters:
        - name: instance
          in: path
          required: true
          description: Name of the instance
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - enabled
                - openaiCredsId
                - botType
                - assistantId
                - functionUrl
                - model
                - systemMessages
                - assistantMessages
                - userMessages
                - maxTokens
                - triggerType
                - triggerOperator
                - triggerValue
                - expire
                - keywordFinish
                - delayMessage
                - unknownMessage
                - listeningFromMe
                - stopBotFromMe
                - keepOpen
                - debounceTime
                - ignoreJids
              properties:
                enabled:
                  type: boolean
                  description: Indicates whether the bot is enabled
                openaiCredsId:
                  type: string
                  description: ID of the OpenAI credentials
                botType:
                  type: string
                  description: Type of the bot (e.g., 'assistant')
                assistantId:
                  type: string
                  description: Unique identifier for the assistant
                functionUrl:
                  type: string
                  description: URL for additional bot functionality
                model:
                  type: string
                  description: Model to be used (e.g., 'gpt-4o')
                systemMessages:
                  type: array
                  items:
                    type: string
                  description: Messages to define system behavior
                assistantMessages:
                  type: array
                  items:
                    type: string
                  description: Predefined assistant messages
                userMessages:
                  type: array
                  items:
                    type: string
                  description: Predefined user messages
                maxTokens:
                  type: integer
                  description: Maximum number of tokens per interaction
                triggerType:
                  type: string
                  description: Type of trigger for the bot
                triggerOperator:
                  type: string
                  description: Operator for trigger evaluation
                triggerValue:
                  type: string
                  description: Value to trigger the bot
                expire:
                  type: integer
                  description: Expiration time in seconds
                keywordFinish:
                  type: string
                  description: Keyword to terminate the bot interaction
                delayMessage:
                  type: integer
                  description: Delay before the bot responds, in milliseconds
                unknownMessage:
                  type: string
                  description: Message to display for unrecognized input
                listeningFromMe:
                  type: boolean
                  description: Indicates if the bot listens to messages from the user
                stopBotFromMe:
                  type: boolean
                  description: Indicates if the bot can be stopped by the user
                keepOpen:
                  type: boolean
                  description: Indicates if the bot session remains open
                debounceTime:
                  type: integer
                  description: Debounce time for message processing
                ignoreJids:
                  type: array
                  items:
                    type: string
                  description: List of JIDs to ignore
      responses:
        '200':
          description: Ok
          content: {}
      deprecated: false
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apikey
      description: Your authorization key header

````