# AISuite — Unified Interface to Multiple Generative AI Providers > AISuite provides a simple, consistent Python API for calling large language models from OpenAI, Anthropic, Google, Mistral, and other providers. Switch between models by changing a single string parameter without rewriting application logic. ## Install Save as a script file and run: # AISuite — Unified Interface to Multiple Generative AI Providers ## Quick Use ```bash pip install aisuite ``` ```python import aisuite as ai client = ai.Client() messages = [{"role": "user", "content": "Explain quantum computing in one sentence."}] response = client.chat.completions.create(model="openai:gpt-4o", messages=messages) # Switch provider by changing the model string: "anthropic:claude-sonnet-4-20250514", "google:gemini-pro" ``` ## Introduction AISuite is a lightweight Python library created by Andrew Ng that standardizes the interface for calling generative AI models across multiple providers. It follows the OpenAI chat completions API pattern, making it trivial to swap providers during development, testing, or production without altering application code. ## What AISuite Does - Provides a unified chat completions API across OpenAI, Anthropic, Google, AWS Bedrock, Mistral, and more - Uses a provider:model string format for instant model switching - Handles provider-specific authentication and request formatting transparently - Supports streaming responses and function calling where providers allow - Maintains minimal dependencies to avoid version conflicts ## Architecture Overview AISuite implements a thin adapter layer where each AI provider has a corresponding provider class that translates the unified API calls into provider-specific HTTP requests. The Client object routes requests based on the provider prefix in the model string, loads credentials from environment variables, and returns responses in a normalized format matching the OpenAI response schema. ## Self-Hosting & Configuration - Install via pip with optional provider extras: pip install aisuite[anthropic] - Set API keys as environment variables (OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.) - Configure custom base URLs for self-hosted or proxy endpoints - No server component needed; runs entirely as a client library - Compatible with Python 3.9+ and integrates with existing async frameworks ## Key Features - Single import replaces multiple provider SDKs in your codebase - Provider:model string notation makes A/B testing across models straightforward - Automatic retry and error handling with provider-specific rate limit awareness - Extensible provider system for adding custom or local LLM endpoints - Lightweight with no heavy ML framework dependencies ## Comparison with Similar Tools - **LiteLLM** — more comprehensive proxy server with 100+ model support; AISuite is lighter and library-only - **LangChain** — full application framework with agents and chains; AISuite focuses solely on the model call interface - **OpenRouter** — hosted routing service; AISuite runs locally without external dependencies - **Portkey** — enterprise gateway with caching and fallbacks; AISuite is a simpler client-side abstraction ## FAQ **Q: Does AISuite add latency to API calls?** A: No, it adds negligible overhead since it only translates parameters and passes through to the provider SDK or HTTP client. **Q: Can I use it with local models like Ollama?** A: Yes, AISuite supports custom endpoints so you can point it at any OpenAI-compatible API server. **Q: Is streaming supported for all providers?** A: Streaming is supported where the underlying provider API offers it. Check provider-specific documentation for availability. **Q: Who maintains AISuite?** A: The project was created by Andrew Ng and is maintained as an open-source community project. ## Sources - https://github.com/andrewyng/aisuite - https://pypi.org/project/aisuite/ --- Source: https://tokrepo.com/en/workflows/asset-f992e8bc Author: Script Depot