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

# Settigns config OpenAI

> Set settings for an OpenAI bot instance.



## OpenAPI

````yaml openapi-v2 POST /openai/settings/{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/settings/{instance}:
    post:
      tags:
        - OpenAI Controller
      summary: Set OpenAI Bot Settings
      description: Set settings for an OpenAI bot instance.
      operationId: setOpenAISettings
      parameters:
        - name: instance
          in: path
          required: true
          description: Name of the instance
          schema:
            type: string
      requestBody:
        description: Configuration for updating the OpenAI bot settings
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                openaiCredsId:
                  type: string
                  description: The OpenAI credentials ID
                expire:
                  type: integer
                  description: Expiration time in seconds
                keywordFinish:
                  type: string
                  description: Keyword to finish the interaction
                delayMessage:
                  type: integer
                  description: Delay time for the message in milliseconds
                unknownMessage:
                  type: string
                  description: Message when the input is not recognized
                listeningFromMe:
                  type: boolean
                  description: Indicates if the bot is listening for commands from the user
                stopBotFromMe:
                  type: boolean
                  description: Indicates if the bot should stop upon user command
                keepOpen:
                  type: boolean
                  description: Indicates if the bot session should remain open
                debounceTime:
                  type: integer
                  description: >-
                    Time in milliseconds to wait before processing the next
                    input
                ignoreJids:
                  type: array
                  items:
                    type: string
                  description: List of JIDs (Jabber IDs) to ignore
                openaiIdFallback:
                  type: string
                  description: Fallback OpenAI credentials ID if the main one fails
              required:
                - openaiCredsId
                - expire
                - keywordFinish
                - delayMessage
                - unknownMessage
                - listeningFromMe
                - stopBotFromMe
                - keepOpen
                - debounceTime
                - ignoreJids
                - openaiIdFallback
      responses:
        '200':
          description: Successfully updated OpenAI bot settings
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates if the update was successful
                  message:
                    type: string
                    description: Details about the operation
        '400':
          description: Bad Request - Invalid input parameters
        '500':
          description: Internal Server Error
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apikey
      description: Your authorization key header

````