Multi-Provider Migration Guide

Consolidate multiple LLM providers into ParrotRouter. Simplify your stack, reduce costs, and improve reliability with a single unified API.

From Chaos to Clarity

Before: Multiple Providers

// OpenAI for GPT-4
const openai = new OpenAI({ apiKey: KEY1 });

// Anthropic for Claude
const anthropic = new Anthropic({ apiKey: KEY2 });

// Google for Gemini
const genAI = new GoogleGenerativeAI(KEY3);

// Cohere for embeddings
const cohere = new CohereClient({ apiKey: KEY4 });

// Complex routing logic
if (needsReasoning) {
  response = await anthropic.messages.create(...);
} else if (needsSpeed) {
  response = await openai.chat.completions.create(...);
} else if (needsVision) {
  response = await genAI.generateContent(...);
}

After: ParrotRouter

// One client for everything
const client = new OpenAI({
  apiKey: 'YOUR_PARROTROUTER_KEY',
  baseURL: 'https://api.parrotrouter.com/v1'
});

// Use any model with the same interface
response = await client.chat.completions.create({
  model: 'claude-3-opus-20240229', // or 'gpt-4' or 'gemini-1.5-pro'
  messages: [{ role: 'user', content: prompt }]
});

// ParrotRouter handles:
// ✓ Automatic routing
// ✓ Failover
// ✓ Load balancing
// ✓ Cost optimization
Cost Savings
65%

Average reduction in LLM costs through intelligent routing

Simplified Billing
1

Single invoice instead of managing multiple providers

Better Uptime
99.99%

Availability through automatic failover

References
  1. [1] OpenAI. "Migration Guide" (2024)
  2. [2] Anthropic. "Migrating to Claude" (2024)
  3. [3] LangChain. "Provider Adapters" (2024)