OpenAI .NET
The official .NET library for the OpenAI API
...It provides strongly typed clients across API areas (chat, audio, images, embeddings, moderations, batches, files, models, vector stores, responses, realtime, assistants) and works with .NET Standard 2.0 while the examples use .NET 8. You install it via NuGet and authenticate with an API key, ideally through environment variables or configuration rather than hardcoding. Every synchronous method has an async counterpart, and the library offers convenient streaming primitives for chat completions so you can process tokens as they arrive. It supports tool/function calling, structured outputs via JSON schema, audio input/output, image generation, embeddings, Whisper transcription, and assistants with retrieval augmented generation.