Independent research for creator workflowsOfficial sources & verified limits. How we review

Side-by-side comparison

Portkey vs LiteLLM: open-source gateway with a hosted dashboard, or free proxy you run end to end?

Portkey and LiteLLM are the two open-source AI gateways most teams shortlist when they want one OpenAI-compatible endpoint in front of many model providers. Both are MIT-licensed and both can be self-hosted. The difference is where the operations layer lives: Portkey pairs its gateway with a hosted control panel for logs, guardrails, prompt versions and budgets, while LiteLLM keeps everything, including virtual keys, spend tracking and Prometheus metrics, inside the proxy you run. Figures below come from each project's official pricing pages, from 2026-10-04 and.

Quick answer

Start from the job you need done — the winner is the fit, not the brand.

Choose Portkey if…

Teams putting LLM features into production that need observability, guardrails and key management on top of routing, with the option to self-host the open-source gateway.

Starting point: Developer: free forever, 10k recorded logs/month, 3-day log retention, not for production.

Choose LiteLLM if…

Developers and platform teams who want a self-hosted, free AI gateway with granular spend control, virtual keys, and fallbacks — without per-token platform fees.

Starting point: Open source and self-hosted is free forever ($0): 100+ providers behind one OpenAI-compatible API with...

Comparison table

The same fields are shown for both products so the comparison does not quietly favor one side.

