dotAI
dotAI integrates powerful AI tools into your dotCMS instance, allowing new horizons of automation — content and image generation, semantic searches, and more. Through workflows, dotAI is capable of performing batch operations — such as adding images to any content that's missing an image, or automatically generating SEO metadata to large swaths of content, adding content tags, and numerous other tasks.
dotAI supports multiple AI service providers — OpenAI, Azure OpenAI, Google Vertex AI (Gemini), Amazon Bedrock, Google AI (Gemini API), Anthropic (Claude), and OpenRouter — configured in Settings > Apps > dotAI. On dotCMS 24.04.05 and later, the feature is included by default. On earlier versions, it must be enabled manually or activated via the dotAI plugin.
Requirements#
This feature requires the following:
- Credentials for your chosen AI provider (see App Configuration for provider-specific requirements);
- Postgres 18 with the pgvector extension installed.
- If you're on dotCMS Cloud, we'll handle it!
- For self-hosted customers, see below.
Self-Hosted#
For embeddings to function, a vector extension must be added to the Postgres database. The dotAI plugin will add this extension automatically, but this process requires dotCMS's database user has superuser privileges, ensuring extensions can be installed.
If the database user does not have sufficient rights, it may be necessary for IT or administrators to manually add the extension. The simplest implementation is via the pgvector/pgvector Docker tag, easily accessible via the command docker pull pgvector/pgvector. The image can be applied to a docker-compose.yml by adding it to the database section:
db:
image: pgvector/pgvectorNote also that these privileges are only required for the extension's installation, and not for its subsequent use.
App Configuration#
dotAI is configured at Settings > Apps > dotAI via the dotAI Configuration screen. It provides a structured form for each AI capability — Chat, Embeddings, and Image Generation — plus a Settings section for prompts and behavioral defaults. Each capability can be enabled or disabled independently, and each can use a different provider, so you can mix providers freely.
Configuration Interface#
The configuration screen presents four cards stacked vertically. Click Save Configuration (pinned to the bottom right) to apply changes. To configure a specific site rather than the default, select it from the site picker in the top-right corner before saving.
Capability Cards#
The Chat, Embeddings, and Image Generation cards each follow the same layout:
-
Enable/disable toggle (top right of the card) — enables or disables that capability entirely, independently of the others.
-
Provider tile grid — one tile per supported provider, showing which capabilities that provider offers. Providers that don't support the card's capability are greyed out and labeled "No X support." Click a tile to select it; the required and optional fields below update to match that provider.
-
Required fields — shown above the Advanced panel, marked with a red asterisk. Which fields appear depends on the selected provider (see table below). Api key and Secret access key values are masked after saving and must be re-entered to change.
-
Advanced N optional field(s) — a collapsible panel revealing additional provider-specific fields. The count in the label reflects the number of optional fields for the selected provider. The Embeddings and Image Generation cards omit Max tokens from this panel; all other advanced fields are the same as for Chat.
-
Additional properties — at the bottom of the Advanced panel, a + Add Property button lets you add freeform key-value pairs for provider-specific fields not yet modeled in the form.
-
Test Connection — sends a live request to the configured provider and reports success or failure, allowing you to verify credentials before saving. On success, a green checkmark and "Connection successful." appear inline next to the button. On failure, a red error icon and the raw JSON error response from the provider appear below the button.
Required fields by provider:
| Provider | Required fields | Notes |
|---|---|---|
| OpenAI | Api key, Model | — |
| Azure OpenAI | Api key, Endpoint, Model / Deployment name | Model and Deployment name use cross-field validation — at least one must be set. The form shows helper text: "Required if deploymentName is not set" and "Required if model is not set." |
| Google AI | Api key, Model | — |
| Amazon Bedrock | Region, Model | Access key id and Secret access key are optional but must be set together; omit both to use the AWS default credential chain. |
| Vertex AI | Model, Project id, Location | Credentials json is shown at the same level as the required fields (not in Advanced), but is optional — omit to use Application Default Credentials. |
| Anthropic | Api key, Model | — |
| OpenRouter | Api key, Model | Model field shows the hint "Namespaced model ID, e.g. openai/gpt-4o." |
Advanced fields by provider (Chat card):
| Provider | Advanced fields |
|---|---|
| OpenAI | Endpoint, Temperature, Max tokens, Max retries, Timeout |
| Azure OpenAI | Api version, Temperature, Max tokens, Max retries, Timeout |
| Google AI | Endpoint, Temperature, Max tokens, Max retries, Timeout |
| Amazon Bedrock | Temperature, Max tokens, Max retries, Timeout |
| Vertex AI | Temperature, Max tokens, Max retries |
| Anthropic | Endpoint, Temperature, Max tokens, Max retries, Timeout |
| OpenRouter | Endpoint, Temperature, Max tokens, Max retries, Timeout |
For the Embeddings and Image Generation cards, the advanced fields are the same as above except Max tokens is not shown.
Settings Card#
The Settings card at the bottom of the page configures behavior and prompts that apply across all capabilities.
The following fields are always visible:
| Field | Description |
|---|---|
| Role prompt | Describes the role the AI plays for content authors. Defaults to "You are dotCMSbot...". |
| Text prompt | Writing style guidance for generated text. Defaults to "Use Descriptive writing style." |
| Image prompt | Visual style or aspect ratio guidance for image generation. Defaults to "Use 16:9 aspect ratio." |
| Image size | Default dimensions for generated images (dropdown). |
Expanding Advanced 12 settings reveals the embeddings and runtime configuration:
| Field | Description |
|---|---|
| Split into (tokens) | Token count used to chunk content before indexing. |
| Minimum text length to index | Minimum character length for a text chunk to be embedded. |
| Minimum file size (bytes) | Minimum file size for binary files to be embedded. |
| File extensions | Comma-separated list of file extensions eligible for embedding, e.g. pdf,doc,docx,txt,html. |
| Search threshold | Default similarity threshold for embedding searches. |
| Threads | Number of concurrent embedding threads. |
| Max threads | Maximum concurrent embedding threads. |
| Thread queue size | Embedding thread queue depth. |
| Cache TTL (s) | Embeddings cache TTL in seconds. |
| Cache size | Embeddings cache maximum size. |
| Delete old embeddings on content update | Checkbox. When checked, old embedding vectors are removed when content is updated. |
| Enable verbose debug logging | Checkbox. When checked, enables detailed debug logging for AI operations. |
See Settings for the JSON field names, defaults, and full descriptions of each setting.
The Settings card also includes an Additional properties section. Unlike the capability cards, where Additional properties accepts arbitrary provider-specific fields, the Settings card's Additional properties section is for recognized settings keys that don't yet have dedicated form fields. The current set is:
| Key | Description |
|---|---|
temperature | Default temperature for chat completions API calls. Distinct from chat.temperature, which initializes the provider model. |
completionRolePrompt | Full system prompt used in chat completions. |
completionTextPrompt | Completion query template. Supports $!{prompt} and $!{supportingContent} variables. |
listenerIndexer | JSON object mapping index names to Content Types for auto-indexing, e.g. {"default":"blog,news"}. |
See Settings for defaults and full descriptions.
JSON Reference#
The configuration screen saves all settings as a providerConfig JSON object. The reference below documents every field in that object, which can also be supplied directly via the API for automation or headless configuration workflows.
The JSON has up to four top-level properties: chat, embeddings, image, and settings. Each section declares its own provider independently.
Common Fields#
The following fields are available in the chat, embeddings, and image sections across all providers. Provider-specific fields are documented in the sections below.
| Field | Description |
|---|---|
provider | The AI provider to use. Accepted values: "openai", "azure_openai", "vertex_ai", "bedrock", "google_ai", "anthropic", "openrouter". |
apiKey | API key for this provider. Masked as ***** in the UI after saving. Not used for Vertex AI when authenticating via Application Default Credentials. |
model | Model name(s) to use. Supply a comma-separated list to enable fallback behavior — when the first model is unavailable, the next is tried. Example: "gpt-4o,gpt-4o-mini" |
endpoint | Custom API endpoint URL. Required for Azure OpenAI; omit for standard OpenAI endpoints. |
maxTokens | Maximum tokens per response. |
maxRetries | Number of retry attempts on failure. Not supported for Vertex AI streaming chat. |
temperature | (chat section only) Controls response randomness (0–2). |
Provider-Specific Fields#
Azure OpenAI#
Set provider to "azure_openai".
Prerequisites: An active Azure subscription with Azure OpenAI access enabled; an Azure OpenAI resource created in Azure AI Studio with one or more model deployments; the resource's API key and endpoint URL (found in Azure AI Studio → Your Resource → Keys and Endpoint).
| Field | Required | Description |
|---|---|---|
endpoint | Yes | Azure OpenAI resource base URL, e.g. https://my-resource.openai.azure.com/ |
deploymentName | Yes* | Name of the deployment in Azure AI Studio. |
apiVersion | Recommended | Azure API version string. Recommended: 2024-02-01. |
dimensions | Conditional | Embedding vector dimensions. Required when using text-embedding-3-small or text-embedding-3-large. |
size | No | Image dimensions for image generation, e.g. 1024x1024. |
timeout | No | Request timeout in seconds. |
*deploymentName or model is required. If your deployment name matches the model name exactly, model alone is sufficient; otherwise use deploymentName.
Note on reasoning models. Models in the o1, o3, and o4-mini families use max_completion_tokens instead of max_tokens at the API level. dotAI detects this automatically — set maxTokens as usual.
Note on API keys and multi-resource deployments. Azure scopes API keys to the resource, not to individual deployments. If your chat and embeddings deployments live in the same resource, both sections share the same apiKey and endpoint. If deployments span multiple resources, use the appropriate key and endpoint per section.
Google Vertex AI#
Set provider to "vertex_ai".
Prerequisites: A Google Cloud project with the Vertex AI API enabled; a service account with the Vertex AI User role or equivalent; either a downloaded service account key file (JSON) or workload identity configured (for GKE / Cloud Run).
Supported sections: chat only. Vertex AI Gemini does not support embeddings or image generation through this integration — those sections must use a different provider.
| Field | Required | Description |
|---|---|---|
projectId | Yes | GCP project ID, e.g. my-gcp-project. |
location | Yes | GCP region where the model is available, e.g. us-central1. |
credentialsJson | No | Full content of a GCP service account JSON key file, serialized as a single escaped JSON string. If omitted, Application Default Credentials (ADC) are used. |
timeout | No | Request timeout in seconds. Ignored for streaming chat. |
model defaults to gemini-1.5-flash if omitted; recommended values include gemini-2.0-flash and gemini-1.5-pro. See the Vertex AI model garden for availability by region. us-central1 has the broadest coverage.
Authentication. Two options are supported:
- Service account key file (recommended for on-premise / non-GCP deployments): paste the full content of your key file into
credentialsJson. The value must be a single escaped JSON string — not an inline JSON object. To produce the correct format:cat my-key.json | python3 -c "import json,sys; print(json.dumps(sys.stdin.read()))" - Application Default Credentials (recommended for GKE / Cloud Run): omit
credentialsJson. dotAI uses ADC automatically, respecting workload identity and environment-level credentials.
Amazon Bedrock#
Set provider to "bedrock".
Prerequisites: An active AWS account with Amazon Bedrock access; model access explicitly enabled for each model you intend to use (AWS Console → Amazon Bedrock → Model access — IAM permissions alone are not sufficient); an IAM identity with bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream permissions on the target models.
Supported sections: chat and embeddings. Image generation is not supported — configuring provider: "bedrock" for the image section throws an UnsupportedOperationException. Use a different provider for images.
| Field | Required | Description |
|---|---|---|
region | Yes | AWS region where the model is available, e.g. us-east-1. |
model | Yes | Bedrock model ID or inference-profile ID. See Model ID forms below. |
accessKeyId | No | AWS access key ID for static credentials. Must be set together with secretAccessKey, or both must be omitted. |
secretAccessKey | No | AWS secret access key. Must be set together with accessKeyId, or both must be omitted. |
dimensions | No | Embedding vector dimensions. Applies to Titan embedding models only (256, 512, or 1024 for Titan V2). |
embeddingInputType | No | Input type hint for Cohere embedding models: search_document, search_query, classification, or clustering. |
timeout | No | Per-attempt request timeout in seconds. Chat only — silently ignored for embedding models. |
maxRetries | No | Retry attempts on transient failures. Chat only — silently ignored for embedding models. |
Authentication. Two options are supported:
- Static credentials (IAM user): provide
accessKeyIdandsecretAccessKeytogether. Both must be present — supplying only one throws anIllegalArgumentExceptionat startup. - Default credential chain (recommended for EC2, EKS, ECS): omit both fields. dotAI uses the AWS SDK's
DefaultCredentialsProvider, which resolves credentials in order: environment variables (AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY) → system properties → AWS profile files (~/.aws/credentials) → EKS IRSA web identity / container role metadata.
Model ID forms. Bedrock uses two distinct ID formats depending on the model's throughput type:
- Inference-profile-prefixed IDs — required for models that only support cross-region inference profiles (no on-demand throughput). Must include a region prefix:
us.,eu., orapac.. Using the bare ID for these models returns aValidationException. - Bare on-demand IDs — for models with on-demand throughput. No prefix needed.
| Model | Correct ID | Form |
|---|---|---|
| DeepSeek R1 | us.deepseek.r1-v1:0 | Inference-profile-prefixed |
| Amazon Titan Embed Text V1 | amazon.titan-embed-text-v1 | Bare on-demand |
| Amazon Titan Embed Text V2 | amazon.titan-embed-text-v2:0 | Bare on-demand |
| OpenAI gpt-oss 120B ("Codex") | openai.gpt-oss-120b-1:0 | Bare on-demand |
| OpenAI gpt-oss 20B | openai.gpt-oss-20b-1:0 | Bare on-demand |
Model availability varies by region — check the Bedrock model catalog for your account. The IDs above have been live-tested against the dotCMS R&D Bedrock account.
Embedding model families. Two families are supported, with different routing and constraints:
- Amazon Titan (
amazon.titan-*): routed toBedrockTitanEmbeddingModel. Titan V1 always outputs 1536 dimensions, matching the defaultdot_embeddingspgvector schema (vector(1536)) with no schema changes required. Titan V2 supports configurable dimensions (256, 512, or 1024) via thedimensionsfield but requires a schema migration unless the instance was configured for a lower dimension from the start. - Cohere (
cohere.*): routed toBedrockCohereEmbeddingModel. UseembeddingInputTypeto specify the input hint appropriate for your use case.
timeout and maxRetries are not applied to either embedding family — the underlying Bedrock client for embeddings does not expose SDK override configuration.
Additional considerations:
timeoutis a per-attempt timeout mapping to the AWS SDK'sapiCallAttemptTimeout. Each retry gets the full budget — withmaxRetries: 2andtimeout: 30, worst-case total wait is 90 seconds.- DeepSeek R1 requires the
us.inference-profile prefix. The bare IDdeepseek.r1-v1:0is rejected with aValidationException. gpt-ossmodels require langchain4j-bedrock 1.16.0 or later. Earlier versions unconditionally includestopSequencesin Converse requests, which thegpt-ossfamily rejects with aValidationException. This affects both chat and streaming; DeepSeek R1 and Titan embeddings work correctly on earlier versions.
Google AI#
Set provider to "google_ai".
Prerequisites: A Google account with access to Google AI Studio; an API key generated at AI Studio → Get API key; a billing-enabled Google Cloud project linked to the API key. The free-tier quota is very limited — billing must be active for production use.
Supported sections: chat, embeddings, and image.
| Field | Required | Description |
|---|---|---|
model | Yes | Model name. See model tables below. |
dimensions | No | Embedding vector dimensions. Use 1536 with gemini-embedding-001 to match the default dot_embeddings pgvector schema (vector(1536)). Other sizes require a schema migration. |
size | No | Image size, e.g. 1K, 2K. |
timeout | No | Request timeout in seconds. Ignored for streaming chat. |
Chat model IDs:
| Model | ID |
|---|---|
| Gemini 2.5 Flash | gemini-2.5-flash |
| Gemini 2.0 Flash | gemini-2.0-flash |
| Gemini 1.5 Pro | gemini-1.5-pro |
Embedding model IDs:
| Model | ID | Output dimensions |
|---|---|---|
| Gemini Embedding 001 | gemini-embedding-001 | Up to 3072 (configurable) |
| Text Embedding 004 | text-embedding-004 | Up to 768 (configurable) |
Image model IDs:
| Model | ID |
|---|---|
| Gemini 2.5 Flash Image | gemini-2.5-flash-image |
maxRetries and timeout are not applied for streaming chat and are silently ignored in that mode.
Anthropic#
Set provider to "anthropic".
Prerequisites: An Anthropic account with an active plan; an API key (sk-ant-...) generated at Anthropic Console → API Keys.
Supported sections: chat only. Anthropic provides no embeddings or image generation API — both sections must use a different provider.
| Field | Required | Description |
|---|---|---|
model | Yes | Claude model ID. See model table below. |
endpoint | No | Base URL override for proxies or API gateways. |
timeout | No | Request timeout in seconds. |
| Model | ID |
|---|---|
| Claude Sonnet 4 | claude-sonnet-4-6 |
| Claude Opus 4 | claude-opus-4-8 |
| Claude Haiku 4.5 | claude-haiku-4-5 |
Note on direct vs. Bedrock access. This provider calls the Anthropic API directly with an sk-ant-... key. To access Claude models through AWS infrastructure instead, use provider: "bedrock" with the appropriate Bedrock model ID (e.g. anthropic.claude-3-5-sonnet-20241022-v2:0).
maxRetries is not applied for streaming chat and is silently ignored in that mode.
OpenRouter#
Set provider to "openrouter".
Prerequisites: An OpenRouter account with credits or an active plan; an API key (sk-or-...) generated at OpenRouter → Keys.
Supported sections: chat and embeddings. Image generation is not supported — the image section must use a different provider.
| Field | Required | Description |
|---|---|---|
model | Yes | Namespaced model ID in provider/model-name format, e.g. openai/gpt-4o. |
endpoint | No | Base URL override. Defaults to https://openrouter.ai/api/v1. |
dimensions | No | Embedding vector dimensions (embeddings only). |
timeout | No | Request timeout in seconds. |
Chat model IDs — OpenRouter routes to hundreds of models through a single API key. Common examples:
| Model | ID |
|---|---|
| GPT-4o | openai/gpt-4o |
| GPT-4o mini | openai/gpt-4o-mini |
| Claude Sonnet 4 | anthropic/claude-sonnet-4 |
| Claude Haiku | anthropic/claude-haiku |
| Gemini 2.0 Flash | google/gemini-2.0-flash-001 |
| DeepSeek R1 | deepseek/deepseek-r1 |
| Llama 3.3 70B | meta-llama/llama-3.3-70b-instruct |
Full model list at openrouter.ai/models.
Embedding model IDs — OpenRouter proxies approximately 10 embedding models via an OpenAI-compatible /api/v1/embeddings endpoint. Common examples:
| Model | ID |
|---|---|
| OpenAI Text Embedding 3 Small | openai/text-embedding-3-small |
| Gemini Embedding 001 | google/gemini-embedding-001 |
| BGE-M3 | baai/bge-m3 |
Full embedding model list at openrouter.ai/collections/embedding-models.
Not all models are available on all plans — check your plan's access before using in production.
maxRetries is not applied for streaming chat and is silently ignored in that mode.
Provider Capability Summary#
| Provider | chat | embeddings | image |
|---|---|---|---|
openai | Yes | Yes | Yes |
azure_openai | Yes | Yes | Yes |
google_ai | Yes | Yes | Yes |
bedrock | Yes | Yes | No |
vertex_ai | Yes | No | No |
anthropic | Yes | No | No |
openrouter | Yes | Yes | No |
Settings#
The settings property carries behavioral and prompt configuration:
| Setting | Default | Description |
|---|---|---|
rolePrompt | "You are dotCMSbot..." | Prompt describing the role the AI plays. |
textPrompt | "Use Descriptive writing style." | Prompt describing the overall writing style of generated text. |
imagePrompt | "Use 16:9 aspect ratio." | Aspect ratio or visual style guidance for image generation. |
imageSize | "1024x1024" | Default dimensions of generated images. |
listenerIndexer | {} | JSON object mapping index names to Content Types for auto-indexing. Most useful on the System Host to propagate indexes across sites. Example: { "default": "blog,news,webPageContent" } |
temperature | 1 | Default temperature for chat completions. |
embeddingsSplitAtTokens | 512 | Token chunk size for splitting content during embedding. |
embeddingsMinimumTextLength | 64 | Minimum character length for a text chunk to be embedded. |
embeddingsMinimumFileSize | 1024 | Minimum file size (bytes) for binary files to be embedded. |
embeddingsFileExtensions | pdf,doc,docx,txt,html | File extensions eligible for embedding. |
embeddingsSearchThreshold | .25 | Default similarity threshold for embedding searches. |
embeddingsThreads | 3 | Number of concurrent embedding threads. |
embeddingsThreadsMax | 6 | Maximum concurrent embedding threads. |
embeddingsThreadsQueue | 10000 | Embedding thread queue depth. |
embeddingsCacheTtlSeconds | 600 | Embeddings cache TTL in seconds. |
embeddingsCacheSize | 1000 | Embeddings cache maximum size. |
embeddingsDeleteOldOnUpdate | true | Whether to delete old embeddings when content is updated. |
debugLogging | false | Enable verbose debug logging. |
Only include settings that differ from the defaults shown above — omitted keys fall back to their default values.
Each site can have its own configuration, or inherit from SYSTEM_HOST. To configure a specific site, select it from the site picker in Settings > Apps > dotAI before saving.
Configuration Examples#
OpenAI: Minimal#
Sufficient for most OpenAI deployments. Omit any section you don't use.
{
"chat": {
"provider": "openai",
"apiKey": "sk-...",
"model": "gpt-4o",
"maxTokens": 16384,
"maxRetries": 3
},
"embeddings": {
"provider": "openai",
"apiKey": "sk-...",
"model": "text-embedding-ada-002"
},
"image": {
"provider": "openai",
"apiKey": "sk-...",
"model": "dall-e-3"
}
}OpenAI: Custom#
Use the settings block only for values that differ from the defaults.
{
"chat": {
"provider": "openai",
"apiKey": "sk-...",
"model": "gpt-4o,gpt-4o-mini",
"maxTokens": 16384,
"temperature": 0.7,
"maxRetries": 3,
"endpoint": "https://your-proxy.example.com/v1/chat/completions"
},
"embeddings": {
"provider": "openai",
"apiKey": "sk-...",
"model": "text-embedding-ada-002"
},
"image": {
"provider": "openai",
"apiKey": "sk-...",
"model": "dall-e-3"
},
"settings": {
"rolePrompt": "You are a helpful assistant for Acme Corp.",
"textPrompt": "Be concise and professional.",
"imagePrompt": "Use a clean, corporate visual style.",
"imageSize": "1792x1024",
"listenerIndexer": {
"default": "blog,news,webPageContent"
},
"embeddingsSplitAtTokens": 256,
"embeddingsSearchThreshold": 0.3,
"debugLogging": false
}
}Azure: Minimal#
A minimal Azure configuration. Image generation here falls back to OpenAI; for a full Azure image setup see the example below.
{
"chat": {
"provider": "azure_openai",
"apiKey": "YOUR_AZURE_API_KEY",
"endpoint": "https://my-resource.openai.azure.com/",
"deploymentName": "my-gpt4o-deployment",
"apiVersion": "2024-02-01",
"maxTokens": 16384
},
"embeddings": {
"provider": "azure_openai",
"apiKey": "YOUR_AZURE_API_KEY",
"endpoint": "https://my-resource.openai.azure.com/",
"deploymentName": "my-embeddings-deployment",
"apiVersion": "2024-02-01"
},
"image": {
"provider": "openai",
"apiKey": "sk-...",
"model": "gpt-image-1"
}
}If your deployment name matches the model name exactly, you can omit deploymentName and use model alone:
{
"chat": {
"provider": "azure_openai",
"apiKey": "YOUR_AZURE_API_KEY",
"endpoint": "https://my-resource.openai.azure.com/",
"model": "gpt-5.4",
"apiVersion": "2024-02-01",
"maxTokens": 16384
}
}Azure: Full#
Azure supports two endpoint types for image generation, selected automatically based on the endpoint URL. In early 2026, Microsoft retired DALL-E 3 image deployments on Azure OpenAI in favour of the gpt-image series.
*.openai.azure.com(Classic Azure OpenAI): requiresdeploymentNameandapiVersion; supportsgpt-image-1.*.services.ai.azure.com(Azure AI Foundry): uses a plain OpenAI-style client; do not setapiVersion(it produces a warning if present); supportsgpt-image-2.
Full configuration using the Foundry endpoint for images:
{
"chat": {
"provider": "azure_openai",
"apiKey": "YOUR_AZURE_API_KEY",
"endpoint": "https://my-resource.openai.azure.com/",
"deploymentName": "my-gpt4o-deployment",
"apiVersion": "2024-02-01",
"maxTokens": 16384
},
"embeddings": {
"provider": "azure_openai",
"apiKey": "YOUR_AZURE_API_KEY",
"endpoint": "https://my-resource.openai.azure.com/",
"deploymentName": "my-embeddings-deployment",
"apiVersion": "2024-02-01"
},
"image": {
"provider": "azure_openai",
"apiKey": "YOUR_FOUNDRY_API_KEY",
"endpoint": "https://my-resource.services.ai.azure.com/openai/v1/",
"model": "gpt-image-2",
"size": "1024x1024"
}
}Vertex AI#
Vertex AI supports chat only; embeddings and images must use a separate provider.
{
"chat": {
"provider": "vertex_ai",
"projectId": "my-gcp-project",
"location": "us-central1",
"model": "gemini-2.0-flash",
"credentialsJson": "{ ... service account JSON ... }"
},
"embeddings": {
"provider": "openai",
"apiKey": "sk-...",
"model": "text-embedding-ada-002"
},
"image": {
"provider": "openai",
"apiKey": "sk-...",
"model": "gpt-image-1"
}
}To use Application Default Credentials instead of a key file, omit credentialsJson:
{
"chat": {
"provider": "vertex_ai",
"projectId": "my-gcp-project",
"location": "us-central1",
"model": "gemini-2.0-flash",
"maxTokens": 8192
}
}Bedrock: Titan V1#
Titan V1 is recommended when no pgvector schema migration is possible, as its 1536-dimension output matches the default dot_embeddings schema directly.
{
"chat": {
"provider": "bedrock",
"region": "us-east-1",
"model": "us.deepseek.r1-v1:0",
"accessKeyId": "AKIAIOSFODNN7EXAMPLE",
"secretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"maxTokens": 8192
},
"embeddings": {
"provider": "bedrock",
"region": "us-east-1",
"model": "amazon.titan-embed-text-v1",
"accessKeyId": "AKIAIOSFODNN7EXAMPLE",
"secretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
}
}Bedrock: Titan V2#
Uses Titan Embed Text V2 for embeddings. Requires a dot_embeddings schema configured for 1024 dimensions or fewer.
{
"chat": {
"provider": "bedrock",
"region": "us-east-1",
"model": "us.deepseek.r1-v1:0",
"accessKeyId": "AKIAIOSFODNN7EXAMPLE",
"secretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"maxTokens": 8192
},
"embeddings": {
"provider": "bedrock",
"region": "us-east-1",
"model": "amazon.titan-embed-text-v2:0",
"accessKeyId": "AKIAIOSFODNN7EXAMPLE",
"secretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"dimensions": 1024
}
}Bedrock: IAM Role#
Omit both credential fields when the instance or pod has an attached IAM role.
{
"chat": {
"provider": "bedrock",
"region": "us-east-1",
"model": "us.deepseek.r1-v1:0",
"maxTokens": 8192
},
"embeddings": {
"provider": "bedrock",
"region": "us-east-1",
"model": "amazon.titan-embed-text-v1"
}
}Bedrock: Mixed#
Bedrock for chat, OpenAI for embeddings and images.
{
"chat": {
"provider": "bedrock",
"region": "us-east-1",
"model": "us.deepseek.r1-v1:0",
"accessKeyId": "AKIAIOSFODNN7EXAMPLE",
"secretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"maxTokens": 8192
},
"embeddings": {
"provider": "openai",
"apiKey": "sk-...",
"model": "text-embedding-ada-002"
},
"image": {
"provider": "openai",
"apiKey": "sk-...",
"model": "dall-e-3"
}
}Google AI: Full#
Use dimensions: 1536 with gemini-embedding-001 to match the default pgvector schema without a migration.
{
"chat": {
"provider": "google_ai",
"model": "gemini-2.0-flash",
"apiKey": "AIza...",
"maxTokens": 8192,
"temperature": 0.7
},
"embeddings": {
"provider": "google_ai",
"model": "gemini-embedding-001",
"apiKey": "AIza...",
"dimensions": 1536
},
"image": {
"provider": "google_ai",
"model": "gemini-2.5-flash-image",
"apiKey": "AIza..."
}
}Anthropic#
Anthropic supports chat only; embeddings and images must use a different provider.
{
"chat": {
"provider": "anthropic",
"model": "claude-sonnet-4-6",
"apiKey": "sk-ant-...",
"maxTokens": 8192
},
"embeddings": {
"provider": "openai",
"apiKey": "sk-...",
"model": "text-embedding-ada-002"
},
"image": {
"provider": "openai",
"apiKey": "sk-...",
"model": "dall-e-3"
}
}OpenRouter#
OpenRouter uses namespaced model IDs (provider/model-name) for both chat and embeddings. Image generation must use a different provider.
{
"chat": {
"provider": "openrouter",
"model": "openai/gpt-4o",
"apiKey": "sk-or-...",
"maxTokens": 8192
},
"embeddings": {
"provider": "openrouter",
"model": "openai/text-embedding-3-small",
"apiKey": "sk-or-..."
},
"image": {
"provider": "openai",
"apiKey": "sk-...",
"model": "dall-e-3"
}
}Per-Site Config#
To configure a specific site, go to Settings > Apps > dotAI, select the target site from the site picker, and save a separate configuration.
To verify which host's config is being applied, check the configHost field in the GET response:
GET /api/v1/ai/completions/config?siteId=your-site-id{
"providerConfig": "{ ... }",
"configHost": "SYSTEM_HOST"
}If configHost returns the target site's hostname, the per-site config is active. Credentials are masked as ***** in the response.
Legacy Configuration#
Before the current configuration interface, the dotAI App Configuration followed a different, multiple-field pattern. A full list of the legacy fields follows:
| Field | Description |
|---|---|
| API Key | Your account's API key; must be present to utilize OpenAI services. |
| Model Names | A comma-separated list of the models used to generate OpenAPI responses. Including multiple models also enables fallback behavior; when a specified model is not found, the next one is used. Example: gpt-4o-mini,gpt-3.5-turbo-16k,gpt-4o |
| Role Prompt | A prompt describing the role (if any) the text generator will play for the dotCMS user. |
| Text Prompt | A prompt describing the overall writing style of generated text. |
| Tokens per Minute | Permits configurable rate limiting for text responses based on token use. |
| API per Minute | Permits configurable rate limiting for text responses based on API call volume. |
| Max Tokens | Permits configurable rate limiting for token consumption per API response. |
| Completion model enabled | If checked, causes text responses to incorporate completions. Completions are useful for interactive chat modes and other dynamic uses, capable of incorporating response histories into future responses. |
| Image Model Names | A comma-separated list of the image models used to generate graphical responses. Including multiple models also enables fallback behavior; when a specified model is not found, the next one is used. |
| Image Prompt | A specification of output aspect ratio. If the ratio specified differs significantly from the Image Size (below), the image will "letterbox" accordingly. |
| Image Size | Selects the default dimensions of generated images. |
| Image Tokens per Minute | Permits configurable rate limiting for image responses based on token use. |
| Image API per Minute | Permits configurable rate limiting for image responses based on API call volume. |
| Image Max Tokens | Permits configurable rate limiting for token consumption per image generation API response. |
| Image Completion model enabled | If checked, causes image responses to incorporate completions. Completions are useful for interactive chat modes and other dynamic uses, capable of incorporating response histories into future responses. |
| Embeddings Model Names | A comma-separated list of the image models used to generate graphical responses. Including multiple models also enables fallback behavior; when a specified model is not found, the next one is used. |
| Embeddings Tokens per Minute | Permits configurable rate limiting for embeddings responses based on token use. |
| Embeddings API per Minute | Permits configurable rate limiting for embeddings responses based on API call volume. |
| Embeddings Max Tokens | Permits configurable rate limiting for token consumption per embeddings API response. |
| Embeddings Completion model enabled | If checked, causes embedding responses to incorporate completions. Completions are useful for interactive chat modes and other dynamic uses, capable of incorporating response histories into future responses. |
| Auto Index Content Config | Allows App-level configuration of content indexes used as the basis for text generation. Takes a JSON mapping; each property name becomes an index, and each value is the Content Type it will take as its target content. Optional; indexes are also fully configurable under the dotAI Tool. Most useful when configured in the System Host, as this will instantiate the indexes across multiple sites. |
| Custom Properties | Additional key-value pairs for dotAI configuration. |
Using dotAI#
The dotAI feature includes several components, detailed separately:
| Component | Description |
|---|---|
| dotAI Tool | The dotAI admin-panel interface can be found via Tools -> dotAI, allowing direct usage, index definition, and general configuration of the feature. |
| AI Blocks | dotAI's integration with the Block Editor field provides the most straightforward way to get started generating content. |
| AI Workflows | AI Workflow Sub-Actions permit a range of asynchronous automations utilizing AI — such as generating entire contentlets on demand. |
| AI Viewtool | The AI Viewtool, accessible through $ai, allows AI operations via Velocity script. |
| API Resources | REST API endpoints allow AI operations to be performed headlessly. |