azure-ai-openai-dotnet
Azure OpenAI SDK for .NET. Client library for Azure OpenAI and OpenAI services. Use for chat completions, embeddings, image generation, audio transcription, and assistants.
npx skills add sickn33/agentic-awesome-skills --skill azure-ai-openai-dotnet --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Azure.AI.OpenAI (.NET) Client library for Azure OpenAI Service providing access to OpenAI models including GPT-4, GPT-4o, embeddings, DALL-E, and Whisper. ## Installation ```bash dotnet add package Azure.AI.OpenAI # For OpenAI (non-Azure) compatibility dotnet add package OpenAI ``` **Current Version**: 2.1.0 (stable) ## Environment Variables ```bash AZURE_OPENAI_ENDPOINT=https://<resource-name>.openai.azure.com AZURE_OPENAI_API_KEY=<api-key> # For key-based auth AZURE_OPENAI_DEPLOYMENT_NAME=gpt-4o-mini # Your deployment name ``` ## Client Hierarchy ``` AzureOpenAIClient (top-level) ├── GetChatClient(deploymentName) → ChatClient ├── GetEmbeddingClient(deploymentName) → EmbeddingClient ├── GetImageClient(deploymentName) → ImageClient ├── GetAudioClient(deploymentName) → AudioClient └── GetAssistantClient() → AssistantClient ``` ## Authentication ### API Key Authentication ```csharp using Azure; using Azure.AI.OpenAI; AzureOpenAIClient client = new( new Uri(Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT")!), new AzureKeyCredential(Environment.GetEnvironmentVariable("AZURE_OPENAI_API_KEY")!)); ``` ### Microsoft Entra ID (Recommended for Production) ```csharp using Azure.Id
- Installation
- Environment Variables
- Client Hierarchy
- Authentication
- API Key Authentication
- Microsoft Entra ID (Recommended for Production)
- Using OpenAI SDK Directly with Azure
- Chat Completions
- Basic Chat
- Async Chat
- Streaming Chat
- Chat with Options
- Multi-turn Conversation
- Structured Outputs (JSON Schema)
dotnet add package Azure.AI.OpenAI For OpenAI (non-Azure) compatibility dotnet add package OpenAI
What does the azure-ai-openai-dotnet skill do?
Azure OpenAI SDK for .NET. Client library for Azure OpenAI and OpenAI services. Use for chat completions, embeddings, image generation, audio transcription, and assistants.
How do I install it?
Run `npx skills add sickn33/agentic-awesome-skills --skill azure-ai-openai-dotnet --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.