DecisionPortkeyLiteLLM
Best forTeams putting LLM features into production that need observability, guardrails and key management on top of routing, with the option to self-host the open-source gateway.Developers and platform teams who want a self-hosted, free AI gateway with granular spend control, virtual keys, and fallbacks — without per-token platform fees.
Core usesProduction LLM observability, Routing and fallbacks across providers, Guardrails and prompt management, Self-hosted gatewayAI gateway / LLM proxy, model routing and fallbacks, spend tracking and budgets, virtual API keys and teams
Pricing noteDeveloper: free forever, 10k recorded logs/month, 3-day log retention, not for production. Production: $49/month, 100k recorded logs/month (+$9 per additional 100k), 30-day log retention, LLM guardrails, RBAC, semantic caching. Enterprise: custom (SSO, VPC hosting, SOC2/HIPAA). The open-source gateway is free to self-host.Open source and self-hosted is free forever ($0): 100+ providers behind one OpenAI-compatible API with virtual keys, users and teams, spend tracking, budgets and rate limits, LLM fallbacks, request/response logging, and Prometheus metrics. Enterprise is priced annually by gateway request capacity (never per token) and adds SSO/SCIM, OIDC/JWT auth, audit logs, secret managers and key rotation, org and team admins, multi-region control plane, 24/7 support with SLAs, and air-gap deployment; a 30-day trial key is available without a credit card. from litellm.ai/pricing.
Free planYes — Developer plan is free forever with 10k recorded logs per month and 3-day log retention.Free tier available
Main checksThe free Developer plan is not meant for production workloads Log volume drives cost on the hosted plans: overages are $9 per additional 100k requests on Production Self-hosting the open-source gateway gives routing and guardrails but not the full hosted dashboardSelf-hosted: you run and maintain the gateway (PostgreSQL plus optional Redis), so uptime, upgrades, and operations are on you. Enterprise governance features (SSO/SCIM, audit logs, secret managers, SLAs) require the paid Enterprise edition. Independent open-source project (BerriAI) — not an official product of OpenAI, Anthropic, Google, or any listed provider. Security: on March 24, 2026, PyPI releases 1.82.7 and 1.82.8 of the litellm package were published with credential-stealing malware (live about 40 minutes; roughly 2,500 organizations potentially exposed). Pin versions, verify package checksums, and follow the official advisory (BerriAI/litellm issue #24518) before self-hosted installs.
Pricing sourceOfficial sourcesOfficial sources

The short answer

Choose LiteLLM when you want the whole gateway, including virtual keys, team budgets, rate limits, fallbacks, request logging and Prometheus metrics, for $0 and are happy to run PostgreSQL (plus optional Redis) yourself. Its Enterprise edition is priced annually by request capacity, never per token, and adds SSO/SCIM, audit logs, secret managers and SLAs.

Choose Portkey when observability is the point: you want logs, traces, feedback, alerts, prompt templates with versioning and guardrails in a hosted dashboard without building that layer. The Developer plan is free with 10k recorded logs a month but is not meant for production; Production is $49 a month for 100k logs, with $9 per extra 100k.

Pricing model

LiteLLM: the open-source proxy is free forever when self-hosted. There is no per-token platform fee. Enterprise pricing is annual and based on gateway request capacity; a 30-day trial key is available without a credit card.

Portkey: the open-source gateway is free to self-host. The hosted platform is tiered by recorded logs: Developer at $0 (10k logs a month, 3-day retention), Production at $49 a month (100k logs, 30-day retention, guardrails, RBAC, semantic caching) and Enterprise on custom terms with SSO, VPC hosting and SOC 2 or HIPAA support. Log volume, not token volume, drives the bill.

What you get out of the box

LiteLLM covers 100+ providers behind one OpenAI-compatible API and bundles governance into the proxy: virtual keys, users and teams, spend tracking and budgets, rate limits, model fallbacks, request and response logging, and Prometheus metrics. The trade-off is that the proxy needs a PostgreSQL database and, for high throughput, Redis.

Portkey's gateway handles fallbacks, load balancing, retries and timeouts through a universal OpenAI-compatible API. Its strength is the hosted layer on top: logs and traces with metadata filters, feedback, alerts, prompt templates with versioning, simple and semantic caching, and guardrails. Virtual keys, role-based access control and budgets are on the paid plans.

Self-hosting and operations

With LiteLLM you own the full stack: upgrades, database backups, uptime and security are yours. Pin package versions and verify checksums: on March 24, 2026 two PyPI releases of the litellm package (1.82.7 and 1.82.8) were published with credential-stealing malware for about 40 minutes, and BerriAI's advisory lists the steps to check an install.

With Portkey you can self-host the open-source gateway, but the dashboard, logs and prompt management stay in Portkey's hosted service unless you are on an Enterprise VPC deployment. Portkey's own guidance says the free Developer plan is for prototyping, not production traffic.

Who should pick which

Platform teams putting paid provider keys behind one endpoint, who need per-team budgets and can run infrastructure, get the most from LiteLLM. Its free tier is complete rather than a trial.

Product teams shipping LLM features who would otherwise build their own logging, prompt versioning and guardrail tooling save the most time with Portkey, as long as the monthly log volume fits the $49 Production plan or an Enterprise agreement.

If neither team wants to run anything, a hosted gateway such as OpenRouter or Requesty removes the server entirely in exchange for a platform fee; see the OpenRouter vs LiteLLM and Requesty vs OpenRouter comparisons.

Before choosing a paid plan

Match the workflow first. Check current credits, export limits, cancellation terms and commercial-use rights before purchasing.

Portkey

Best for: Teams putting LLM features into production that need observability, guardrails and key management on top of routing, with the option to self-host the open-source gateway.

Pricing: Developer: free forever, 10k recorded logs/month, 3-day log retention, not for production. Production: $49/month, 100k recorded logs/month (+$9 per additional 100k), 30-day log retention, LLM guardrails, RBAC, semantic caching. Enterprise: custom (SSO, VPC hosting, SOC2/HIPAA). The open-source gateway is free to self-host.

Check before paying: The free Developer plan is not meant for production workloads Log volume drives cost on the hosted plans: overages are $9 per additional 100k requests on Production

LiteLLM

Best for: Developers and platform teams who want a self-hosted, free AI gateway with granular spend control, virtual keys, and fallbacks — without per-token platform fees.

Pricing: Open source and self-hosted is free forever ($0): 100+ providers behind one OpenAI-compatible API with virtual keys, users and teams, spend tracking, budgets and rate limits, LLM fallbacks, request/response logging, and Prometheus metrics. Enterprise is priced annually by gateway request capacity (never per token) and adds SSO/SCIM, OIDC/JWT auth, audit logs, secret managers and key rotation, org and team admins, multi-region control plane, 24/7 support with SLAs, and air-gap deployment; a 30-day trial key is available without a credit card. from litellm.ai/pricing.

Check before paying: Self-hosted: you run and maintain the gateway (PostgreSQL plus optional Redis), so uptime, upgrades, and operations are on you. Enterprise governance features (SSO/SCIM, audit logs, secret managers, SLAs) require the paid Enterprise edition.

Run it 24/7 on your own server

Portkey and LiteLLM run on your own machine, so it stops answering when your laptop sleeps. A small Linux VPS with Docker keeps it online for scripts, agents and teammates, with a fixed monthly cost instead of per-token markup.

  • Start with the smallest plan that runs Docker; upgrade only if you add users or local models.
  • Keep the gateway bound to localhost or behind a firewall, and store provider keys as environment variables.
  • Monthly billing lets you test before committing to a long term.

Some links are affiliate links. We may earn a commission if you buy through them. Payment never changes our rankings or editorial verdicts.

Questions creators ask

Is Portkey open source like LiteLLM?
Yes. Portkey's gateway is MIT-licensed and can be self-hosted, the same license LiteLLM uses. The difference is that Portkey's observability dashboard, prompt management and alerts are a hosted service with free and paid plans, while LiteLLM keeps logging, metrics and key management inside the self-hosted proxy.
Which one is cheaper for a small team?
Self-hosting either gateway costs nothing in license fees, so the real cost is the server you run. LiteLLM stays free as you grow because it has no hosted tier below Enterprise. Portkey is free up to 10k recorded logs a month on the Developer plan, then $49 a month for 100k logs on Production, which is the plan Portkey recommends for production traffic.
Can I use Portkey and LiteLLM together?
Technically yes, because both expose OpenAI-compatible endpoints, so one can be configured as an upstream of the other. In practice most teams pick one: LiteLLM when governance lives in the proxy, Portkey when the hosted dashboard is the feature they are paying for.