Skip to content

Use Drupal AI with the Gateway

The amazee.ai AI Provider module connects Drupal's AI module ecosystem to the Gateway. Once installed, Drupal's AI-powered features — content generation, translation, moderation, chatbots, image alt text, and more — run through your regional endpoint, keeping your data in the region you choose.

The module provisions both an LLM endpoint and a managed vector database, so RAG-based features work out of the box without separate infrastructure setup.


Prerequisites

  • Drupal 10.4+ or Drupal 11
  • PHP with the pdo_pgsql extension (used for the managed vector database). Check with php -m | grep pdo_pgsql.
  • Drush (recommended for setup)
  • An email address you can receive a sign-in code at. If you don't have an account on my.amazee.io yet, one is created when you sign in from the module.

Composer pulls in the AI, Key and Search API modules for you.


Install

composer require drupal/ai_provider_amazeeio
drush en ai_provider_amazeeio

Configure

  1. Go to Configuration → AI → Provider Settings → amazee.ai Authentication (/admin/config/ai/providers/amazeeio)
  2. Enter your email address and click Sign in
  3. Check your inbox, enter the code, and click Validate
  4. Pick an existing key from the table and click Use selected key. Or enter a key name (defaults to your site's hostname), choose a region, and click Create new key

The module saves the LLM key, the vector database credentials, and a management token in the Key module (/admin/config/system/keys). You don't need to paste a key anywhere.

To make amazee.ai the default for chat, embeddings, and other operations, go to AI Settings (/admin/config/ai/settings) and pick it for each one.


Option: use the configuration recipe

For automated setup, the amazee.ai AI Provider Recipe configures the provider and its dependencies in one step:

composer require drupal/ai_provider_amazeeio_recipe
drush recipe ../recipes/ai_provider_amazeeio_recipe

The argument is the recipe's folder path, not its name. In a standard drupal/recommended-project layout, Composer puts it in recipes/ next to your web root. Adjust the path if your layout is different.

  • Run it with -y and no inputs to get a free trial account with a small budget. Good for trying things out.
  • For CI, pass your credentials as inputs, e.g. --input=ai_provider_amazeeio_recipe.llm_api_key=.... See the recipe README for the full list.
  • The recipe doesn't create the management token. Sign in once from the provider page if you need account features in the Drupal UI.

What you can do

With the provider active, any Drupal AI module that supports the AI module ecosystem works automatically. Common use cases:

Feature What it does
Content generation Draft page content, summaries, and metadata from inside the node editor
Translation Translate content into multiple languages via AI directly in the Drupal UI
Image alt text Auto-generate alt text on image upload
Pre-moderation Flag or approve content before publish
Chatbot / search Replace site search with a conversational assistant
Tone adjustment Rewrite content to match a formal, friendly, or promotional tone
Compliance checking Scan content for policy violations before publish
Auto-categorisation Apply tags and categories based on content
Accessibility auditing Identify missing headings, improper link text, and contrast issues
RAG / vector search Query a managed pgvector database provisioned with your account

For a broader view of what the Drupal AI ecosystem supports, see Workflows of AI and the Drupal AI module overview.


Data residency

Your data is processed in the region you select at my.amazee.io. Available regions:

Region Endpoint
🇪🇺 Europe llm.de-eu101.amazee.ai
🇬🇧 United Kingdom llm.uk103.amazee.ai
🇨🇭 Switzerland llm.ch103.amazee.ai
🇺🇸 United States llm.us103.amazee.ai
🇦🇺 Australia llm.au103.amazee.ai

Need a different region? Contact ai.support@amazee.io.


Troubleshooting

Not connected after signing in
Check that /admin/config/system/keys lists amazeeio_ai and amazeeio_ai_database. If they're missing, sign in again from /admin/config/ai/providers/amazeeio.
composer require fails with "ext-pdo_pgsql is missing"
Install or enable the PHP PostgreSQL PDO extension, then run the command again.
No models appear in the model selector
Clear Drupal's cache (drush cr) after saving the provider settings. The module fetches the available model list on first save.
Vector database not available
The managed pgvector instance is provisioned automatically when your account activates. If it doesn't appear, check my.amazee.io → Services or contact support.
Composer version conflict
The module requires drupal/ai as a dependency. If you have a conflicting version pinned in your composer.json, resolve that first with composer why-not drupal/ai_provider_amazeeio.

Resources