finds.dev

betalgo/openai

.NET library for the OpenAI service API by Betalgo Ranul

View on GitHubHomepage ↗

★ 3,008C#MITupdated Mar 2026

// the take

A community-maintained .NET SDK for the OpenAI API, predating OpenAI's own official C# library. It covers the full API surface including chat, assistants, images, audio, embeddings, and the Realtime API. Aimed at .NET developers who want OpenAI integration with DI-friendly setup and don't want to roll their own HTTP client.

DI integration is first-class — `AddOpenAIService()` works cleanly with the standard `IServiceCollection` pattern. Broad API coverage including Realtime, batch, fine-tuning, and vector stores, which the official SDK lagged on for a while. The new Contracts project (`Betalgo.Ranul.OpenAI.Contracts`) separates request/response models from the implementation, which is the right call for library design. The openapi-split directory suggests they're generating types from the official OpenAI spec rather than hand-authoring them, which keeps the models accurate.

OpenAI now ships its own official C# SDK, which makes this library's long-term value proposition unclear — you're betting on a community maintainer keeping pace with a vendor who controls the spec. The package rename from `Betalgo.OpenAI` to `Betalgo.Ranul.OpenAI` mid-project is a breaking namespace change that will cause pain in existing codebases. The README explicitly warns that many methods are untested and undocumented, which is an honest but alarming admission for a library wrapping a paid API where silent failures cost money. The Contracts migration is still partial as of 9.2.0, meaning the codebase is in a transitional state with both old and new model types in play simultaneously.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
3,008
Forks
540
Language
C#
License
MIT
Last commit
21 Mar 2026

// nearby

If openai isn't quite it.

All repos →