InfinityRouter Documentation
One API key for every major AI model. Switch your endpoint URL to get automatic backups when providers go down and save up to 70% on Claude models.
What is InfinityRouter?
InfinityRouter is a smart router for AI models. Instead of juggling separate accounts, cards, and rate limits across OpenAI, Anthropic, Google, and DeepSeek, you use one single API key and URL:
https://infinityrouter.qd.je/v1/chat/completions
Behind the scenes, we automatically find the cheapest working provider for your model, stream tokens back instantly, and deduct only the exact tokens you used with zero monthly fees.
Core Features
- Works with any OpenAI SDK: No new SDKs to learn. Works right away with Python, Node.js, LangChain, and Vercel AI SDK.
- Claude models up to 70% cheaper: Get Claude 3.5 Sonnet, Claude Opus 5, and other top models at massive discounts.
- Automatic backup routing: If an AI provider has an outage or rate-limits you, we instantly retry on another provider so your app never breaks.
- Real-time token billing: Pay only for the words and tokens you actually receive. If you cancel a response midway, billing stops on the spot.
Explore Tutorials and Guides
Quickstart
Get an API key, top up test credits, and make your first completion call.
TutorialPython & LangChain
Build streaming chat apps and structured tool calling with Python.
TutorialTypeScript & Next.js
Integrate with Vercel AI SDK and Node.js with end-to-end type safety.
MigrationMigrate to 70% Cheaper Claude
Switch from Anthropic Direct API in 2 minutes without rewriting prompts.
Deep DiveStreaming & SSE
Learn how live token streaming and early disconnect handling work.
GuideFunction & Tool Calling
Define JSON schemas and execute multi-turn agentic workflows.