RedPill
  • INTRODUCTION
    • Introduction
  • GET STARTED
    • How To Use RedPill API
      • Credits
    • RedPill Auto Router
    • Check List Models
    • Supported Models
    • API Reference
      • Create Chat Completion
      • Create Embeddings
    • Links
  • REDPILL ROUTER NETWORK
    • How to Become an API Node
      • FAQs
    • RedPill API Credits Exchange
    • Earn Effortlessly as an API Node
    • Liquid
      • Launching RedPill Liquidity Pool Rewards
        • LP Rewards
        • LP Season1
      • LP FAQs
  • Confidential AI Inference
    • Introduction
    • Get Started
    • Host LLM in TEE
    • Implementation
    • LLM in TEE Benchmark
Powered by GitBook
On this page
  • What's New with Auto Router:
  • How it works
  • How to Use
  • Benefits
  • Manual Mode vs. Smart Router
  1. GET STARTED

RedPill Auto Router

PreviousCreditsNextCheck List Models

Last updated 25 days ago

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.​

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 .

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 .

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 . 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?"
      }
    ]
  })
})

Benefits

For existing RedPill users, this update transforms how you interact with AI models in several key ways:

  1. Save Development Time - No need to spend time researching which model works best for specific tasks

  2. Reduce Costs - Optimize spending by routing to the most economical model for each task

  3. Improve Response Quality - Get better results without needing to become an expert in every model's strengths and weaknesses

  4. Future-Proof Your Implementation - As new models emerge, Smart Router incorporates them automatically

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.

✨Want to use Python or Shell instead? You can find code samples for those as well on →

✨ Try it now →

Prompt-to-Leaderboard
Chatbot Arena
Chatbot Arena leaderboard
the model detail page.
Explore redpill/auto on RedPill