Roulyx Docs

One API, All Models

Roulyx automatically routes your AI requests to the best model — faster, cheaper, and smarter than any single provider.

Up to 40% cost savings
Sub-second routing
Real-time analytics

How Roulyx Works

1

Your Request

Send any AI request through our unified API

2

Smart Analysis

AI analyzes complexity, cost, and speed requirements

3

Optimal Model

Routes to best LLM (GPT-4, Claude, Gemini, etc.)

4

Real-time Insights

Track usage, costs, and performance analytics

Smart Routing = Real Savings
See how Roulyx optimizes costs compared to direct provider calls

Direct OpenAI Calls

$847/month

Fixed routing to GPT-4 for all requests

With Roulyx Routing

$508/month

Intelligent model selection per request

40% Cost Reduction = $339 Saved Monthly

Examples by Use Case

Customer Support Chatbot
Fast responses optimized for speed and cost efficiency
// Chatbot - Fast responses for customer service
curl -X POST https://api.roulyx.com/v1/chat \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "How can I reset my password?",
    "model": "auto", 
    "routing_mode": "speed",
    "fallback_models": ["gpt-3.5-turbo", "claude-3-haiku"]
  }'
Document Summarization
High-quality summaries for long-form content
// Document summarization - Quality focused
curl -X POST https://api.roulyx.com/v1/chat \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Summarize this research paper: [document content]",
    "model": "auto",
    "routing_mode": "quality",
    "max_tokens": 2000
  }'
Sentiment Analysis
Balanced performance for high-volume text analysis
// Sentiment analysis - Cost optimized
curl -X POST https://api.roulyx.com/v1/chat \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Analyze sentiment: This product exceeded expectations!",
    "model": "auto",
    "routing_mode": "balanced"
  }'
Authentication
Roulyx uses API keys to authenticate requests. You can manage your API keys in your dashboard.

Include your API key in requests:

Authorization: Bearer YOUR_API_KEY
Keep your API keys secure

Never expose API keys in client-side code or public repositories.

Enhanced Error Handling
Roulyx provides developer-friendly error messages with actionable hints
{
  "error": {
    "message": "Your API key seems invalid or expired. Check your dashboard.",
    "hint": "Visit https://roulyx.ai/admin/keys to refresh it.",
    "type": "authentication_error", 
    "code": 401,
    "docs": "https://roulyx.ai/docs#authentication"
  }
}
🚀 Coming Soon
Exciting features on our roadmap
Custom routing profiles per application
Real-time model benchmarking
Fine-tuning router with user feedback
Advanced team usage analytics

Ready to optimize your AI costs?

Create your account and start building with Roulyx's intelligent API routing in minutes.