---
title: "Create OpenAI"
method: POST
path: "/openai/create/{instance}"
tags: ["OpenIA Controller"]
---

# Create OpenAI

`POST /openai/create/{instance}`

Create an OpenAI bot with detailed configuration

## Path parameters

- `instance` string, required

## Request body

- object
  - `enabled` boolean, required — Indicates whether the bot is enabled
  - `openaiCredsId` string, required — ID of the OpenAI credentials
  - `botType` string, required — Type of the bot (e.g., 'assistant')
  - `assistantId` string, required — Unique identifier for the assistant
  - `functionUrl` string, required — URL for additional bot functionality
  - `model` string, required — Model to be used (e.g., 'gpt-4o')
  - `systemMessages` string[], required — Messages to define system behavior
  - `assistantMessages` string[], required — Predefined assistant messages
  - `userMessages` string[], required — Predefined user messages
  - `maxTokens` integer, required — Maximum number of tokens per interaction
  - `triggerType` string, required — Type of trigger for the bot
  - `triggerOperator` string, required — Operator for trigger evaluation
  - `triggerValue` string, required — Value to trigger the bot
  - `expire` integer, required — Expiration time in seconds
  - `keywordFinish` string, required — Keyword to terminate the bot interaction
  - `delayMessage` integer, required — Delay before the bot responds, in milliseconds
  - `unknownMessage` string, required — Message to display for unrecognized input
  - `listeningFromMe` boolean, required — Indicates if the bot listens to messages from the user
  - `stopBotFromMe` boolean, required — Indicates if the bot can be stopped by the user
  - `keepOpen` boolean, required — Indicates if the bot session remains open
  - `debounceTime` integer, required — Debounce time for message processing
  - `ignoreJids` string[], required — List of JIDs to ignore

## Response `200`

Ok

---

[API](https://skmtc.net/evolution-foundation/apis/evolution-api-2.md) · [All operations](https://skmtc.net/evolution-foundation/apis/evolution-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/evolution-foundation/evolution-api-2/revisions/153363ee7f38/schema)
