For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Custom Providers

Create custom AI providers to support additional AI services.

Providers are plugins that connect Umbraco.AI to AI services. Create a custom provider to add support for AI services not included out of the box.

Provider Architecture

A provider consists of:

  1. Provider class - Main class with [AIProvider] attribute

  2. Settings class - Configuration properties with [AIField] attributes

  3. Capability classes - Implementations for Chat, Embedding, and so on

MyProvider/
├── MyProvider.cs              # Main provider class
├── MyProviderSettings.cs      # Settings with [AIField] attributes
├── MyChatCapability.cs        # Chat capability implementation
└── MyEmbeddingCapability.cs   # Embedding capability (optional)

Quick Start

1. Create a Settings Class

MyProviderSettings.cs
using Umbraco.AI.Core.EditableModels;

public class MyProviderSettings
{
    [AIField(Label = "API Key", Description = "Your API key", IsSensitive = true)]
    public string? ApiKey { get; set; }

    [AIField(Label = "Endpoint", Description = "API endpoint URL")]
    public string? Endpoint { get; set; }
}

2. Create a Chat Capability

3. Create the Provider Class

How It Works

  1. Providers are discovered automatically via assembly scanning

  2. The [AIProvider] attribute registers the provider with an ID and name

  3. Settings are rendered in the backoffice using [AIField] metadata

  4. Capabilities are registered in the constructor with WithCapability<T>()

In This Section

Creating a ProviderProvider SettingsChat CapabilityEmbedding Capability

Last updated

Was this helpful?