LiteLLM vs Portkey
Portkey is a managed AI gateway with observability, guardrails and prompt management. Its free tier records 10,000 logs a month and keeps them for three days, and Portkey itself says it is not suitable for production. Production is $49/mo for 100,000 recorded logs, then $9 for each additional 100,000 requests. LiteLLM is the open-source gateway you run yourself for a flat $15/mo, with your own provider keys and your logs on your own pod.
LiteLLM vs Portkey: The Verdict
Portkey buys you things that are genuinely hard to build: partner guardrails, semantic caching, prompt templates with versioning, role-based access control, and an observability stack you do not maintain. If you want that as a product, $49/mo is not a bad price. Two details decide whether it fits. The first is retention: the free tier keeps logs for three days and Production keeps them for thirty, so the record of what your models did has a shelf life set by your plan rather than by you. The second is Portkey's own wording, which says Production is not recommended for organisations requiring custom security controls or data residency guarantees, and points those buyers at Enterprise with custom pricing. Self-hosted LiteLLM answers both by construction: prompts, responses and logs stay in a database on your pod, retention is whatever your disk allows, and there is no seat, log or request meter. It is MIT-licensed with about 56,000 GitHub stars and gives you one OpenAI-compatible API over 100+ providers plus virtual keys, budgets and spend tracking. What you take on is operations, no SOC 2 report to hand an auditor, and no partner guardrail catalog.
Last updated: 2026-08-07Quick Comparison
| Feature | Portkey | LiteLLM |
|---|---|---|
| Price | Free tier, then $49/mo Production, Enterprise custom | $15/mo flat hosting plus your provider costs |
| Recorded logs | 10k/mo free, 100k/mo on Production, then $9 per extra 100k requests | No log meter. Bounded by your pod's disk |
| Log retention | 3 days on free, 30 days on Production, custom on Enterprise | As long as you keep the data |
| Metrics retention | 30 days on free, 90 days on Production | Yours to decide |
| Data residency and custom security controls | Enterprise plan, custom pricing | Included by definition. It runs on your pod |
| Where prompts and responses go | Through Portkey's managed gateway | Straight from your pod to the provider |
| Provider keys | Stored in Portkey key management | Your own keys, on your pod |
| OpenAI-compatible API | Yes | Yes, drop-in /v1 endpoint |
| Prompt templates | 3 on free, unlimited on Production | Unlimited |
| Guardrails | Deterministic on free, LLM and partner guardrails on Production | Basic. This is a real gap |
| Self-hosting the gateway | An open-source gateway exists, the control plane is the paid product | The whole thing is the open-source product |
| Compliance evidence | SOC 2 Type 2, GDPR, HIPAA and BAAs on Enterprise | None to hand an auditor. Your infrastructure, your controls |
| License | Managed platform | MIT, about 56,000 GitHub stars |
Where Portkey Gets Expensive
Trade-offs to weigh before committing.
Your Logs Have an Expiry Date
The free tier keeps logs for three days and metrics for thirty. Production stretches that to thirty days of logs and ninety of metrics. Debugging something a user reported five weeks ago means the evidence is already gone unless you are on a custom Enterprise retention.
The Log Meter Sits on Top of the Subscription
Production includes 100,000 recorded logs a month and charges $9 for every additional 100,000 requests. Traffic growth therefore shows up twice: once in your provider bill and again in your gateway bill.
Data Residency Is an Enterprise Conversation
Portkey's own pricing page says the $49 Production plan is not recommended for organisations requiring custom security controls or data residency guarantees, and points them to Enterprise with custom pricing. If a compliance review is why you are shopping for a gateway, the $49 tier is not the answer.
The Free Tier Is Labelled Not for Production
Portkey describes the free Developer plan as suited to prototyping, testing and evaluating proof of concepts, and explicitly not to production workloads. It is a fair warning, and it means the real comparison is $49/mo, not free.
Why Self-Host with LiteLLM?
What you get when you pick this stack.
No Log Meter, No Retention Cliff
LiteLLM writes request logs and spend data to a PostgreSQL database on your pod. How long you keep them is a disk decision, not a plan decision, and nothing gets more expensive because you had a busy month.
Prompts Never Leave Your Infrastructure
Requests go from your gateway straight to the provider using your own keys. There is no third party in the request path, which removes an entire section of most data-residency and vendor reviews.
Virtual Keys, Budgets and Spend Tracking Included
Issue per-team virtual keys with their own budgets, watch spend by key and by model, and set routing, fallbacks and retries yourself. The same OpenAI-compatible API means existing SDKs keep working unchanged.
One-Click Hosting, Not a DevOps Project
InstaPods deploys LiteLLM as a pre-baked image with managed TLS and daily PostgreSQL backups on the $15/mo Grow plan (2 vCPU, 4 GB RAM, 50 GB storage). No Docker, reverse proxy or certificates to wire up.
Real Cost Comparison
A team running about 300,000 gateway requests a month and wanting to keep the logs.
- Portkey Production: $49/mo, includes 100,000 recorded logs
- Overage on the extra 200,000 requests: $9 per 100,000, so $18
- Logs retained for 30 days, metrics for 90
- Data residency or custom security controls means Enterprise, custom pricing
- InstaPods Grow plan: $15/mo (2 vCPU, 4 GB RAM, 50 GB storage)
- LiteLLM: free and open source (MIT)
- No log, seat or request meter
- Retention is your own disk and backup policy
Frequently Asked Questions
How much does Portkey cost in 2026?
Portkey lists a free Developer plan with 10,000 recorded logs a month, 3-day log retention and 3 prompt templates, described as not suitable for production workloads. Production is $49/mo with 100,000 recorded logs, 30-day log retention, 90-day metrics, unlimited prompt templates and role-based access control, plus $9 for every additional 100,000 requests. Enterprise is custom priced and adds private cloud or VPC deployment and advanced compliance. Prices read from portkey.ai on 7 August 2026.
Is LiteLLM a good Portkey alternative?
For the gateway itself, yes. LiteLLM gives you one OpenAI-compatible endpoint over 100+ providers, virtual keys, per-key budgets, spend tracking, routing, fallbacks and retries, and an admin UI, all under an MIT licence. Where Portkey is ahead is the managed observability product, its partner guardrail catalog, semantic caching and prompt management with versioning. If those are the reason you are buying, Portkey is the honest answer.
Does Portkey have an open-source version?
Yes. Portkey publishes an open-source gateway you can deploy locally, covering the universal API, routing, retries, fallbacks and load balancing. The paid plans are the hosted control plane on top: observability at scale, prompt management, guardrails, access control and support. It is worth knowing before you compare the $49 price against a self-hosted setup, because part of what Portkey sells is also free.
Where do my prompts go with each option?
With Portkey's managed gateway, requests pass through Portkey infrastructure on the way to the provider, and logs are stored there for the retention window your plan allows. With self-hosted LiteLLM, requests go from your pod straight to the provider using your own keys, and logs land in a PostgreSQL database on the same pod. If data residency matters, that difference is the whole comparison.
What do I give up by self-hosting?
Three concrete things. There is no SOC 2 report or BAA to hand a compliance reviewer, because the controls are yours. There is no partner guardrail catalog or semantic caching layer maintained for you. And uptime is on you, though InstaPods handles the server, TLS and backups. In exchange you get no meters, no retention cliff and no third party in the request path.
What does LiteLLM need to run?
A PostgreSQL database for keys, budgets and logs, which is bundled in the InstaPods image on the $15/mo Grow plan (2 vCPU, 4 GB RAM, 50 GB storage) with daily backups and HTTPS already configured. Add your provider keys, mint virtual keys for your teams, and point your applications at the OpenAI-compatible endpoint.
Run your own LLM gateway for $15/mo
Instant launch with PostgreSQL, HTTPS and daily backups already configured. No log meter, no retention cliff, your keys on your pod.
Deploy LiteLLM