| # | Time | Original | Routed To | Complexity | CO₂ Saved | $ Saved |
|---|---|---|---|---|---|---|
| No requests yet. Use the Test API button to try it out! | ||||||
// Before (OpenAI direct):
const response = await fetch('https://api.openai.com/v1/chat/completions', {
headers: { 'Authorization': 'Bearer sk-...' },
body: JSON.stringify({ model: 'gpt-4', messages: [...] })
});
// After (EcoRouter — just change the URL):
const response = await fetch('{YOUR_ECOROUTER_URL}/v1/chat/completions', {
headers: { 'Authorization': 'Bearer eco-demo-key-2026' },
body: JSON.stringify({ messages: [...] }) // model is auto-selected!
});