This documentation describes the integration of MindsDB with Minds Endpoint, a cloud service that simplifies the way developers interact with cutting-edge LLMs through a universal API and provides Minds, which are AI systems with built-in expertise designed to help AI agents accomplish tasks.


Before proceeding, ensure the following prerequisites are met:

  1. Install MindsDB locally via Docker or Docker Desktop.
  2. To use Minds Endpoint within MindsDB, install the required dependencies following this instruction.
  3. Obtain the Minds Endpoint API key required to deploy and use Minds Endpoint models within MindsDB. Follow the instructions for obtaining the API key.


Create an AI engine from the Minds Endpoint handler.

CREATE ML_ENGINE minds_endpoint_engine
FROM minds_endpoint
      minds_endpoint_api_key = 'api-key-value';

Create a model using minds_endpoint_engine as an engine.

CREATE MODEL minds_endpoint_model
PREDICT answer
      engine = 'minds_endpoint_engine',   -- engine name as created via CREATE ML_ENGINE
      model_name = 'model-name',              -- choose one of available models
      prompt_template = 'prompt-to-the-model' -- prompt message to be completed by the model


The following usage examples utilize minds_endpoint_engine to create a model with the CREATE MODEL statement.

Classify text sentiment using the Mistral 7B model.

CREATE MODEL minds_endpoint_model
PREDICT sentiment
   engine = 'minds_endpoint_engine',
   model_name = 'mistral-7b',
   prompt_template = 'Classify the sentiment of the following text as one of `positive`, `neutral` or `negative`: {{text}}';

Query the model to get predictions.

SELECT text, sentiment
FROM minds_endpoint_model
WHERE text = 'I love machine learning!';

Here is the output:

| text                     | sentiment |
| I love machine learning! | positive  |

Supported Models

For an overview of the models supported, visit the following docs. This list will help you quickly identify the right models for your needs.

Troubleshooting Guide

Authentication Error

  • Symptoms: Failure to authenticate to Minds Endpoint.
  • Checklist:
    1. Make sure that your Minds Endpoint account is active.
    2. Confirm that your API key is correct.
    3. Ensure that your API key has not been revoked.

SQL statement cannot be parsed by mindsdb_sql

  • Symptoms: SQL queries failing or not recognizing table and model names containing spaces or special characters.
  • Checklist:
    1. Ensure table names with spaces or special characters are enclosed in backticks. Examples:
      • Incorrect:
        SELECT input.text, output.sentiment
        FROM data AS input
        JOIN minds_endpoint_model AS output
      • Incorrect:
        SELECT input.text, output.sentiment
        FROM integration.'travel data' AS input
        JOIN minds_endpoint_model AS output
      • Correct:
        SELECT input.text, output.sentiment
        FROM integration.`travel data` AS input
        JOIN minds_endpoint_model AS output