Smart Router: AI that picks the right AI for your task

Great news for the RedPill community! If you've been using our unified API access to top AI models, you're in for a serious upgrade. We've just launched our Smart Router feature, taking RedPill from a simple API aggregator to an intelligent optimization engine for all your AI needs.
Beyond API Gateway: Now with Smart Routing
Many of you joined RedPill for our unified access to 200+ AI models through a single, consistent API. While that convenience eliminated the hassle of managing multiple integrations, our new Auto Router takes things to a whole new level.
What's New with Auto Router:
- Automated Model Selection - No more manually choosing which model to use for each task. Smart Router automatically selects the optimal model based on your specific requirements.
- Cost Optimization - Automatically routes to the most cost-effective model that meets your quality needs.
- Accuracy Targeting - For complex tasks requiring precision, your requests get routed to the most capable models.
How it works
Our routing system is powered by a P2L (Prompt-to-Leaderboard) model. This approach is inspired by the paper Prompt-to-Leaderboard.
What is P2L?
P2L stands for Prompt-to-Leaderboard. It maps a natural language prompt to a Bradley-Terry score vector, which reflects predicted human preferences across different LLMs.
Given a prompt, P2L predicts which model is most likely to win in a head-to-head human evaluation.
This lets us build prompt-specific leaderboards, capturing nuanced differences in model behavior — something that traditional average rankings often overlook.
The P2L model is trained on human preference data collected from pairwise comparisons in the Chatbot Arena.
P2L also enables cost-aware routing by solving a constrained optimization problem that picks the best-performing model within a given cost budget. This allows us to deploy strong models when needed, and save resources on easier prompts without sacrificing overall performance.
Why Not Just Use the Top Model?
As of April 2025, Gemini-2.5-Pro ranks highest on the Chatbot Arena leaderboard. But that doesn’t mean it’s the best for every prompt.
For math or instruction-following tasks, Claude or Qwen may outperform. P2L allows us to make per-prompt decisions based on learned preferences — which is far more flexible and cost-efficient.
How to Use
Using Smart Router is as simple as selecting the right model name — no additional setup or configuration is required.
To enable it, simply set your API request’s model
field to:
"model": "redpill/auto",
That’s it — the Smart Router takes over from there.
It automatically chooses the best model based on task type, accuracy, and cost-efficiency. The model pool includes GPT-4o, Claude 3.5 Sonnet, DeepSeek R1, LLaMA 3, and many others.

Example Request:
fetch("https://api.redpill.ai/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": "Bearer <YOUR-REDPILL-API-KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "redpill/auto",
"messages": [
{
"role": "user",
"content": "What is the meaning of life?"
}
]
})
})
✨Want to use Python or Shell instead? You can find code samples for those as well on the model detail page. →
Here's a quick demo of how to use Smart Router in action:

✨ Try it now → Explore redpill/auto on RedPill
Why This Update Changes Everything
For existing RedPill users, this update transforms how you interact with AI models in several key ways:
- Save Development Time - No need to spend time researching which model works best for specific tasks
- Reduce Costs - Optimize spending by routing to the most economical model for each task
- Improve Response Quality - Get better results without needing to become an expert in every model's strengths and weaknesses
- Future-Proof Your Implementation - As new models emerge, Smart Router incorporates them automatically
Real-World Applications
Smart Router is already transforming how developers approach AI integration:
For AI Assistants & Agents
Instead of being locked into a single model, virtual assistants can now dynamically switch between models based on the task at hand – using a cost-effective model for simple queries and seamlessly upgrading to more powerful models for complex reasoning.
For Enterprise AI Workflows
Large organizations with diverse AI needs no longer need separate integrations for each provider. Smart Router offers a single integration point with intelligent cost optimization built-in.
For AI Research & Experimentation
Researchers and developers can test ideas across multiple models without managing separate API keys and endpoints for each provider.
For Web3 & Decentralized AI
Build censorship-resistant, open AI solutions with automatic model selection for reliability and performance.
Manual Mode vs. Smart Router

Manual Mode (Developer Control)
- Ideal for developers who prefer full control over model selection
- Specify exactly which model to use for each request (e.g.,
model=deepseek-r1
)
- Perfect when you know precisely which model you need
Smart Router Mode (Automated Optimization)
- Let the system automatically select the best model based on your requirements
- System dominates model selection based on real-time performance, cost & query type
- Just specify your optimization preference and let Smart Router do the rest
You can easily switch between these modes at any time, giving you the perfect balance of control and convenience.
The RedPill Advantage Keeps Growing
This upgrade represents our continued commitment to democratizing access to top AI models. With the addition of Smart Router, RedPill now offers:
- Unified API for 200+ models (the feature you already know and love)
- Smart Routing for automatic optimization
- Confidential AI Inference for verifiable, secure AI interactions
- Flexible Payment Options including pay-as-you-go and credit systems
- API Node Provider Program for monetizing your existing API keys
Getting Started with Smart Router
For existing users, Smart Router is available immediately with no changes needed to your account. Simply update your API calls to use the new optimization parameters.
New to RedPill? Head to red-pill.ai to create your API key and experience the most intelligent way to access AI models.
Want to learn more about optimizing your AI workflows? Check out our upcoming blog posts on model performance comparisons and cost-saving tips with Smart Router!