# openai/openai-dotnet

The official .NET library for the OpenAI API

Repository: https://github.com/openai/openai-dotnet
Canonical: https://ross.abutalabs.com/products/openai-dotnet
Homepage: https://www.nuget.org/packages/OpenAI
Language: C#
License: MIT
License Family: permissive
Topics: csharp, dotnet, openai
Last push: 2026-08-26T21:55:49+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 85, longevity 61
- inputs: {"age_days": 860, "days_push": 7, "days_rel": 23, "gap_med": 32.0, "n_releases_24m": 15}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2674, forks 414 (observed 2026-08-28T04:07:09.684618+00:00)

## What it is
The official .NET library for accessing the OpenAI REST API, generated from the OpenAPI specification in collaboration with Microsoft. It provides typed clients for chat completions, responses, embeddings, image generation, audio transcription, and assistants with RAG support.

## Use cases
- call the OpenAI API from a C# application
- stream chat completions in .NET
- generate text embeddings with dotnet
- transcribe audio using OpenAI from C#
- build RAG assistants in .NET
- use OpenAI with dependency injection in ASP.NET
- connect to Azure OpenAI from .NET

## When to choose
- you are building a .NET application that needs OpenAI models
- you want an officially supported, typed client instead of raw HTTP calls
- you need Azure OpenAI compatibility from C#

## When to avoid
- you use Python, Node.js, or another non-.NET language
- you need a provider-agnostic LLM client for multiple vendors
- you only need raw REST access and prefer a lightweight HTTP client

## Facets
- artifact type: library
- maturity: active
- function: http-client, sdk, llm-inference, rag, speech-recognition, chatbot
- domain: large-language-models, artificial-intelligence, developer-tools, apis
- platform: dotnet, cross-platform
- tags: openai, csharp, nuget, api-client, chat-completions, embeddings, azure-openai

## Member repositories
- openai/openai-dotnet (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:09.684618+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:18:04.175786+00:00, confidence not recorded.
  - readme: https://github.com/openai/openai-dotnet (fetched 2026-08-28T04:07:09.684618+00:00, sha 980cb6441e87)
  - homepage: https://www.nuget.org/packages/OpenAI (fetched 2026-08-29T10:00:34.422630+00:00, sha 4066fdae8ae0)
  - site_page: https://www.nuget.org/policies/About (fetched 2026-08-29T10:00:34.426741+00:00, sha a113b8a074c9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
