AsteroidRouter Docs
AsteroidRouter is a unified OpenAI-compatible endpoint for top AI models (GPT, Claude, Gemini, and more) at low per-token prices. Integrate once and automatically get redundancy, lowest latencies, and real-time fallbacks.
Integration Methods
CLI
Deploy, monitor, and run tests directly from the terminal. Route queries locally with minimal config.
Agents
Integrate directly with Autogen, CrewAI, LangChain, and other multi-agent libraries with instant API failovers.
VS Code extension
Leverage local autocomplete, smart suggestions, and contextual diagnostics inside VS Code without latency drops.
API
Swap the standard baseURL in any OpenAI SDK to utilize our intelligent routing algorithms instantly.
Before You Start
Generate an API Key
Log into the AsteroidRouter Console, navigate to the **API Keys** tab, and generate a new key. Be sure to copy it immediately as it will not be displayed again for security purposes.
Configure Environment Variables
Save the generated key to your environment. We recommend utilizing `.env` files for local development to prevent committing keys to source repositories.
ASTEROIDROUTER_API_KEY="sk-ar-xxxxxxxxxxxxxxxxxxxxxxxx"
Setup Fallback Models (Optional)
Configure your routing group. Set standard models (e.g. `gpt-4o`) and backup fallback chains (e.g. `claude-3-5-sonnet`) to guarantee 100% uptime even during upstream provider outages.