You're overpaying
No smart routing means every prompt hits GPT-4. 40% of requests could go to lower-cost models with zero quality loss.
Route 26 models across 7 providers. Block prompt injections and data leaks. Audit every AI request. Change one line of code.
Most teams bolt LLM calls into their apps with no routing, no security, and no visibility.
No smart routing means every prompt hits GPT-4. 40% of requests could go to lower-cost models with zero quality loss.
No audit trail for employee AI usage. No idea what data is being shared with third-party models.
No injection detection. No DLP. One prompt away from a data breach that leaks your system prompt or API keys.
A single edge layer between your app and every LLM provider.
Every prompt is scanned for 30+ injection patterns and sensitive data (SSNs, API keys, source code) before it leaves the edge. Malicious requests are blocked in <1ms.
Prompts are classified into 9 tiers by complexity and content type. Specialized tasks route to specialized models: OCR to Mistral OCR (not GPT-4o), image generation to FLUX.1 via Together AI (not just DALL-E), code to DeepSeek Coder, reasoning to Claude Opus 4 -- all automatically based on your cost, speed, and quality preferences.
Identical or semantically similar prompts are served from Fastly's edge cache. Average 30% cache hit rate eliminates repeat LLM spend entirely.
Every request is logged with provider, model, cost, latency, security verdict, and user context. Export to CSV anytime for compliance.
Click a prompt to see the full routing pipeline in action.
Every AI request passes through three layers of protection before reaching any provider.
CPU-only pattern matching catches jailbreaks, instruction overrides, and system prompt extraction attempts.
Block prompts containing SSNs, credit card numbers, API keys, or source code before they leave your network.
Every request logged with user, prompt hash, provider, model, cost, latency, and security verdict.
Drop-in OpenAI SDK compatible. Change your base URL and you're done.
# Before from openai import OpenAI client = OpenAI(api_key="sk-...") # After — that's it, one line client = OpenAI( base_url="https://your-service.edgecompute.app/v1", api_key="YOUR_MODELROUTER_KEY" )
// Before import OpenAI from "openai"; const client = new OpenAI({ apiKey: "sk-..." }); // After — that's it, one line const client = new OpenAI({ baseURL: "https://your-service.edgecompute.app/v1", apiKey: "YOUR_MODELROUTER_KEY" });
# Before curl https://api.openai.com/v1/chat/completions \ -H "Authorization: Bearer sk-..." \ -d '{"model":"gpt-4o","messages":[...]}' # After — change the URL, that's it curl https://your-service.edgecompute.app/v1/chat/completions \ -H "Authorization: Bearer YOUR_MODELROUTER_KEY" \ -d '{"model":"auto","messages":[...]}'
Smart routing + caching + included-tier models = dramatic cost reduction.
ModelRouter is the only gateway that combines edge deployment, security, and cost optimization.
| Feature | ModelRouter | OpenRouter | Portkey | LiteLLM |
|---|---|---|---|---|
| Edge deployment | Yes (Fastly) | No | No | No |
| Injection detection | Yes (30+ patterns) | No | No | No |
| DLP / blocking rules | Yes | No | Basic | No |
| Audit logging | Yes (per-request) | No | Yes | No |
| Edge caching | Yes (2-tier) | No | Yes | No |
| Vendor-independent (BYOK) | Yes | 5.5% fee | Per-request | Yes (OSS) |
| Multimodal routing | Yes (auto-detect) | No | No | No |
| Included-tier routing | Yes (auto) | No | No | No |
| Self-hostable | Yes | No | No | Yes |
| Cold start | <1ms (WASM) | N/A | N/A | N/A |
Every AI provider is a separate vendor, a separate data processor, a separate discovery target. ModelRouter consolidates them behind one gateway with one audit trail.
Read: AI Sprawl & Legal Discovery →Start small. Scale when you're ready. No markup on provider costs.