- Fully generated C# SDK based on official DeepInfra OpenAPI specification using OpenApiGenerator
- Same day update to support new features
- Updated and supported automatically if there are no breaking changes
- All modern .NET features - nullability, trimming, NativeAOT, etc.
- Support .Net Framework/.Net Standard 2.0
- Support all DeepInfra API endpoints including Object Detection, Token Classification, Image Classification, Fill Mask and more.
using var api = new DeepInfraApi("API_KEY");
string response = await api.Chat.CreateChatCompletionAsync(
messages: ["Generate five random words."],
model: CreateChatCompletionRequestModel.Gpt4oMini);
Console.WriteLine(response); // "apple, banana, cherry, date, elderberry"
var enumerable = api.Chat.CreateChatCompletionAsStreamAsync(
messages: ["Generate five random words."],
model: CreateChatCompletionRequestModel.Gpt4oMini);
await foreach (string response in enumerable)
{
Console.WriteLine(response);
}
Priority place for bugs: https://github.com/tryAGI/DeepInfra/issues
Priority place for ideas and general questions: https://github.com/tryAGI/DeepInfra/discussions
Discord: https://discord.gg/Ca2xhfBf3v