Skip to main content
Version: 2.1

AI Providers Overview

Reveal SDK AI uses a provider-based architecture that lets you integrate with different large language model (LLM) services. The same set of providers is available on ASP.NET Core, Node.js, and Java — only the registration syntax differs.

Available Providers

ProviderASP.NET NuGetNode.js / Java keyExtension Method (ASP.NET)
OpenAIReveal.Sdk.AI.OpenAIopenai.AddOpenAI()
Azure OpenAIReveal.Sdk.AI.AzureOpenAIazure-openai.AddAzureOpenAI()
AnthropicReveal.Sdk.AI.Anthropicanthropic.AddAnthropic()
Google GeminiReveal.Sdk.AI.Googlegoogle.AddGoogle()

For ASP.NET Core, each provider is a separate NuGet package — install only the ones you need. For Node.js (reveal-sdk-node-ai) and Java (reveal-sdk-ai), the provider implementations are bundled in the main AI package.

How Providers Work

All providers implement a common provider interface and are registered with the AI runtime. You configure a single provider, and the AI runtime uses it for all requests.

Registering Providers

Register a provider after AddRevealAI():

builder.Services.AddRevealAI()
.AddOpenAI(options =>
{
options.ApiKey = "your-api-key";
});

Default Provider

The DefaultProvider setting tells the SDK which provider to use. Available provider keys: openai, azure-openai, anthropic, google.

appsettings.json
{
"RevealAI": {
"DefaultProvider": "openai"
}
}

Configuration Binding

For ASP.NET Core, the provider supports configuration binding from appsettings.json under the RevealAI section. Options set in code take precedence over configuration file values:

appsettings.json
{
"RevealAI": {
"DefaultProvider": "openai",
"OpenAI": {
"ApiKey": "sk-...",
"Model": "gpt-4.1"
}
}
}

For Node.js and Java, load your settings from environment variables, a secrets manager, or a local config file and pass them inline at startup.

Custom Providers

If you need to integrate with an LLM service that isn't supported out of the box, you can build a custom provider. Custom providers are supported on ASP.NET Core (via the IAIProvider interface), Java (via a callback registered with the plugin), and Node.js (via a callback in the plugin options).