Skip to main content

Drupal CMS

Using the mittwald AI provider for Drupal

The mittwald AI provider integration brings AI capabilities directly into your Drupal CMS. The module registers mittwald AI Hosting as a provider for the Drupal AI module, which makes mittwald's models available for chat, embeddings, reranking, speech-to-text and text-to-speech operations.

This guide covers installation and setup. For the module's individual settings and their defaults, refer to the Drupal project page.

Prerequisites

Before installing the module, make sure your environment meets these requirements:

  • Drupal 10.3 or later, or Drupal 11
  • The AI module (^1.3.0)
  • The Key module (^1.18)
  • A mittwald AI Hosting API key

If you don't have an API key yet, follow the mittwald AI Hosting access guide to generate one through your mStudio dashboard.

Installation

To get started with the mittwald AI provider, you'll need to install the module using Composer and enable it through Drush. This requires an active Drupal installation with Composer support.

Run the following commands in your Drupal project directory:

user@ssh $ composer require drupal/ai_provider_mittwald
user@ssh $ drush en ai_provider_mittwald

The first command downloads the mittwald AI provider module and its dependencies, while the second command enables the module in your Drupal installation. If you prefer, you can also enable the module through the Drupal admin interface under Extend.

Configuration

Once the module is installed, you'll need to configure it with your mittwald AI Hosting API key. The configuration process involves three main steps: setting up secure key storage, configuring the provider authentication, and selecting mittwald as your default AI provider.

Step 1: Store your API key securely

Navigate to Configuration -> System -> Keys (/admin/config/system/keys/add) in your Drupal admin interface. Click on Add key to create a new key entry. Give your key a descriptive name (such as "mittwald AI API Key"), pick an appropriate key type such as Authentication, and paste your mittwald AI Hosting API key into the key value field. This approach ensures your API credentials are stored securely and can be managed centrally.

Step 2: Configure provider authentication

Next, you'll connect the stored API key to the mittwald AI provider. Go to Configuration -> AI -> Providers -> mittwald Authentication (/admin/config/ai/providers/mittwald). In the mittwald API key dropdown field, select the key you created in the previous step. Save the configuration to establish the connection between your Drupal site and the mittwald AI services.

When you save, the module validates the API key against mittwald AI Hosting and checks your rate limits. If your account is on a tier with restricted quota, the module displays a warning at this point.

Step 3: Set mittwald as default provider

Finally, configure which AI capabilities should use the mittwald provider by default. Navigate to Configuration -> AI -> AI default settings. Here you can select mittwald as the default provider for the operation types it supports, among them:

  • Chat: Conversational AI interfaces, including advanced features like image vision and tool calling support. Chat also backs higher-level AI module features such as text translation and summarization.
  • Embeddings: Generate vector embeddings for semantic search and content recommendations
  • Speech-to-text: Transcribe audio files
  • Text-to-speech: Generate spoken audio from text
  • Rerank: Reorder search results to improve retrieval precision in RAG setups

By setting mittwald as the default provider, all AI-powered features in your Drupal installation will automatically use mittwald's AI models unless you specify otherwise for specific use cases.

Supported operations

The module exposes the following mittwald AI Hosting operations to the Drupal AI module:

OperationSupported
Chat completions
Embeddings
Reranking
Speech-to-text
Text-to-speech
Text-to-image⏸️ not offered by mittwald AI Hosting
Moderation⏸️ not offered by mittwald AI Hosting

For chat, the module offers the GPT-OSS, Ministral, Qwen3.5, Qwen3.6, Qwen3.8 and GLM-OCR model families. Support for image input and reasoning differs between them — see the available models documentation for the capabilities of each model, and the Drupal project page for the default model of each operation.

If you use dedicated AI Hosting or a proxy, you can point the module at a different endpoint by setting the host value in the ai_provider_mittwald.settings configuration.

Using vector databases

mittwald AI Hosting provides the embedding model, but not a managed vector database. To build semantic search or RAG features on top of the embeddings generated by Qwen3-Embedding-8B, combine the Drupal AI module's vector database providers with a vector database of your own.

You can run one directly in your mStudio project using container hosting; pgvector, Qdrant and ChromaDB are available as container templates. The GLM-OCR guide walks through a complete ingestion and retrieval pipeline using these components.

Usage limits

The mittwald AI Hosting service has usage limits based on your account tier. For details on rate limits and quotas, refer to the terms of use.