RedPill Auto Router
Last updated
Last updated
RedPill's Auto Router is an intelligent routing system that automatically selects the most suitable AI model for a given task. By analyzing the input prompt, it determines the optimal model based on factors like task type, accuracy requirements, and cost-efficiency.
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.
Our routing system is powered by a P2L (Prompt-to-Leaderboard) model. This approach is inspired by the paper .
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 .
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.
As of April 2025, Gemini-2.5-Pro ranks highest on the . 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.
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:
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:
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
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
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.
✨Want to use Python or Shell instead? You can find code samples for those as well on →
✨ Try it now →