Run an AI model in Blazor with no server and no API key A developer published a Blazor WebAssembly example that runs MobileNetV2 image classification entirely in the browser from C#, with no server and no API key. The demo uses SpawnDev.ILGPU.ML to execute the 14 MB ONNX model on the GPU via WebGPU, falling back to WebGL and then WebAssembly, and streams the model through ModelHub into browser storage rather than .NET memory — cutting allocation during load from 82–97 MB with HttpClient to 2.9 MB. Photos are decoded by the browser and their pixels passed to the GPU without being uploaded or copied into .NET arrays. Live demo https://lostbeard.github.io/SpawnDev.Examples/ImageAI/ | Full example on GitHub https://github.com/LostBeard/SpawnDev.Examples/tree/main/ImageAI Adding AI to an app often means an account, an API key, a bill for every request, and sending your users' data to someone else's server. For many jobs you need none of that. A small model can run on the visitor's own device, in the browser, from C . We will build a page that names what is in a photo. The photo is never uploaded. You need the .NET 10 SDK and a browser. A model is a file. This one is MobileNetV2, a 14 MB image recognition network from the ONNX Model Zoo Apache-2.0 . It knows 1,000 kinds of things, from dog breeds to kitchen tools. SpawnDev.ILGPU.ML reads the file and runs it on the GPU. It uses WebGPU when the browser has it, then WebGL, then WebAssembly. dotnet new blazorwasm -o ImageAI --empty cd ImageAI dotnet add package SpawnDev.ILGPU.ML dotnet add package SpawnDev.SpawnJS dotnet add package SpawnDev.SpawnJS.Blazor Download mobilenetv2-7.onnx https://huggingface.co/onnxmodelzoo/mobilenetv2-7/resolve/main/mobilenetv2-7.onnx into wwwroot . For the sample buttons, also save red-panda.jpg https://github.com/LostBeard/SpawnDev.Examples/blob/main/ImageAI/wwwroot/red-panda.jpg and labrador.jpg https://github.com/LostBeard/SpawnDev.Examples/blob/main/ImageAI/wwwroot/labrador.jpg there. Replace Program.cs : using ImageAI; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; using SpawnDev.SpawnJS; var builder = WebAssemblyHostBuilder.CreateDefault args ; builder.RootComponents.Add