> For the complete documentation index, see [llms.txt](https://docs.umbraco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.umbraco.com/ai-in-umbraco/concepts/providers.md).

# Providers

Providers are installable plugins that connect Umbraco.AI to AI services.

A provider is a NuGet package that enables Umbraco.AI to communicate with a specific AI service. Providers handle the details of API authentication, request formatting, and response parsing.

## How Providers Work

Providers are discovered automatically when you install their NuGet package. They register themselves using the `[AIProvider]` attribute and implement the `IAIProvider` interface.

```
┌─────────────────────────────────────────────────────────────────────────────────┐
│                                 Umbraco.AI                                      │
│    ┌─────────────────────────────────────────────────────────────────────────┐  │
│    │                          Provider Registry                              │  │
│    │  ┌──────────┐ ┌───────────┐ ┌──────────┐ ┌─────────┐ ┌───────────────┐  │  │
│    │  │  OpenAI  │ │ Anthropic │ │ Google   │ │ Amazon  │ │ MS AI Foundry │  │  │
│    │  │ Provider │ │  Provider │ │ Provider │ │ Bedrock │ │   Provider    │  │  │
│    │  └──────────┘ └───────────┘ └──────────┘ └─────────┘ └───────────────┘  │  │
│    └─────────────────────────────────────────────────────────────────────────┘  │
└─────────────────────────────────────────────────────────────────────────────────┘
```

## Available Providers

| Provider                   | Package                       | Capabilities                    |
| -------------------------- | ----------------------------- | ------------------------------- |
| OpenAI                     | `Umbraco.AI.OpenAI`           | Chat, Embedding, Speech-to-Text |
| Anthropic                  | `Umbraco.AI.Anthropic`        | Chat                            |
| Google Gemini              | `Umbraco.AI.Google`           | Chat                            |
| Amazon Bedrock             | `Umbraco.AI.Amazon`           | Chat, Embedding                 |
| Microsoft AI Foundry       | `Umbraco.AI.MicrosoftFoundry` | Chat, Embedding                 |
| Alibaba Cloud Model Studio | `Umbraco.AI.Alibaba`          | Chat, Embedding                 |
| Moonshot AI                | `Umbraco.AI.Moonshot`         | Chat                            |
| OpenRouter                 | `Umbraco.AI.OpenRouter`       | Chat                            |
| Z.AI                       | `Umbraco.AI.ZAI`              | Chat                            |

{% hint style="info" %}
For detailed configuration instructions for each provider, see the [Providers](/ai-in-umbraco/providers/providers.md) section. You can also create custom providers.
{% endhint %}

## Provider Discovery

Providers are discovered at application startup through assembly scanning. Any class with the `[AIProvider]` attribute that implements `IAIProvider` is automatically registered.

{% code title="OpenAIProvider.cs" %}

```csharp
[AIProvider("openai", "OpenAI")]
public class OpenAIProvider : AIProviderBase<OpenAIProviderSettings>
{
    public OpenAIProvider(IAIProviderInfrastructure infrastructure)
        : base(infrastructure)
    {
        WithCapability<OpenAIChatCapability>();
        WithCapability<OpenAIEmbeddingCapability>();
    }
}
```

{% endcode %}

## Provider Settings

Each provider defines its own settings class. Common settings include:

| Setting      | Description                             |
| ------------ | --------------------------------------- |
| API Key      | Authentication credential               |
| Endpoint     | API URL (for custom endpoints)          |
| Organization | Organization identifier (if applicable) |

Settings are defined using the `[AIField]` attribute:

{% code title="OpenAIProviderSettings.cs" %}

```csharp
using System.ComponentModel.DataAnnotations;

public class OpenAIProviderSettings
{
    [AIField(IsSensitive = true)]
    [Required]
    public string? ApiKey { get; set; }

    [AIField]
    public string? OrganizationId { get; set; }
}
```

{% endcode %}

## Provider Capabilities

A provider can support multiple capabilities:

* **Chat** - Conversational AI and text generation
* **Embedding** - Vector embeddings for semantic search
* **Speech-to-Text** - Audio transcription and voice input

Each capability is implemented as a separate class and registered in the provider constructor.

## Accessing Providers in Code

You rarely need to interact with providers directly. The service layer handles provider resolution based on the profile's connection.

If you need to access provider information:

{% code title="Example.cs" %}

```csharp
public class ProviderInfo
{
    private readonly IAIRegistry _registry;

    public ProviderInfo(IAIRegistry registry)
    {
        _registry = registry;
    }

    public IEnumerable<string> GetAvailableProviders()
    {
        return _registry.GetProviders().Select(p => p.Name);
    }
}
```

{% endcode %}

## Creating Custom Providers

You can create providers for AI services not yet supported. See:

{% content-ref url="/pages/3VIw69H97G5IIXOhDihK" %}
[Custom Providers](/ai-in-umbraco/extending/providers.md)
{% endcontent-ref %}

## Related

* [Connections](/ai-in-umbraco/concepts/connections.md) - Store credentials for a provider
* [Capabilities](/ai-in-umbraco/concepts/capabilities.md) - The operations a provider supports


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.umbraco.com/ai-in-umbraco/concepts/providers.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
