> ## Documentation Index
> Fetch the complete documentation index at: https://docs.portkey.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# MindsDB

> Integrate MindsDB with Prisma AIRS AI Gateway for production-grade AI pipelines

MindsDB connects data sources and LLMs for AI automation. The AI Gateway adds:

* **3,000+ LLMs** — Access any provider through MindsDB
* **Observability** — Track costs, latency, and usage
* **Reliability** — Caching, routing, guardrails via [Configs](https://docs.portkey.ai/docs/aigw/product/ai-gateway/configs.md)

## Prerequisites

1. Install MindsDB via [Docker](https://docs.mindsdb.com/setup/self-hosted/docker) or [Docker Desktop](https://docs.mindsdb.com/setup/self-hosted/docker-desktop)
2. Install the AI Gateway dependencies per [MindsDB instructions](https://docs.mindsdb.com/setup/self-hosted/docker#install-dependencies)
3. Get your [AI Gateway API key](https://stratacloudmanager.paloaltonetworks.com/)

## Setup

**1. Create AI Engine**

```sql Using Config ID theme={"system"}
CREATE ML_ENGINE portkey_engine
FROM portkey
USING
    portkey_api_key = 'PORTKEY_API_KEY',
    config = 'pc-your-config-id';
```

```sql Using Provider Slug theme={"system"}
CREATE ML_ENGINE portkey_engine
FROM portkey
USING
    portkey_api_key = 'PORTKEY_API_KEY',
    provider = '@openai-prod';
```

> [!NOTE]
>
> Use [Configs](https://docs.portkey.ai/docs/aigw/product/ai-gateway/configs.md) to add guardrails, caching, conditional routing, and more.

**2. Create Model**

```sql theme={"system"}
CREATE MODEL portkey_model
PREDICT answer
USING
    engine = 'portkey_engine',
    temperature = 0.2;
```

**3. Query**

```sql theme={"system"}
SELECT question, answer
FROM portkey_model
WHERE question = 'Where is Stockholm located?';
```

Output:

```
+-----------------------------+--------------------------------------------------------------------------------+
| question                    | answer                                                                         |
+-----------------------------+--------------------------------------------------------------------------------+
| Where is Stockholm located? | Stockholm is the capital of Sweden, located on the south-central east coast... |
+-----------------------------+--------------------------------------------------------------------------------+
```

## Next Steps

> **[MindsDB Use Cases](https://docs.mindsdb.com/use-cases/overview)**
>
> Explore MindsDB examples

> **[AI Gateway Configs](https://docs.portkey.ai/docs/aigw/product/ai-gateway/configs.md)**
>
> Add routing, caching, guardrails


## Related topics

- [Overview](https://docs.portkey.ai/docs/aigw/integrations/overview.md)
- [Load Balancing](https://docs.portkey.ai/docs/aigw/product/ai-gateway/load-balancing.md)
- [Connect to Internal Services](https://docs.portkey.ai/docs/aigw/self-hosting/private-network-access.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.