New to Telerik UI for ASP.NET MVCStart a free 30-day trial

Integration with Microsoft.Extensions.AI

Updated on Sep 16, 2026

The AIPrompt component incorporates the Microsoft.Extensions.AI package to simplify your AI model integration, provide flexibility and allows you to easily use and test various AI providers.

Other components will support similar integration in future versions of UI for ASP.NET MVC.

An API key alone is not enough to connect an AI component to a third-party service. You also need the provider endpoint, model or deployment configuration, and a server-side endpoint or registered IChatClient that sends the request and returns the response expected by the component. Integration is component-specific, so follow the setup instructions for the AI component you use. Keep provider credentials in server-side configuration and do not expose them in client-side code.

Integration

To integrate the Microsoft.Extensions.AI library with your AIPrompt component, register an IChatClient service and configure it according to the model you are using. The AIPrompt is designed to automatically use the registered IChatClient.

Microsoft.Extensions.AI provides a simple integration with various models where the configuration slightly differs depending on the model. You may explore examples with different models in this post.

See Also

In this article
IntegrationSee Also
Not finding the help you need?
Contact Support