AI Helper Library

A modern, multi-provider C# SDK for OpenAI and Anthropic APIs

Why Choose AI Helper Library?

Built for production with enterprise-grade features and developer-friendly APIs

Multi-Provider Support

Seamlessly switch between OpenAI and Anthropic APIs with a unified interface. No vendor lock-in.

  • ✓ OpenAI GPT-3.5, GPT-4, GPT-4o, O-series
  • ✓ Anthropic Claude 3.x, 3.5, 3.7 models
  • ✓ Automatic model-specific handling

Production Ready

Built-in retry logic, error handling, and robust configuration for enterprise applications.

  • ✓ Automatic retry with exponential backoff
  • ✓ Comprehensive error handling
  • ✓ Proxy and custom headers support

Developer Friendly

Simple integration with .NET applications. Clean APIs, comprehensive documentation.

  • ✓ Single NuGet package installation
  • ✓ Dependency injection ready
  • ✓ Async/await support throughout

Simple. Powerful. Elegant.

Get started with just a few lines of code

Quick Setup

// Configure your AI client
var config = new OpenAIConfiguration
{
    DefaultModel = OpenAIModel.GPT_4o,
    MaxTokens = 500,
    Temperature = 0.7
};

var client = factory.CreateClient(apiKey, config);

Generate Response

// Simple text generation
var response = await client.GenerateTextAsync(
    "Explain quantum computing simply"
);

// Multi-turn conversations
var chatResponse = await client.GenerateChatResponseAsync(
    "session-1", 
    "What's the weather like?",
    "You are a helpful assistant"
);

Key Benefits

Type-Safe Configuration

Strongly-typed settings with IntelliSense support

Unified API

Same interface for all AI providers

Enterprise Features

Retry logic, logging, and error handling built-in

2+
AI Providers
15+
AI Models
100%
Type Safe
MIT
License

Ready to Get Started?

Try the interactive demo or install the package and start building AI-powered applications today.

An unhandled error has occurred. Reload 🗙