apis
757 TopicsBuilding AI Apps with the Foundry Local C# SDK
What Is Foundry Local? Foundry Local is a lightweight runtime designed to run AI models directly on user devices. It supports a wide range of hardware (CPU, GPU, NPU) and provides a consistent developer experience across platforms. The SDKs are available in multiple languages, including Python, JavaScript, Rust, and now C#. Why a C# SDK? The C# SDK brings Foundry Local into the heart of the .NET ecosystem. It allows developers to: Download and manage models locally. Run inference using OpenAI-compatible APIs. Integrate seamlessly with existing .NET applications. This means you can build intelligent apps that run offline, reduce latency, and maintain data privacy—all without sacrificing developer productivity. Bootstrap Process: How the SDK Gets You Started One of the most developer-friendly aspects of the C# SDK is its automatic bootstrap process. Here's what happens under the hood when you initialise the SDK: Service Discovery and Startup The SDK automatically locates the Foundry Local installation on the device and starts the inference service if it's not already running. Model Download and Caching If the specified model isn't already cached locally, the SDK will download the most performant model variant (e.g. GPU, CPU, NPU) for the end user's hardware from the Foundry model catalog. This ensures you're always working with the latest optimised version. Model Loading into Inference Service Once downloaded (or retrieved from cache), the model is loaded into the Foundry Local inference engine, ready to serve requests. This streamlined process means developers can go from zero to inference with just a few lines of code—no manual setup or configuration required. Leverage Your Existing AI Stack One of the most exciting aspects of the Foundry Local C# SDK is its compatibility with popular AI tools such as: OpenAI SDK - Foundry local provides an OpenAI compliant chat completions (and embedding) API meaning. If you’re already using `OpenAI` chat completions API, you can reuse your existing code with minimal changes. Semantic Kernel - Foundry Local also integrates well with Semantic Kernel, Microsoft’s open-source framework for building AI agents. You can use Foundry Local models as plugins or endpoints within Semantic Kernel workflows—enabling advanced capabilities like memory, planning, and tool calling. Quick Start Example Follow these three steps: 1. Create a new project Create a new C# project and navigate to it: dotnet new console -n hello-foundry-local cd hello-foundry-local 2. Install NuGet packages Install the following NuGet packages into your project: dotnet add package Microsoft.AI.Foundry.Local --version 0.1.0 dotnet add package OpenAI --version 2.2.0-beta.4 3. Use the OpenAI SDK with Foundry Local The following example demonstrates how to use the OpenAI SDK with Foundry Local. The code initializes the Foundry Local service, loads a model, and generates a response using the OpenAI SDK. Copy-and-paste the following code into a C# file named Program.cs: using Microsoft.AI.Foundry.Local; using OpenAI; using OpenAI.Chat; using System.ClientModel; using System.Diagnostics.Metrics; var alias = "phi-3.5-mini"; var manager = await FoundryLocalManager.StartModelAsync(aliasOrModelId: alias); var model = await manager.GetModelInfoAsync(aliasOrModelId: alias); ApiKeyCredential key = new ApiKeyCredential(manager.ApiKey); OpenAIClient client = new OpenAIClient(key, new OpenAIClientOptions { Endpoint = manager.Endpoint }); var chatClient = client.GetChatClient(model?.ModelId); var completionUpdates = chatClient.CompleteChatStreaming("Why is the sky blue'"); Console.Write($"[ASSISTANT]: "); foreach (var completionUpdate in completionUpdates) { if (completionUpdate.ContentUpdate.Count > 0) { Console.Write(completionUpdate.ContentUpdate[0].Text); } } Run the code using the following command: dotnet run Final thoughts The Foundry Local C# SDK empowers developers to build intelligent, privacy-preserving applications that run anywhere. Whether you're working on desktop, mobile, or embedded systems, this SDK offers a robust and flexible way to bring AI closer to your users. Ready to get started? Dive into the official documentation: Getting started guide C# Reference documentation You can also make contributions to the C# SDK by creating a PR on GitHub: Foundry Local on GitHub234Views0likes0CommentsAnnouncing Live Interpreter API - Now in Public Preview
Today, we’re excited to introduce Live Interpreter –a breakthrough new capability in Azure Speech Translation – that makes real-time, multilingual communication effortless. Live Interpreter continuously identifies the language being spoken without requiring you to set an input language and delivers low latency speech-to-speech translation in a natural voice that preserves the speaker’s style and tone.4.6KViews1like0CommentsThe Future of AI: Optimize Your Site for Agents - It's Cool to be a Tool
Learn how to optimize your website for AI agents like Manus using NLWeb, MCP, structured data, and agent-responsive design. Discover best practices to improve discoverability, usability, and natural language access for autonomous assistants in the evolving agentic web.1.8KViews0likes1CommentAnnouncing a new Azure AI Translator API (Public Preview)
Microsoft has launched the Azure AI Translator API (Public Preview), offering flexible translation options using either neural machine translation (NMT) or generative AI models like GPT-4o. The API supports tone, gender, and adaptive custom translation, allowing enterprises to tailor output for real-time or human-reviewed workflows. Customers can mix models in a single request and authenticate via resource key or Entra ID. LLM features require deployment in Azure AI Foundry. Pricing is based on characters (NMT) or tokens (LLMs).665Views0likes0CommentsThe Future of AI: Vibe Code with Adaptive Custom Translation
This blog explores how vibe coding—a conversational, flow-based development approach—was used to build the AdaptCT playground in Azure AI Foundry. It walks through setting up a productive coding environment with GitHub Copilot in Visual Studio Code, configuring the Copilot agent, and building a translation playground using Adaptive Custom Translation (AdaptCT). The post includes real-world code examples, architectural insights, and advanced UI patterns. It also highlights how AdaptCT fine-tunes LLM outputs using domain-specific reference sentence pairs, enabling more accurate and context-aware translations. The blog concludes with best practices for vibe coding teams and a forward-looking view of AI-augmented development paradigms.419Views0likes0CommentsWhat’s New in Azure AI Foundry Fine-tuning: August 2025
The Azure AI Foundry team continues to push the boundaries of model customization with powerful updates to its fine-tuning capabilities. August brings several new features—Pause & Resume, Cross-Region Model Copying, and Reinforcement Fine Tuning (RFT) with Swagger and API Support—designed to give developers and data scientists greater control, flexibility, and efficiency in managing their fine-tuning workflows. ⏸️ Pause & Resume: Smarter Control Over Fine-Tuning Jobs Azure AI Foundry extends the ability to pause and resume fine-tuning jobs for non-reasoning models. Earlier this year, we released this feature for reasoning models only. Pause and Resume is especially useful when training metrics aren’t converging or when you need to temporarily halt training without losing progress. Key Highlights: Available via Azure AI Foundry and REST API Jobs can be paused only if they’ve completed at least one training step and are in a Running state Pausing creates a deployable checkpoint (post safety evaluation) that can be used for inference or resumed later Supports Regional and Global Training SKUs Pausing action stops the job and billing meters 🌍 Copy Models: Seamless Cross-Region Transfer We are introducing the Copy Models feature, allowing users to transfer checkpointed models across regions and subscriptions within the same tenant—a significant advancement for teams operating in multi-region environments. Key Highlights: Available via REST API only (not supported in UI) Models copied to a destination region can be further fine-tuned and deployed independently Deleting the source model does not affect the copied model in the destination region API Endpoints: Once copied, the checkpoint can be used in a new fine-tuning job using the standard create finetune job API. 🧠 Reinforcement Fine-Tuning (RFT): API and Swagger Ready RFT is now fully API and Swagger ready, enabling users to fine-tune models using reinforcement learning techniques. Azure OpenAI supports multiple grader types including Score Model Grader, String Check Grader, Text -Similarity Grader and Multi-graders. Key Highlights: Enables model graders within multi-grader Supports fail fast by using Validate Grader API which ensures your grader configuration is correct before running a fine-tuning job Executes the grader logic on model outputs to generate scores or feedback through Run Grader API These updates mark a significant step forward in Azure AI Foundry’s commitment to providing enterprise-grade model customization tools. Whether you're optimizing training workflows or scaling models across regions, the new APIs offer the control and agility needed to build smarter AI solutions. Happy Fine-tuning 😊 Learn More with these Resource 🧠 Get Started with fine-tuning with Azure AI Foundry on Microsoft Learn Docs ▶️ Watch On-Demand: Fine-tuning and distillation with Azure AI Foundry 👩💻 Customize a model with Azure OpenAI in Azure AI Foundry Models 👋 Continue the conversation on Discord468Views0likes0CommentsAuthenticating using ConfidentialClient
Hello, Some of our customers are unable to send out automated emails because support for basic authentication with SMTP is being removed. I am looking at finding a solution and it seems the Graph API is the recommended approach. I have manage to create a working example using `PublicClientApplicationBuilder` however, this class displays a pop-up requiring the user to sign in, since we have automated services with no user interaction, this is not a good solution. I have seen some examples using `ConfidentialClientApplicationBuilder` and this seems idea. However, I have reached multiple dead-ends and everytime receive the error: > Confidential Client flows are not available on mobile platforms or on Mac.See https://aka.ms/msal-net-confidential-availability for details. Please would someone be able to help me. Why do I recieve this error? Whatever I do, whatever project I use, WinForm, Console app and Service I always get this error. I am storing my Client, Tenant and Secret in a database table and here is my code: ``` vb Private Async Function GetAppAuthentication() As Task(Of AuthenticationResult) Dim folderAccess = BLL.L2S.SystemApplicationGateway.GetFolderAccess(mBLL_SY.ReadonlyDbContext) If folderAccess Is Nothing Then Return Nothing End If Dim app = ConfidentialClientApplicationBuilder.Create(folderAccess.Client) _ .WithClientSecret(folderAccess.Secret) _ .WithTenantId(folderAccess.Tenant) _ .Build() Dim scopes As String() = {"https://outlook.office365.com/.default"} Dim result As AuthenticationResult = Await app.AcquireTokenForClient(scopes).ExecuteAsync() Return result End Function ``` I am using .Net Framework 4.7.2, we have Windows Services and WinForms apps and both need to send out emails. The error message is very confusing to me because of course it is not a mobile app, and I have even created a UnitTest that seemingly works fine which again is very confusing to me. This is urgent as this is already causing issues for our customers. Thanks in advanc25Views0likes0CommentsWhy isn't there a PowerShell module for OneDrive?
Out of all the various applications that Microsoft produce, OneDrive stands out as an anomaly. Where is the PowerShell module for managing it? Some very simple requirements by developers are simply missing. A very simple one - can I test whether OneDrive is still synchronising and therefore I have to wait before my program/script progresses so that I'm sure we've got the latest versions or won't suddenly get "Cloud provider not running". OneDrive has been around years, this really perplexes me...139Views7likes6CommentsCongratulations, Microsoft products couldn't have been worse even if you tried.
I was thinking why should I bother posting about this, who would read it, and would it make Microsoft any better if someone reads this? But the world would never improve if no one reports this kind of bad design. So here we go. Why make it so hard to sign up for Azure, register an app, set up permissions, register an app in the MDN (whatever the F it stands for), just to be able to connect to build an ETL job that pulls from multi-tenant onedrive. Why so much text everywhere that it becomes unreasonable to read and find information that matters. Why pretend you have an AI called Copilot when it doesn't have access to data and all it does is spit back information from the docs. How to fix this? Put yourself in the shoes of someone new who's integrating Microsoft products for the first time. No assumptions. No required prior knowledge. Less text, straight to the point. No weird error messages with complicated Error IDs. If no one understands them, why bother bloat the limited screen space with it? Why not have an actual AI that can give concrete pointers instead of showing a link to a generic documentation page? This could go on, but I'm gonna practice what I preach and get straight to the point with the suggestions above. The only moat Microsoft has is the heavy corporate contracts that bind stupid corporations to use Microsoft products and services. The moment a new provider with simpler/faster/cheaper services shows up, developers and people working day-to-day with Microsoft services will gladly migrate over. My 2-cent bottle in the sea.145Views4likes2Comments[DevOps] dps.sentinel.azure.com no longer responds
Hello, Ive been using Repository connections in sentinel to a central DevOps for almost two years now. Today i got my first automated email on error for a webhook related to my last commit from the central repo to my Sentinel intances. Its a webhook that is automticly created in connections that are made the last year (the once from 2 years ago dont have this webhook automaticly created). The hook is found in devops -> service hooks -> webhooks "run state change" for each connected sentinel However, after todays run (which was successfull, all content deployed) this hook generates alerts. It says it cant reach: (EU in my case) eu.prod.dps.sentinel.azure.com full url: https://eu.prod.dps.sentinel.azure.com/webhooks/ado/workspaces/[REDACTED]/sourceControls/[REDACTED] So, what happened to this domain? why is it no longer responding and when was it going offline? I THINK this is the hook that sets the status under Sentinel -> Repositories in the GUI. this success status in screenshoot is from 2025/02/06, no new success has been registered in the receiving Sentinel instance. For the Sentinel that is 2 year old and dont have a hook in my DevOps that last deployment status says "Unknown" - so im fairly sure thats what the webhook is doing. So a second question would be, how can i set up a new webhook ? (it want ID and password of the "Azure Sentinel Content Deployment App" - i will never know that password....) so i cant manually add ieather (if the URL ever comes back online or if a new one exists?). please let me know.80Views0likes1Comment