Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
.NET library for the OpenAI service API by Betalgo Ranul
| Date | Stars |
|---|---|
| 2026-07-24 | 3015 |
| 2026-07-25 | 3015 |
| 2026-07-28 | 3016 |
| 2026-07-30 | 3016 |
| 2026-08-06 | 3016 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day

## Overview
A .NET Library for accessing OpenAI's API, provided as a community library. This Library allows you to integrate OpenAI's capabilities into your .NET applications with ease.
⭐ We appreciate your star, it helps! 
#### Community Links
- [](https://discord.gg/gfgHsWnGxy) Please come and help us build the .NET AI community
- [](https://www.reddit.com/r/BetalgoDevelopers)
- [](https://github.com/betalgo/openai/discussions)
### Install Packages
#### Core Library
⚠️ We now have new PackageId and new Namespace. ⚠️
⚠️ `Betalgo.OpenAI` is now `Betalgo.Ranul.OpenAI` ⚠️
[](https://www.nuget.org/packages/Betalgo.Ranul.OpenAI/)
```shell
Install-Package Betalgo.Ranul.OpenAI
```
#### Experimental Utilities Library
[](https://www.nuget.org/packages/Betalgo.OpenAI.Utilities/)
```shell
Install-Package Betalgo.OpenAI.Utilities
```
## Documentation and Links
- [Realtime API](https://github.com/betalgo/openai/wiki/realtime) ✨NEW
- [Wiki Page](https://github.com/betalgo/openai/wiki)
- [Feature Availability Table](https://github.com/betalgo/openai/wiki/Feature-Availability)
- [Change Logs](https://github.com/betalgo/openai/wiki/Change-Logs)
- [Migration Guide for Breaking Changes](https://github.com/betalgo/openai/wiki/Migration-Guides-for-breaking-changes)
- [Contracts Upgrade Guide (9.2.0)](https://github.com/betalgo/openai/wiki/Contracts-Project:-Introduction-and-Upgrade-Guide)
---
## Acknowledgements
Maintenance of this project is made possible by all the bug reporters, [contributors](https://github.com/betalgo/openai/graphs/contributors), and [sponsors](https://github.com/sponsors/kayhantolga).
💖 Sponsors:
[@betalgo](https://github.com/betalgo), [Laser Cat Eyes](https://lasercateyes.com/)
[@tylerje](https://github.com/tylerje), [@oferavnery](https://github.com/oferavnery), [@MayDay-wpf](https://github.com/MayDay-wpf), [@AnukarOP](https://github.com/AnukarOP), [@Removable](https://github.com/Removable), [@Scar11](https://github.com/Scar11)
---
## Sample Usage
The repository contains a sample project named **OpenAI.Playground** to help you understand how the library works. However, please exercise caution while experimenting, as some test methods may result in unintended consequences such as file deletion or fine-tuning.
*!! It is highly recommended that you use a separate account instead of your primary account while using the playground. Some test methods may add or delete your files and models, potentially causing unwanted issues. !!*
Your API Key can be obtained from here: https://platform.openai.com/account/api-keys
Your Organization ID can be found here: https://platform.openai.com/account/org-settings
### Without Using Dependency Injection
```csharp
var openAIService = new OpenAIService(new OpenAIOptions()
{
ApiKey = Environment.GetEnvironmentVariable("MY_OPEN_AI_API_KEY")
});
```
### Using Dependency Injection
#### secrets.json
```json
"OpenAIServiceOptions": {
"ApiKey": "Your api key goes here",
"Organization": "Your Organization Id goes here (optional)",
"UseBeta": "true/false (optional)"
}
```
*(To use [user secrets](https://docs.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-6.0&tabs=windows): Right-click your project name in "Solution Explorer", then click "Manage User Secrets". This is a good way to keep your API keys secure.)*
#### ProgramExcerpt of 8,770 characters
Read on GitHub736
13
13
10
9
9
7
7
6
6
6
Stephen Toub · Microsoft · Morocco
6
Giannis Spentzas
5
4
4
Davide Musumeci · Italy
4
4
4
4
4
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:945c81361b74084c, topic:chatgpt, readme:playground
matched fp:945c81361b74084c, topic:whisper