PYTHON 3.12+ ASYNC AI GATEWAY • ZERO HEAVY SDKs

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.

Explore Documentation
0Heavy SDK Deps
2,000+tok/s (Cerebras CS-3)
670+Models Discovered
100%Free-First 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.

PRIORITY 1: 100% FREE ZERO-COST TIERSAuto-Failover on Rate-Limit (429) / Timeout
#1
Gemini Free
1M Context • AI Studio
#2
Groq LPU
gpt-oss-120b • 30 RPM
#3
Cerebras
CS-3 Engine • 2k tok/s
#4
Nvidia NIM
1,000 GPU Credits
#5
OpenRouter
19 Free Models Live
#6
OrcaRouter
Qwen & DeepSeek Free
#7
Cohere
Command R+ Trial
#8
Mistral
Codestral & Small
PRIORITY 2: ULTRA-LOW-COST PAID BACKUP TIERSSeamless 0-downtime safety net
DeepSeek V3 / R1
$0.27 / 1M tokens • Real-time USD Balance Tracking
Backup #1
Google Gemini Pro
Gemini 3.1 Pro • Enterprise GCP Pay-as-you-go
Backup #2
# 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

ProviderIdentifierTierDefault ModelFree Quota / Highlights
Cerebras"cerebras"Freegpt-oss-120b2,000+ tok/s • 30 RPM / 60k TPM
Google Gemini Free"gemini_free"Freegemini-3.5-flash-liteAuto-Rotation (11 Models) • 15 RPM / 500 RPD
Groq"groq"Freeopenai/gpt-oss-120bLPU Ultra-Fast • 30 RPM / 14.4k RPD
Nvidia NIM"nvidia_free"Freemeta/llama-3.1-8b-instruct1,000 Free GPU Credits (NGC)
OpenRouter"openrouter"Free / Paidopenrouter/free19 Free Models + 390 Commercial
OrcaRouter"orcarouter"Free / Paidqwen/qwen3.8-27b-freeZero-Margin Gateway • Qwen 3.8 Vision • Free Models (-free)
Cohere"cohere"Free Trialcommand-r-plus-08-2024Command R+ & Aya Vision
Mistral AI"mistral"Free / Paidmistral-small-latestCodestral, Pixtral & Small
DeepSeek"deepseek"Ultra-Low Paiddeepseek-chat$0.27 / 1M tokens • Real-time Balance
Google Gemini Pro"gemini_pro"Paidgemini-3.1-pro-previewGCP Enterprise Pay-as-you-go

Ready to streamline your AI pipeline?

Install nexusai-client now or dive into our comprehensive documentation.