Menu

1 / 4

Deploy an Azure OpenAI Model in Microsoft Foundry and Call It from .NET

DEV Community: azure·Lukas Walter·10 days ago
#W5W2mMWX
#devtoazure#devto#dev#foundry#deployment
Long article (1802 words) — no AI summary yet.
Reading 0:00
15s threshold

This walkthrough deploys gpt-5.4-mini in Microsoft Foundry and calls it from a single C# file. Azure hosts the model, while the .NET app runs locally and sends a support ticket to the deployment for a one-sentence summary.

I used North Europe and an API key for this example. The call uses the OpenAI v1 Chat Completions API through IChatClient .

What you need

You need an Azure subscription with permission to create a Foundry resource, deploy a model, and retrieve its resource key. Install the .NET 11 SDK on the machine where you will run the C# file.

Check the SDK in your terminal:

dotnet --version

Enter fullscreen mode

Exit fullscreen mode

The sample targets SDK 11.0.100 and pins OpenAI 2.15.0 and Microsoft.Extensions.AI.OpenAI 11.0.1 in the file. There is no need to create a .csproj .

Both the playground and the local app make billable requests to the model.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.