Skip to main content

Bring Your Own Model - Custom REST AI Model in ConvyAI

Overview​

Bring your own Model lets you integrate any Generative AI engine that exposes a REST HTTP API. Use this option when your organization operates a self-hosted model, a proprietary AI service, or any LLM not natively supported by ConvyAI.

Prerequisites​

  • An accessible HTTP REST endpoint that accepts inference requests and returns a response.
  • Authentication credentials for the endpoint (if required).

Create a custom AI Model​

Navigate to Generative AI → AI Models and click New Model → Bring your own Model.

Request configuration​

Configure how ConvyAI calls your endpoint:

FieldDescription
NameA unique name to identify this AI Model.
HTTP URLThe full URL of the endpoint that will receive inference requests.
HTTP methodThe HTTP method to use (POST, GET, etc.).
Variables encodingHow the request body is encoded. Defaults to JSON.

By default, ConvyAI sends a JSON payload containing:

  • User input - the text sent by the user
  • Knowledge Base node attributes - tone of voice, additional commands, additional context, index, and configured intents
  • Entities - all entities configured in the AI Model
  • Intent threshold - the minimum recognition score configured in the AI Model
  • Additional parameters - any extra parameters configured in the AI Model

You can also add HTTP headers and additional parameters to the request. All these fields support variable substitution using the standard %variable% notation, allowing you to inject ConvyAI bot variables into each field.

Custom response fields​

Use the Custom Response Fields section to tell ConvyAI how to read the response returned by your engine. By default, each value is read from a field with the same name - for example, the intent is read from the intent field of the response.

To customize this, specify the JSON path of the field for each response value. For example, if your engine returns:

{
"response": {
"intent": "myIntent"
}
}

Configure the intent response field as:

response.intent

Intents, entities, and testing​

Configuring intents and entities and testing the model are features shared across all AI Model providers. See Intents, Entities & Testing for full documentation.