One Unified Client.
10 AI Providers. Zero Bloat.
Stop installing 10 separate heavyweight SDKs. Unify Cerebras, Cohere, DeepSeek, Google Gemini, Groq, Mistral, Nvidia NIM, OpenRouter, and OrcaRouter behind a strictly-typed, asynchronous interface with zero-cost failover.
Resilience Architecture
Zero-Cost-First Smart Routing
Leverage high-throughput free tiers first. If rate-limited (HTTP 429) or experiencing latency, NexusAI-Client automatically fails over down the chain without breaking your app.
# 1-Line Zero-Cost Smart Failover (Free Tiers -> Paid Backup)
import asyncio
from nexusai_client import AIGateway
async def main():
# Discovers active keys in .env & tries: Gemini Free -> Groq -> Cerebras -> Paid
async with AIGateway.auto_fallback() as client:
response = await client.generate_text(
"Explain quantum computing in 2 sentences."
)
print(f"Served by [{response.provider}] with zero downtime:")
print(response.text)
if __name__ == "__main__":
asyncio.run(main())Core Capabilities
Engineered for Production Resilience
Universal Tool Calling
Equip AI agents with callable Python functions. Standard schema translated automatically to OpenAI format, Gemini functionDeclarations, and Cohere V2 tools.
Smart Auto-Failover
Dynamically reads active .env keys and fails over instantly from Free Tiers to Paid Backups with a single async call.
Hardware Accelerators
Tap into Cerebras CS-3 wafer engines (2,000+ tok/s) and Groq LPU inference for instantaneous response times.
Zero Heavy SDKs
Powered exclusively by httpx and python-dotenv. No bulky vendor SDK conflicts or slow import times.
Multimodal Vision
Pass local file paths, web image URLs, or raw bytes into analyze_image() with automatic vision model selection.
Live Quota & Balances
Inspect real-time USD balances, NGC credits, and rate limits (RPM, TPM, RPD) directly from Python.
Provider Ecosystem
Supported AI Providers Matrix
| Provider | Identifier | Tier | Default Model | Free Quota / Highlights |
|---|---|---|---|---|
| Cerebras | "cerebras" | Free | gpt-oss-120b | 2,000+ tok/s • 30 RPM / 60k TPM |
| Google Gemini Free | "gemini_free" | Free | gemini-3.5-flash-lite | Auto-Rotation (11 Models) • 15 RPM / 500 RPD |
| Groq | "groq" | Free | openai/gpt-oss-120b | LPU Ultra-Fast • 30 RPM / 14.4k RPD |
| Nvidia NIM | "nvidia_free" | Free | meta/llama-3.1-8b-instruct | 1,000 Free GPU Credits (NGC) |
| OpenRouter | "openrouter" | Free / Paid | openrouter/free | 19 Free Models + 390 Commercial |
| OrcaRouter | "orcarouter" | Free / Paid | qwen/qwen3.8-27b-free | Zero-Margin Gateway • Qwen 3.8 Vision • Free Models (-free) |
| Cohere | "cohere" | Free Trial | command-r-plus-08-2024 | Command R+ & Aya Vision |
| Mistral AI | "mistral" | Free / Paid | mistral-small-latest | Codestral, Pixtral & Small |
| DeepSeek | "deepseek" | Ultra-Low Paid | deepseek-chat | $0.27 / 1M tokens • Real-time Balance |
| Google Gemini Pro | "gemini_pro" | Paid | gemini-3.1-pro-preview | GCP Enterprise Pay-as-you-go |
Ready to streamline your AI pipeline?
Install nexusai-client now or dive into our comprehensive documentation.